LotSizingDataModel.Solver 2.0.1
Solver-independent modeling, execution, monitoring and adapter infrastructure.
Loading...
Searching...
No Matches
SolverProgressSnapshot.cs
Go to the documentation of this file.
1using System;
2using System.Xml.Serialization;
3
5
6/// <summary>
7/// Represents an immutable snapshot of the current progress of
8/// a mathematical optimization run.
9/// </summary>
10[Serializable]
11[XmlType(TypeName = "solverProgressSnapshot")]
12public sealed class SolverProgressSnapshot
13{
14 /// <summary>
15 /// Initializes an empty progress snapshot.
16 /// </summary>
18 {
19 Message =
20 string.Empty;
21 }
22
23 /// <summary>
24 /// Gets or sets the current solver execution stage.
25 /// </summary>
26 [XmlAttribute("stage")]
28 {
29 get;
30 set;
31 }
32
33 /// <summary>
34 /// Gets or sets the elapsed wall-clock time in seconds.
35 /// </summary>
36 [XmlAttribute("elapsedSeconds")]
37 public double ElapsedSeconds
38 {
39 get;
40 set;
41 }
42
43 /// <summary>
44 /// Gets or sets the elapsed processor time in seconds,
45 /// when reported by the solver.
46 /// </summary>
47 [XmlAttribute("processorSeconds")]
48 public double? ProcessorSeconds
49 {
50 get;
51 set;
52 }
53
54 /// <summary>
55 /// Gets or sets the number of explored search-tree nodes.
56 /// </summary>
57 [XmlAttribute("exploredNodeCount")]
58 public long? ExploredNodeCount
59 {
60 get;
61 set;
62 }
63
64 /// <summary>
65 /// Gets or sets the number of open search-tree nodes.
66 /// </summary>
67 [XmlAttribute("openNodeCount")]
68 public long? OpenNodeCount
69 {
70 get;
71 set;
72 }
73
74 /// <summary>
75 /// Gets or sets the number of simplex or barrier
76 /// iterations reported by the solver.
77 /// </summary>
78 [XmlAttribute("iterationCount")]
79 public long? IterationCount
80 {
81 get;
82 set;
83 }
84
85 /// <summary>
86 /// Gets or sets the best feasible objective value currently
87 /// known.
88 /// </summary>
89 [XmlAttribute("incumbentObjective")]
90 public double? IncumbentObjective
91 {
92 get;
93 set;
94 }
95
96 /// <summary>
97 /// Gets or sets the best objective bound currently known.
98 /// </summary>
99 [XmlAttribute("bestBound")]
100 public double? BestBound
101 {
102 get;
103 set;
104 }
105
106 /// <summary>
107 /// Gets or sets the absolute optimality gap.
108 /// </summary>
109 [XmlAttribute("absoluteGap")]
110 public double? AbsoluteGap
111 {
112 get;
113 set;
114 }
115
116 /// <summary>
117 /// Gets or sets the relative optimality gap.
118 /// </summary>
119 [XmlAttribute("relativeGap")]
120 public double? RelativeGap
121 {
122 get;
123 set;
124 }
125
126 /// <summary>
127 /// Gets or sets the number of feasible solutions found so
128 /// far.
129 /// </summary>
130 [XmlAttribute("solutionCount")]
131 public int SolutionCount
132 {
133 get;
134 set;
135 }
136
137 /// <summary>
138 /// Gets or sets the amount of memory used by the solver in
139 /// megabytes, when available.
140 /// </summary>
141 [XmlAttribute("memoryUsageMegabytes")]
142 public double? MemoryUsageMegabytes
143 {
144 get;
145 set;
146 }
147
148 /// <summary>
149 /// Gets or sets a solver or callback message associated
150 /// with this snapshot.
151 /// </summary>
152 [XmlElement("message")]
153 public string Message
154 {
155 get;
156 set;
157 }
158
159 /// <summary>
160 /// Gets a value indicating whether a feasible incumbent
161 /// objective is available.
162 /// </summary>
163 [XmlIgnore]
164 public bool HasIncumbent =>
165 IncumbentObjective.HasValue;
166}
Common.SolverProgressStage Stage
Gets or sets the current solver execution stage.
string Message
Gets or sets a solver or callback message associated with this snapshot.
double? MemoryUsageMegabytes
Gets or sets the amount of memory used by the solver in megabytes, when available.
double ElapsedSeconds
Gets or sets the elapsed wall-clock time in seconds.
double? AbsoluteGap
Gets or sets the absolute optimality gap.
double? BestBound
Gets or sets the best objective bound currently known.
long? IterationCount
Gets or sets the number of simplex or barrier iterations reported by the solver.
SolverProgressSnapshot()
Initializes an empty progress snapshot.
bool HasIncumbent
Gets a value indicating whether a feasible incumbent objective is available.
long? OpenNodeCount
Gets or sets the number of open search-tree nodes.
long? ExploredNodeCount
Gets or sets the number of explored search-tree nodes.
int SolutionCount
Gets or sets the number of feasible solutions found so far.
double? IncumbentObjective
Gets or sets the best feasible objective value currently known.
double? ProcessorSeconds
Gets or sets the elapsed processor time in seconds, when reported by the solver.
double? RelativeGap
Gets or sets the relative optimality gap.
SolverProgressStage
Identifies the current stage of a solver execution.