LotSizingDataModel.Solver 2.0.1
Solver-independent modeling, execution, monitoring and adapter infrastructure.
Loading...
Searching...
No Matches
CashBalanceDecisionMapper.cs
Go to the documentation of this file.
1using LotSizingDataModel.Solution;
3
5
6/// <summary>
7/// Maps mathematical cash-balance variables to the normalized financial trace.
8/// </summary>
9public sealed class CashBalanceDecisionMapper :
11{
12 public override string Category =>
14
15 protected override void MapValue(
17 LotSizingSolution solution,
18 MathematicalDomainKey domainKey,
19 MathematicalVariableValue variableValue)
20 {
21 ArgumentNullException.ThrowIfNull(context);
22 ArgumentNullException.ThrowIfNull(solution);
23 ArgumentNullException.ThrowIfNull(domainKey);
24 ArgumentNullException.ThrowIfNull(variableValue);
25
26 int period =
27 domainKey.GetRequiredInt32(
29
30 solution.SetCashBalance(
31 period,
32 variableValue.Value);
33 }
34}
Stores the value returned by a solver for one mathematical decision variable.
double Value
Gets or sets the value returned by the solver.
Maps mathematical cash-balance variables to the normalized financial trace.
override string Category
Gets the mathematical domain-key category handled by this mapper.
override void MapValue(MathematicalSolutionMappingContext context, LotSizingSolution solution, MathematicalDomainKey domainKey, MathematicalVariableValue variableValue)
Provides the canonical mathematical domain-key categories used to identify lot-sizing decision famili...
Provides a reusable base implementation for mathematical decision mappers handling one domain-key cat...
Represents a parsed mathematical-model business-domain key.
int GetRequiredInt32(string name)
Gets a required integer segment.
Provides the canonical mathematical domain-key segment names used by lot-sizing variables and constra...
Provides the shared state and lookup services required while mapping a mathematical solver result bac...