LinearProgramSolution<T>

Models & Types · AiDotNet.Solvers.LinearProgramming

The result of solving a LinearProgram.

For Beginners

Besides the answer itself, a linear program tells you something most solvers throw away: how much each limit is costing you. See InequalityDualValues — those are the numbers that answer “which constraint should I relax first?”.

How It Works

All state is supplied through the constructor and exposed read-only, so a solution cannot be altered after the solver produced it.

Constructors

Constructor Summary
LinearProgramSolution(LinearProgramStatus status, Vector<T> solution, T objectiveValue, int iterations, Vector<T> inequalityDualValues, Vector<T> equalityDualValues) Creates a linear program solution.

Properties

Property Summary
LinearProgramStatus Status { get; } Gets the outcome of the solve.
T ObjectiveValue { get; } Gets the objective value cᵀx at Solution.
Vector<T> EqualityDualValues { get; } Gets the dual value of each equality constraint, or null when the problem had none or was not solved to optimality.
Vector<T> InequalityDualValues { get; } Gets the dual value (shadow price) of each inequality constraint, or null when the problem had none or was not solved to optimality.
Vector<T> Solution { get; } Gets the decision variables at the returned point, or null when the problem was infeasible or unbounded.
int Iterations { get; } Gets the number of simplex pivots performed across both phases.