15 ArgumentNullException.ThrowIfNull(source);
43 ArgumentNullException.ThrowIfNull(source);
44 ArgumentNullException.ThrowIfNull(cuts);
50 StringComparer.Ordinal);
64 if (!nameToVariable.TryGetValue(
68 throw new InvalidOperationException(
69 $
"Cut '{name}' references unknown variable " +
70 $
"'{coefficient.VariableName}'.");
100 CutConstraintSense.LessOrEqual =>
103 CutConstraintSense.Equal =>
106 CutConstraintSense.GreaterOrEqual =>
110 throw new NotSupportedException(
111 $
"Unsupported cut sense '{sense}'.")
ULSAlgorithms.CuttingPlanes.LinearConstraintSense CutConstraintSense
ULSAlgorithms.Optimization.Modeling.LinearConstraintSense ModelConstraintSense
static LinearModel AddCuts(LinearModel source, IEnumerable<(string Name, LsCutDefinition Cut)> cuts)
static LinearModel CreateLpRelaxation(LinearModel source)
Solver-independent definition of one ULS (l,S) inequality.
IReadOnlyList< CutCoefficient > Coefficients
Gets nonzero coefficients in solver-independent form.
LinearConstraintSense Sense
Gets the inequality sense.
double RightHandSide
Gets the right-hand side.
Describes one portable linear constraint.
Immutable solver-independent linear or mixed-integer linear model.
IReadOnlyList< LinearVariable > Variables
Gets all variables.
LinearObjective Objective
Gets the minimization objective.
IReadOnlyList< LinearConstraint > Constraints
Gets all constraints.
string Name
Gets the model name.
Describes one variable in a portable linear mathematical model.
LinearVariableType
Identifies the domain of a variable in a portable linear mathematical model.
Stores one nonzero coefficient of a generated linear inequality.
double Coefficient
Gets the coefficient value.
string VariableName
Gets the solver-independent variable identifier.
Stores one coefficient of a portable linear expression.