Java Reference
Java Reference
Detailed Description
Model solver class.
Definition at line 20 of file ModelSolver.java.
Classes | |
| class | ModelSolverException |
Public Member Functions | |
| ModelSolver (String solverName) | |
| Creates the solver with the supplied solver backend. More... | |
| SolveStatus | solve (ModelBuilder model) |
| Solves given model, and returns the status of the response. More... | |
| void | enableOutput (boolean enable) |
| Enables or disables the underlying solver output. More... | |
| void | setTimeLimit (Duration limit) |
| Sets the time limit for the solve in seconds. More... | |
| void | setSolverSpecificParameters (String parameters) |
| Sets solver specific parameters as string. More... | |
| boolean | solverIsSupported () |
| Returns whether solver specified during the ctor was found and correctly installed. More... | |
| boolean | interruptSolve () |
| Tries to interrupt the solve. More... | |
| boolean | hasResponse () |
| Returns true if solve() was called, and a response was returned. More... | |
| boolean | hasSolution () |
| Returns true if solve() was called, and a solution was returned. More... | |
| double | getObjectiveValue () |
| Checks that the solver has found a solution, and returns the objective value. More... | |
| double | getBestObjectiveBound () |
| Checks that the solver has found a solution, and returns the objective value. More... | |
| double | getValue (Variable var) |
| Checks that the solver has found a solution, and returns the value of the given variable. More... | |
| double | getReducedCost (Variable var) |
| Checks that the solver has found a solution, and returns the reduced cost of the given variable. More... | |
| double | getDualValue (LinearConstraint ct) |
| Checks that the solver has found a solution, and returns the dual value of the given constraint. More... | |
| double | getActivity (LinearConstraint ct) |
| Checks that the solver has found a solution, and returns the activity of the given constraint. More... | |
| void | setLogCallback (Consumer< String > cb) |
| Sets the log callback for the solver. More... | |
| double | getWallTime () |
| Returns the elapsed time since the creation of the solver. More... | |
| double | getUserTime () |
| Returns the user time since the creation of the solver. More... | |
Constructor & Destructor Documentation
◆ ModelSolver()
| ModelSolver | ( | String | solverName | ) |
Creates the solver with the supplied solver backend.
Definition at line 29 of file ModelSolver.java.
Member Function Documentation
◆ enableOutput()
| void enableOutput | ( | boolean | enable | ) |
Enables or disables the underlying solver output.
Definition at line 49 of file ModelSolver.java.
◆ getActivity()
| double getActivity | ( | LinearConstraint | ct | ) |
Checks that the solver has found a solution, and returns the activity of the given constraint.
Definition at line 136 of file ModelSolver.java.
◆ getBestObjectiveBound()
| double getBestObjectiveBound | ( | ) |
Checks that the solver has found a solution, and returns the objective value.
Definition at line 93 of file ModelSolver.java.
◆ getDualValue()
| double getDualValue | ( | LinearConstraint | ct | ) |
Checks that the solver has found a solution, and returns the dual value of the given constraint.
Definition at line 125 of file ModelSolver.java.
◆ getObjectiveValue()
| double getObjectiveValue | ( | ) |
Checks that the solver has found a solution, and returns the objective value.
Definition at line 84 of file ModelSolver.java.
◆ getReducedCost()
| double getReducedCost | ( | Variable | var | ) |
Checks that the solver has found a solution, and returns the reduced cost of the given variable.
Definition at line 113 of file ModelSolver.java.
◆ getUserTime()
| double getUserTime | ( | ) |
Returns the user time since the creation of the solver.
Definition at line 155 of file ModelSolver.java.
◆ getValue()
| double getValue | ( | Variable | var | ) |
Checks that the solver has found a solution, and returns the value of the given variable.
Definition at line 102 of file ModelSolver.java.
◆ getWallTime()
| double getWallTime | ( | ) |
Returns the elapsed time since the creation of the solver.
Definition at line 150 of file ModelSolver.java.
◆ hasResponse()
| boolean hasResponse | ( | ) |
Returns true if solve() was called, and a response was returned.
Definition at line 74 of file ModelSolver.java.
◆ hasSolution()
| boolean hasSolution | ( | ) |
Returns true if solve() was called, and a solution was returned.
Definition at line 79 of file ModelSolver.java.
◆ interruptSolve()
| boolean interruptSolve | ( | ) |
Tries to interrupt the solve.
Returns true if the feature is supported.
Definition at line 69 of file ModelSolver.java.
◆ setLogCallback()
| void setLogCallback | ( | Consumer< String > | cb | ) |
Sets the log callback for the solver.
Definition at line 145 of file ModelSolver.java.
◆ setSolverSpecificParameters()
| void setSolverSpecificParameters | ( | String | parameters | ) |
Sets solver specific parameters as string.
Definition at line 59 of file ModelSolver.java.
◆ setTimeLimit()
| void setTimeLimit | ( | Duration | limit | ) |
Sets the time limit for the solve in seconds.
Definition at line 54 of file ModelSolver.java.
◆ solve()
| SolveStatus solve | ( | ModelBuilder | model | ) |
Solves given model, and returns the status of the response.
Definition at line 35 of file ModelSolver.java.
◆ solverIsSupported()
| boolean solverIsSupported | ( | ) |
Returns whether solver specified during the ctor was found and correctly installed.
Definition at line 64 of file ModelSolver.java.
The documentation for this class was generated from the following file: