Model solver class.
More...
Model solver class.
Definition at line 28 of file ModelSolver.cs.
|
| | Solver (String solverName) |
| | Creates the solver with the supplied solver backend.
|
| SolveStatus | Solve (Model model) |
| | Solves given model, and returns the status of the response.
|
| void | EnableOutput (bool enable) |
| | Enables or disables the underlying solver output.
|
| void | SetTimeLimitInSeconds (double limit) |
| void | SetSolverSpecificParameters (String parameters) |
| bool | SolverIsSupported () |
| | Returns whether solver specified during the ctor was found and correctly installed.
|
| bool | InterruptSolve () |
| | Tries to interrupt the solve. Returns true if the feature is supported.
|
| bool | HasResponse () |
| | Returns true if solve() was called, and a response was returned.
|
| bool | HasSolution () |
| | Returns true if solve() was called, and a solution was returned.
|
| double | Value (Variable var) |
| | The value of a variable in the current solution. This raises a SolverException if no solution has been found, or if Solve() has not been called.
|
| double | ReducedCost (Variable var) |
| | The reduced cost of a variable in the current solution. This raises a SolverException if no solution has been found, or if Solve() has not been called.
|
| double | DualValue (LinearConstraint ct) |
| | The dual value of a linear constraint in the current solution. This raises a SolverException if no solution has been found, or if Solve() has not been called.
|
| double | Activity (LinearConstraint ct) |
| | The activity of a constraint in the current solution. This raises a SolverException if no solution has been found, or if Solve() has not been called.
|
|
| double | ObjectiveValue [get] |
| | The best objective value found during search. This raises a SolverException if no solution has been found, or if Solve() has not been called.
|
| double | BestObjectiveBound [get] |
| | The best objective bound found during search. This raises a SolverException if no solution has been found, or if Solve() has not been called.
|
| MbLogCallback | LogCallback [get, set] |
| | Sets the log callback for the solver.
|
| double | WallTime [get] |
| | Returns the elapsed time since the creation of the solver.
|
| double | UserTime [get] |
| | Returns the user time since the creation of the solver.
|
◆ Solver()
| Google.OrTools.ModelBuilder.Solver.Solver |
( |
String | solverName | ) |
|
|
inline |
Creates the solver with the supplied solver backend.
- Parameters
-
| solverName | the name of the solver backend |
Definition at line 41 of file ModelSolver.cs.
◆ Activity()
The activity of a constraint in the current solution. This raises a SolverException if no solution has been found, or if Solve() has not been called.
Definition at line 200 of file ModelSolver.cs.
◆ DualValue()
The dual value of a linear constraint in the current solution. This raises a SolverException if no solution has been found, or if Solve() has not been called.
Definition at line 187 of file ModelSolver.cs.
◆ EnableOutput()
| void Google.OrTools.ModelBuilder.Solver.EnableOutput |
( |
bool | enable | ) |
|
|
inline |
Enables or disables the underlying solver output.
- Parameters
-
| enable | the Boolean that controls the output |
Definition at line 74 of file ModelSolver.cs.
◆ HasResponse()
| bool Google.OrTools.ModelBuilder.Solver.HasResponse |
( |
| ) |
|
|
inline |
Returns true if solve() was called, and a response was returned.
- Returns
- whether solve did happen
Definition at line 113 of file ModelSolver.cs.
◆ HasSolution()
| bool Google.OrTools.ModelBuilder.Solver.HasSolution |
( |
| ) |
|
|
inline |
Returns true if solve() was called, and a solution was returned.
- Returns
- whether a solution was found
Definition at line 122 of file ModelSolver.cs.
◆ InterruptSolve()
| bool Google.OrTools.ModelBuilder.Solver.InterruptSolve |
( |
| ) |
|
|
inline |
Tries to interrupt the solve. Returns true if the feature is supported.
- Returns
- whether the solver supports interruption
Definition at line 104 of file ModelSolver.cs.
◆ ReducedCost()
| double Google.OrTools.ModelBuilder.Solver.ReducedCost |
( |
Variable | var | ) |
|
|
inline |
The reduced cost of a variable in the current solution. This raises a SolverException if no solution has been found, or if Solve() has not been called.
Definition at line 174 of file ModelSolver.cs.
◆ SetSolverSpecificParameters()
| void Google.OrTools.ModelBuilder.Solver.SetSolverSpecificParameters |
( |
String | parameters | ) |
|
|
inline |
Sets solver specific parameters as string.
Definition at line 86 of file ModelSolver.cs.
◆ SetTimeLimitInSeconds()
| void Google.OrTools.ModelBuilder.Solver.SetTimeLimitInSeconds |
( |
double | limit | ) |
|
|
inline |
Sets the time limit for the solve in seconds.
Definition at line 80 of file ModelSolver.cs.
◆ Solve()
Solves given model, and returns the status of the response.
- Parameters
-
- Returns
- the status of the solve
Definition at line 52 of file ModelSolver.cs.
◆ SolverIsSupported()
| bool Google.OrTools.ModelBuilder.Solver.SolverIsSupported |
( |
| ) |
|
|
inline |
Returns whether solver specified during the ctor was found and correctly installed.
- Returns
- whether the solver is supported or not
Definition at line 95 of file ModelSolver.cs.
◆ Value()
| double Google.OrTools.ModelBuilder.Solver.Value |
( |
Variable | var | ) |
|
|
inline |
The value of a variable in the current solution. This raises a SolverException if no solution has been found, or if Solve() has not been called.
Definition at line 162 of file ModelSolver.cs.
◆ BestObjectiveBound
| double Google.OrTools.ModelBuilder.Solver.BestObjectiveBound |
|
get |
The best objective bound found during search. This raises a SolverException if no solution has been found, or if Solve() has not been called.
Definition at line 146 of file ModelSolver.cs.
◆ LogCallback
◆ ObjectiveValue
| double Google.OrTools.ModelBuilder.Solver.ObjectiveValue |
|
get |
The best objective value found during search. This raises a SolverException if no solution has been found, or if Solve() has not been called.
Definition at line 131 of file ModelSolver.cs.
◆ UserTime
| double Google.OrTools.ModelBuilder.Solver.UserTime |
|
get |
Returns the user time since the creation of the solver.
Definition at line 235 of file ModelSolver.cs.
◆ WallTime
| double Google.OrTools.ModelBuilder.Solver.WallTime |
|
get |
Returns the elapsed time since the creation of the solver.
Definition at line 225 of file ModelSolver.cs.
The documentation for this class was generated from the following file: