![]() |
VOOZH | about |
dotnet add package Anexia.MathematicalProgram --version 2.7.0
NuGet\Install-Package Anexia.MathematicalProgram -Version 2.7.0
<PackageReference Include="Anexia.MathematicalProgram" Version="2.7.0" />
<PackageVersion Include="Anexia.MathematicalProgram" Version="2.7.0" />Directory.Packages.props
<PackageReference Include="Anexia.MathematicalProgram" />Project file
paket add Anexia.MathematicalProgram --version 2.7.0
#r "nuget: Anexia.MathematicalProgram, 2.7.0"
#:package Anexia.MathematicalProgram@2.7.0
#addin nuget:?package=Anexia.MathematicalProgram&version=2.7.0Install as a Cake Addin
#tool nuget:?package=Anexia.MathematicalProgram&version=2.7.0Install as a Cake Tool
👁 NuGet version badge
👁 Test status
👁 Code coverage
This library allows you to build and solve linear programs and integer linear programs in a very handy way.
For linear programs, either SCIP or Google's GLOP solver can be used.
For integer linear programs, SCIP, Gurobi and the Coin-OR CBC branch and cut
solver can be chosen. When the desired solver is not available, i.e., no licence for Gurobi could be found, SCIP is used
as fallback. CBC Solver is marked deprecated, SCIP should be used instead.
Anexia.MathematicalProgram package via nugetThis library works for any linear program (LP), integer linear program (ILP) or constraint program (CP).
After solving the LP/ILP you get a SolverResult according to the Google.OrTools.LinearSolver.Solver.ResultStatus.
The SolverResult contains the following information:
null if the LP/ILP is infeasible.Math.Abs(bestObjectiveBound - objectiveValue) / objectiveValue). If the objective value and the best bound are zero,
the gap is also set to zero. If the objective value is zero but the best bound is not, the gap is defined to be +/- infinity.var model = new OptimizationModel<IIntegerVariable<IRealScalar>, RealScalar, IRealScalar>();
var x = model.NewVariable<IntegerVariable<IRealScalar>>(new IntegralInterval(1, 3), "x");
var y = model.NewVariable<IntegerVariable<IRealScalar>>(new IntegralInterval(0, 1), "y");
var constraint = model.ConstraintBuilder()
.AddWeightedSum([x, y], [1, -1])
.Build(new RealInterval(0, double.PositiveInfinity));
model.AddConstraint(constraint);
var objFunction = model.TermsBuilder()
.AddTerm(2, x)
.AddTerm(2, y).Build()
.ToObjectiveFunction(false);
var optimizationModel = model.SetObjective(objFunction);
var result = SolverFactory.SolverFor(IlpSolverType.Scip).Solve(optimizationModel,
new SolverParameter(new EnableSolverOutput(true)),
out _);
Further detailed examples can be found in the .
Contributions are welcomed! Read the for more information.
This project is licensed under MIT License. See for more information.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 net8.0 is compatible. net8.0-android net8.0-android was computed. net8.0-browser net8.0-browser was computed. net8.0-ios net8.0-ios was computed. net8.0-maccatalyst net8.0-maccatalyst was computed. net8.0-macos net8.0-macos was computed. net8.0-tvos net8.0-tvos was computed. net8.0-windows net8.0-windows was computed. net9.0 net9.0 was computed. net9.0-android net9.0-android was computed. net9.0-browser net9.0-browser was computed. net9.0-ios net9.0-ios was computed. net9.0-maccatalyst net9.0-maccatalyst was computed. net9.0-macos net9.0-macos was computed. net9.0-tvos net9.0-tvos was computed. net9.0-windows net9.0-windows was computed. net10.0 net10.0 was computed. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
Showing the top 1 NuGet packages that depend on Anexia.MathematicalProgram:
| Package | Downloads |
|---|---|
|
Anexia.MathematicalProgram.MPaaS.Client
Package Description |
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 2.7.0 | 6,088 | 11/17/2025 |
| 2.6.4 | 260 | 11/7/2025 |
| 2.6.3 | 259 | 11/6/2025 |
| 2.6.2 | 245 | 11/6/2025 |
| 2.6.1 | 248 | 11/6/2025 |
| 2.6.0 | 233 | 11/5/2025 |
| 2.5.0 | 232 | 11/5/2025 |
| 2.4.0 | 1,902 | 10/2/2025 |
| 2.3.0 | 279 | 6/24/2025 |
| 2.2.0 | 5,597 | 3/26/2025 |
| 2.1.0 | 898 | 3/6/2025 |
| 2.0.1 | 284 | 3/3/2025 |
| 2.0.0 | 199 | 2/26/2025 |
| 1.0.3 | 474 | 1/22/2025 |
| 1.0.2 | 207 | 12/5/2024 |
| 1.0.1 | 188 | 12/5/2024 |
| 1.0.0 | 183 | 12/5/2024 |