LotSizingDataModel.Solver 2.0.1
Solver-independent modeling, execution, monitoring and adapter infrastructure.
Loading...
Searching...
No Matches
LotSizingSolverBootstrapResult.cs
Go to the documentation of this file.
1using System;
3
5
6/// <summary>
7/// Represents the result of initializing the complete
8/// lot-sizing solver infrastructure.
9/// </summary>
10/// <remarks>
11/// The result keeps both the low-level solver-runtime build
12/// information and the high-level solver service created from
13/// that runtime.
14/// </remarks>
16{
17 /// <summary>
18 /// Initializes a solver-bootstrap result.
19 /// </summary>
20 /// <param name="runtimeBuildResult">
21 /// Result of solver discovery and adapter loading.
22 /// </param>
23 /// <param name="solverService">
24 /// High-level solver service created from the runtime, or
25 /// <see langword="null"/> when initialization did not
26 /// produce a usable service.
27 /// </param>
28 /// <exception cref="ArgumentNullException">
29 /// Thrown when <paramref name="runtimeBuildResult"/> is
30 /// <see langword="null"/>.
31 /// </exception>
33 SolverRuntimeBuildResult runtimeBuildResult,
34 LotSizingSolverService? solverService)
35 {
36 ArgumentNullException.ThrowIfNull(
37 runtimeBuildResult);
38
40 runtimeBuildResult;
41
43 solverService;
44 }
45
46 /// <summary>
47 /// Gets the result of solver discovery and adapter loading.
48 /// </summary>
53
54 /// <summary>
55 /// Gets the high-level solver service created from the
56 /// runtime, or <see langword="null"/> when initialization
57 /// did not produce one.
58 /// </summary>
60 {
61 get;
62 }
63
64 /// <summary>
65 /// Gets a value indicating whether the bootstrap operation
66 /// created a solver service successfully.
67 /// </summary>
68 public bool IsSuccessful =>
69 SolverService is not null;
70
71 /// <summary>
72 /// Gets a value indicating whether the initialized runtime
73 /// can currently solve at least one mathematical model.
74 /// </summary>
75 public bool CanSolve =>
76 SolverService is not null &&
77 RuntimeBuildResult.CanSolve;
78}
Represents the result of building the solver runtime from discovery information and dynamically loade...
LotSizingSolverService? SolverService
Gets the high-level solver service created from the runtime, or null when initialization did not prod...
LotSizingSolverBootstrapResult(SolverRuntimeBuildResult runtimeBuildResult, LotSizingSolverService? solverService)
Initializes a solver-bootstrap result.
bool IsSuccessful
Gets a value indicating whether the bootstrap operation created a solver service successfully.
bool CanSolve
Gets a value indicating whether the initialized runtime can currently solve at least one mathematical...
SolverRuntimeBuildResult RuntimeBuildResult
Gets the result of solver discovery and adapter loading.
Orchestrates the complete solution of a lot-sizing instance, from formulation selection to normalized...