LotSizingDataModel.Solver 2.0.1
Solver-independent modeling, execution, monitoring and adapter infrastructure.
Loading...
Searching...
No Matches
InstanceFeasibilityAnalyzer.cs
Go to the documentation of this file.
1using LotSizingDataModel.Instance;
4
6
7/// <summary>
8/// Pre-solve instance feasibility facade. It never reports
9/// Feasible: only proven Infeasible or Unknown.
10/// </summary>
11public sealed class InstanceFeasibilityAnalyzer
12{
14 _modelAnalyzer = new();
15
18 double tolerance = 1.0e-9)
19 {
20 return _modelAnalyzer.Analyze(
21 model,
22 tolerance);
23 }
24
25 public async ValueTask<IntrinsicFeasibilityAnalysisResult>
27 LotSizingInstance instance,
29 CancellationToken cancellationToken = default)
30 {
31 ArgumentNullException.ThrowIfNull(instance);
32 ArgumentNullException.ThrowIfNull(formulation);
33
34 MathematicalModel model =
35 await formulation.BuildAsync(
36 instance,
37 cancellationToken);
38
39 if (instance.HasClosedLoopReturnStreams)
40 {
41 instance.EnsureClosedLoopValid();
42
43 model =
45 .Apply(
46 instance,
47 model);
48 }
49
50 return _modelAnalyzer.Analyze(
51 model);
52 }
53
54 public ValueTask<IntrinsicFeasibilityAnalysisResult>
56 LotSizingInstance instance,
57 CancellationToken cancellationToken = default)
58 {
59 return AnalyzeAsync(
60 instance,
62 cancellationToken);
63 }
64}
Pre-solve instance feasibility facade. It never reports Feasible: only proven Infeasible or Unknown.
IntrinsicFeasibilityAnalysisResult AnalyzeModel(MathematicalModel model, double tolerance=1.0e-9)
ValueTask< IntrinsicFeasibilityAnalysisResult > AnalyzeStandardAsync(LotSizingInstance instance, CancellationToken cancellationToken=default)
async ValueTask< IntrinsicFeasibilityAnalysisResult > AnalyzeAsync(LotSizingInstance instance, IMathematicalModelFormulation formulation, CancellationToken cancellationToken=default)
Proves intrinsic infeasibility from variable-bound interval arithmetic. Absence of a proof is reporte...
Adds explicit return allocation, recovery and disposal decisions to a standard forward mathematical m...
MathematicalModel Apply(LotSizingInstance instance, MathematicalModel sourceModel)
Creates fully configured instances of the standard solver-independent lot-sizing formulation.
static StandardLotSizingFormulation CreateDefault()
Creates the standard formulation with the default formulation options.
Represents a solver-independent mathematical optimization model.
Defines a solver-independent mathematical formulation for a lot-sizing instance.
ValueTask< MathematicalModel > BuildAsync(LotSizingInstance instance, CancellationToken cancellationToken=default)
Builds the solver-independent mathematical model.