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.
1using System;
2
4
5/// <summary>
6/// Creates formulation registries preconfigured with the
7/// standard lot-sizing formulation.
8/// </summary>
10{
11 /// <summary>
12 /// Creates a formulation registry containing the default
13 /// standard formulation.
14 /// </summary>
15 /// <returns>
16 /// New formulation registry.
17 /// </returns>
19 {
20 var registry =
22
23 registry.Register(
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>
45 {
46 ArgumentNullException.ThrowIfNull(
47 options);
48
49 var registry =
51
52 registry.Register(
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(
75 {
76 ArgumentNullException.ThrowIfNull(
77 registry);
78
79 ArgumentNullException.ThrowIfNull(
80 options);
81
82 registry.RegisterOrReplace(
84 options));
85 }
86}
void RegisterOrReplace(IMathematicalModelFormulation formulation)
Registers or replaces a mathematical formulation.
Creates fully configured instances of the standard solver-independent lot-sizing formulation.
static StandardLotSizingFormulation CreateDefault()
Creates the standard formulation with the default formulation options.
static StandardLotSizingFormulation Create(StandardLotSizingFormulationOptions options)
Creates the standard formulation with the supplied formulation options.
Configures the standard solver-independent mixed-integer lot-sizing formulation.
Creates formulation registries preconfigured with the standard lot-sizing formulation.
static void RegisterOrReplace(MathematicalModelFormulationRegistry registry, StandardLotSizingFormulationOptions options)
Registers or replaces the standard formulation in an existing formulation registry.
static MathematicalModelFormulationRegistry Create(StandardLotSizingFormulationOptions options)
Creates a formulation registry containing a standard formulation configured with the supplied options...
static MathematicalModelFormulationRegistry CreateDefault()
Creates a formulation registry containing the default standard formulation.