1using LotSizingDataModel.Instance;
28 _applicabilityService;
41 throw new ArgumentNullException(nameof(variableBuilder));
44 throw new ArgumentNullException(nameof(objectiveBuilder));
47 throw new ArgumentNullException(nameof(constraintBuilder));
50 throw new ArgumentNullException(nameof(options));
51 _applicabilityService =
52 applicabilityService ??
53 throw new ArgumentNullException(nameof(applicabilityService));
55 _options.EnsureValid();
74 throw new InvalidOperationException(
75 "Unknown small-bucket formulation kind.")
78 public override string Name =>
82 "DLSP small-bucket MILP formulation",
85 "CSLP small-bucket MILP formulation",
88 "PLSP small-bucket MILP formulation",
91 throw new InvalidOperationException(
92 "Unknown small-bucket formulation kind.")
96 "Solver-independent single-resource small-bucket scheduling " +
97 "formulation with persistent setup state and setup-start cost.";
100 LotSizingInstance instance) =>
101 _applicabilityService.CanBuild(
106 LotSizingInstance instance) =>
107 string.IsNullOrWhiteSpace(instance.Name)
109 : $
"{instance.Name.Trim()} - {FormulationId}";
112 LotSizingInstance instance,
114 CancellationToken cancellationToken) =>
115 _variableBuilder.BuildAsync(
122 LotSizingInstance instance,
124 CancellationToken cancellationToken) =>
125 _objectiveBuilder.BuildAsync(
132 LotSizingInstance instance,
134 CancellationToken cancellationToken) =>
135 _constraintBuilder.BuildAsync(
Provides the shared state required while constructing a solver-independent mathematical model.