LotSizingDataModel.Solver 2.0.1
Solver-independent modeling, execution, monitoring and adapter infrastructure.
Loading...
Searching...
No Matches
IMathematicalModelBuildService.cs
Go to the documentation of this file.
1using System.Threading;
2using System.Threading.Tasks;
3using LotSizingDataModel.Instance;
4
6
7/// <summary>
8/// Defines a service that selects a formulation and builds a
9/// solver-independent mathematical model.
10/// </summary>
12{
13 /// <summary>
14 /// Selects a compatible formulation and builds the
15 /// mathematical model.
16 /// </summary>
17 /// <param name="instance">
18 /// Lot-sizing instance to formulate.
19 /// </param>
20 /// <param name="registry">
21 /// Registry containing the available formulations.
22 /// </param>
23 /// <param name="options">
24 /// Mathematical-model build options.
25 /// </param>
26 /// <param name="cancellationToken">
27 /// Token used to cancel formulation selection and model
28 /// construction.
29 /// </param>
30 /// <returns>
31 /// Task returning the complete mathematical-model build
32 /// result.
33 /// </returns>
34 /// <exception cref="System.ArgumentNullException">
35 /// Thrown when <paramref name="instance"/>,
36 /// <paramref name="registry"/>, or
37 /// <paramref name="options"/> is
38 /// <see langword="null"/>.
39 /// </exception>
40 ValueTask<MathematicalModelBuildResult> BuildAsync(
41 LotSizingInstance instance,
44 CancellationToken cancellationToken = default);
45}
Defines the options used to select a formulation and build a solver-independent mathematical model.
Defines a service that selects a formulation and builds a solver-independent mathematical model.
ValueTask< MathematicalModelBuildResult > BuildAsync(LotSizingInstance instance, MathematicalModelFormulationRegistry registry, MathematicalModelBuildOptions options, CancellationToken cancellationToken=default)
Selects a compatible formulation and builds the mathematical model.