3using System.Threading.Tasks;
4using LotSizingDataModel.Instance;
26 "periodicOperatingExpenditureBudget";
29 LotSizingInstance instance,
32 ArgumentNullException.ThrowIfNull(instance);
33 ArgumentNullException.ThrowIfNull(options);
37 .PeriodicOperatingExpenditureBudget
42 LotSizingInstance instance,
45 CancellationToken cancellationToken)
49 .PeriodicOperatingExpenditureBudget;
53 return ValueTask.CompletedTask;
63 throw new InvalidOperationException(
64 "Periodic operating expenditure budget requires the " +
65 "standard minimized economic objective.");
70 period <= instance.PlanningHorizon;
73 cancellationToken.ThrowIfCancellationRequested();
92 throw new InvalidOperationException(
93 $
"Objective term references unknown variable " +
94 $
"'{term.VariableId}'.");
101 !domainKey.TryGetInt32(
103 out
int variablePeriod) ||
104 variablePeriod != period)
116 $
"periodicOperatingExpenditureBudget_t{period}",
119 budget.GetBudget(period),
121 "Maximum period-indexed positive economic expenditure.");
124 return ValueTask.CompletedTask;
Provides a fluent builder for linear expressions.
Provides the shared state required while constructing a solver-independent mathematical model.
MathematicalModel Build(bool clone=true)
Builds and validates the mathematical model.
MathematicalModel Model
Gets the mathematical model currently being built.
Represents a parsed mathematical-model business-domain key.
static bool TryParse(string domainKey, out MathematicalDomainKey? result)
Attempts to parse a canonical mathematical domain key.
Provides the canonical mathematical domain-key segment names used by lot-sizing variables and constra...
const string Period
Period index segment.
List< LinearTerm > Terms
Gets the linear terms of the expression.
Represents one coefficient-variable term in a linear expression.
int VariableId
Gets or sets the identifier of the referenced mathematical variable.
double Coefficient
Gets or sets the coefficient multiplying the referenced variable.
MathematicalObjective Objective
Gets or sets the mathematical objective.
MathematicalVariable? FindVariableById(int variableId)
Finds a mathematical variable by identifier.
Represents the objective function of a mathematical optimization model.
ObjectiveSense Sense
Gets or sets the optimization direction.
LinearExpression Expression
Gets or sets the linear objective expression.
Represents one decision variable in a mathematical optimization model.
string DomainKey
Gets or sets an optional domain key used to map the mathematical variable back to a lot-sizing decisi...
ObjectiveSense
Identifies the optimization direction of a mathematical objective.
MathematicalConstraintSense
Identifies the relational sense of a mathematical constraint.