LotSizingDataModel.Solver
2.0.1
Solver-independent modeling, execution, monitoring and adapter infrastructure.
Loading...
Searching...
No Matches
StandardLotSizingFormulationRegistryFactory.cs
Go to the documentation of this file.
1
using
System;
2
3
namespace
LotSizingDataModel.Solver.Formulation
;
4
5
/// <summary>
6
/// Creates formulation registries preconfigured with the
7
/// standard lot-sizing formulation.
8
/// </summary>
9
public
static
class
StandardLotSizingFormulationRegistryFactory
10
{
11
/// <summary>
12
/// Creates a formulation registry containing the default
13
/// standard formulation.
14
/// </summary>
15
/// <returns>
16
/// New formulation registry.
17
/// </returns>
18
public
static
MathematicalModelFormulationRegistry
CreateDefault
()
19
{
20
var registry =
21
new
MathematicalModelFormulationRegistry
();
22
23
registry.Register(
24
StandardLotSizingFormulationFactory
.
CreateDefault
());
25
26
return
registry;
27
}
28
29
/// <summary>
30
/// Creates a formulation registry containing a standard
31
/// formulation configured with the supplied options.
32
/// </summary>
33
/// <param name="options">
34
/// Standard formulation options.
35
/// </param>
36
/// <returns>
37
/// New formulation registry.
38
/// </returns>
39
/// <exception cref="ArgumentNullException">
40
/// Thrown when <paramref name="options"/> is
41
/// <see langword="null"/>.
42
/// </exception>
43
public
static
MathematicalModelFormulationRegistry
Create
(
44
StandardLotSizingFormulationOptions
options)
45
{
46
ArgumentNullException.ThrowIfNull(
47
options);
48
49
var registry =
50
new
MathematicalModelFormulationRegistry
();
51
52
registry.Register(
53
StandardLotSizingFormulationFactory
.
Create
(
54
options));
55
56
return
registry;
57
}
58
59
/// <summary>
60
/// Registers or replaces the standard formulation in an
61
/// existing formulation registry.
62
/// </summary>
63
/// <param name="registry">
64
/// Target formulation registry.
65
/// </param>
66
/// <param name="options">
67
/// Standard formulation options.
68
/// </param>
69
/// <exception cref="ArgumentNullException">
70
/// Thrown when an argument is <see langword="null"/>.
71
/// </exception>
72
public
static
void
RegisterOrReplace
(
73
MathematicalModelFormulationRegistry
registry,
74
StandardLotSizingFormulationOptions
options)
75
{
76
ArgumentNullException.ThrowIfNull(
77
registry);
78
79
ArgumentNullException.ThrowIfNull(
80
options);
81
82
registry.
RegisterOrReplace
(
83
StandardLotSizingFormulationFactory
.
Create
(
84
options));
85
}
86
}
LotSizingDataModel.Solver.Formulation.MathematicalModelFormulationRegistry
Stores and resolves solver-independent mathematical formulations.
Definition
MathematicalModelFormulationRegistry.cs:12
LotSizingDataModel.Solver.Formulation.MathematicalModelFormulationRegistry.RegisterOrReplace
void RegisterOrReplace(IMathematicalModelFormulation formulation)
Registers or replaces a mathematical formulation.
Definition
MathematicalModelFormulationRegistry.cs:71
LotSizingDataModel.Solver.Formulation.StandardLotSizingFormulationFactory
Creates fully configured instances of the standard solver-independent lot-sizing formulation.
Definition
StandardLotSizingFormulationFactory.cs:11
LotSizingDataModel.Solver.Formulation.StandardLotSizingFormulationFactory.CreateDefault
static StandardLotSizingFormulation CreateDefault()
Creates the standard formulation with the default formulation options.
Definition
StandardLotSizingFormulationFactory.cs:19
LotSizingDataModel.Solver.Formulation.StandardLotSizingFormulationFactory.Create
static StandardLotSizingFormulation Create(StandardLotSizingFormulationOptions options)
Creates the standard formulation with the supplied formulation options.
Definition
StandardLotSizingFormulationFactory.cs:39
LotSizingDataModel.Solver.Formulation.StandardLotSizingFormulationOptions
Configures the standard solver-independent mixed-integer lot-sizing formulation.
Definition
StandardLotSizingFormulationOptions.cs:10
LotSizingDataModel.Solver.Formulation.StandardLotSizingFormulationRegistryFactory
Creates formulation registries preconfigured with the standard lot-sizing formulation.
Definition
StandardLotSizingFormulationRegistryFactory.cs:10
LotSizingDataModel.Solver.Formulation.StandardLotSizingFormulationRegistryFactory.RegisterOrReplace
static void RegisterOrReplace(MathematicalModelFormulationRegistry registry, StandardLotSizingFormulationOptions options)
Registers or replaces the standard formulation in an existing formulation registry.
Definition
StandardLotSizingFormulationRegistryFactory.cs:72
LotSizingDataModel.Solver.Formulation.StandardLotSizingFormulationRegistryFactory.Create
static MathematicalModelFormulationRegistry Create(StandardLotSizingFormulationOptions options)
Creates a formulation registry containing a standard formulation configured with the supplied options...
Definition
StandardLotSizingFormulationRegistryFactory.cs:43
LotSizingDataModel.Solver.Formulation.StandardLotSizingFormulationRegistryFactory.CreateDefault
static MathematicalModelFormulationRegistry CreateDefault()
Creates a formulation registry containing the default standard formulation.
Definition
StandardLotSizingFormulationRegistryFactory.cs:18
LotSizingDataModel.Solver.Formulation
Definition
BacklogCostObjectiveTermBuilder.cs:9
LotSizingDataModel.Solver
Formulation
StandardLotSizingFormulationRegistryFactory.cs
Generated by
1.17.0