LotSizingDataModel.Solver 2.0.1
Solver-independent modeling, execution, monitoring and adapter infrastructure.
Loading...
Searching...
No Matches
StandardLotSizingSolverBootstrapper.cs
Go to the documentation of this file.
1using System;
2using System.Threading;
3using System.Threading.Tasks;
5
7
8/// <summary>
9/// Provides one-step initialization of the standard lot-sizing
10/// formulation together with solver discovery and adapter
11/// loading.
12/// </summary>
13/// <remarks>
14/// This bootstrapper is the application-level entry point for
15/// the default solver infrastructure. It creates the standard
16/// formulation registry and delegates native solver discovery to
17/// <see cref="LotSizingSolverBootstrapper"/>.
18/// </remarks>
20{
21 /// <summary>
22 /// Initializes the standard formulation and discovers
23 /// available solver adapters using default options.
24 /// </summary>
25 /// <param name="cancellationToken">
26 /// Token used to cancel solver discovery and adapter
27 /// loading.
28 /// </param>
29 /// <returns>
30 /// Complete standard solver-bootstrap result.
31 /// </returns>
32 public static ValueTask<StandardLotSizingSolverBootstrapResult>
34 CancellationToken cancellationToken = default)
35 {
36 return InitializeAsync(
39 cancellationToken);
40 }
41
42 /// <summary>
43 /// Initializes the supplied standard formulation and
44 /// discovers available solver adapters using default
45 /// discovery options.
46 /// </summary>
47 /// <param name="formulationOptions">
48 /// Standard formulation options.
49 /// </param>
50 /// <param name="cancellationToken">
51 /// Token used to cancel solver discovery and adapter
52 /// loading.
53 /// </param>
54 /// <returns>
55 /// Complete standard solver-bootstrap result.
56 /// </returns>
57 /// <exception cref="ArgumentNullException">
58 /// Thrown when <paramref name="formulationOptions"/> is
59 /// <see langword="null"/>.
60 /// </exception>
61 public static ValueTask<StandardLotSizingSolverBootstrapResult>
64 formulationOptions,
65 CancellationToken cancellationToken = default)
66 {
67 ArgumentNullException.ThrowIfNull(
68 formulationOptions);
69
70 return InitializeAsync(
71 formulationOptions,
73 cancellationToken);
74 }
75
76 /// <summary>
77 /// Initializes the supplied standard formulation and solver
78 /// discovery configuration.
79 /// </summary>
80 /// <param name="formulationOptions">
81 /// Standard formulation options.
82 /// </param>
83 /// <param name="discoveryOptions">
84 /// Solver discovery options.
85 /// </param>
86 /// <param name="cancellationToken">
87 /// Token used to cancel initialization.
88 /// </param>
89 /// <returns>
90 /// Complete standard solver-bootstrap result.
91 /// </returns>
92 /// <exception cref="ArgumentNullException">
93 /// Thrown when one of the option objects is
94 /// <see langword="null"/>.
95 /// </exception>
96 public static async ValueTask<StandardLotSizingSolverBootstrapResult>
99 formulationOptions,
100 SolverDiscoveryOptions discoveryOptions,
101 CancellationToken cancellationToken = default)
102 {
103 ArgumentNullException.ThrowIfNull(
104 formulationOptions);
105
106 ArgumentNullException.ThrowIfNull(
107 discoveryOptions);
108
110 formulationRegistry =
112 .Create(
113 formulationOptions);
114
115 LotSizingSolverBootstrapResult bootstrapResult =
117 formulationRegistry,
118 discoveryOptions,
119 cancellationToken);
120
122 formulationRegistry,
123 bootstrapResult);
124 }
125}
Configures how solver adapter plugins and native solver installations are discovered on the current c...
Represents the result of initializing the complete lot-sizing solver infrastructure.
Initializes the complete lot-sizing solver infrastructure by discovering solver plugins,...
static ValueTask< LotSizingSolverBootstrapResult > InitializeAsync(MathematicalModelFormulationRegistry formulationRegistry, CancellationToken cancellationToken=default)
Initializes the complete solver infrastructure using default solver-discovery options.
Represents the complete initialization result for the standard lot-sizing solver infrastructure.
Provides one-step initialization of the standard lot-sizing formulation together with solver discover...
static async ValueTask< StandardLotSizingSolverBootstrapResult > InitializeAsync(Formulation.StandardLotSizingFormulationOptions formulationOptions, SolverDiscoveryOptions discoveryOptions, CancellationToken cancellationToken=default)
Initializes the supplied standard formulation and solver discovery configuration.
static ValueTask< StandardLotSizingSolverBootstrapResult > InitializeAsync(Formulation.StandardLotSizingFormulationOptions formulationOptions, CancellationToken cancellationToken=default)
Initializes the supplied standard formulation and discovers available solver adapters using default d...
static ValueTask< StandardLotSizingSolverBootstrapResult > InitializeAsync(CancellationToken cancellationToken=default)
Initializes the standard formulation and discovers available solver adapters using default options.
Configures the standard solver-independent mixed-integer lot-sizing formulation.
Creates formulation registries preconfigured with the standard lot-sizing formulation.
static MathematicalModelFormulationRegistry Create(StandardLotSizingFormulationOptions options)
Creates a formulation registry containing a standard formulation configured with the supplied options...