Java Reference
Java Reference
ModelSolver.java
Go to the documentation of this file.
Wrapper around a linear constraint stored in the ModelBuilderHelper instance.
Definition: LinearConstraint.java:17
double getDualValue(LinearConstraint ct)
Checks that the solver has found a solution, and returns the dual value of the given constraint.
Definition: ModelSolver.java:125
double getReducedCost(Variable var)
Checks that the solver has found a solution, and returns the reduced cost of the given variable.
Definition: ModelSolver.java:113
double getObjectiveValue()
Checks that the solver has found a solution, and returns the objective value.
Definition: ModelSolver.java:84
void enableOutput(boolean enable)
Enables or disables the underlying solver output.
Definition: ModelSolver.java:49
SolveStatus solve(ModelBuilder model)
Solves given model, and returns the status of the response.
Definition: ModelSolver.java:35
boolean hasSolution()
Returns true if solve() was called, and a solution was returned.
Definition: ModelSolver.java:79
double getValue(Variable var)
Checks that the solver has found a solution, and returns the value of the given variable.
Definition: ModelSolver.java:102
double getBestObjectiveBound()
Checks that the solver has found a solution, and returns the objective value.
Definition: ModelSolver.java:93
boolean hasResponse()
Returns true if solve() was called, and a response was returned.
Definition: ModelSolver.java:74
void setLogCallback(Consumer< String > cb)
Sets the log callback for the solver.
Definition: ModelSolver.java:145
ModelSolver(String solverName)
Creates the solver with the supplied solver backend.
Definition: ModelSolver.java:29
double getWallTime()
Returns the elapsed time since the creation of the solver.
Definition: ModelSolver.java:150
double getActivity(LinearConstraint ct)
Checks that the solver has found a solution, and returns the activity of the given constraint.
Definition: ModelSolver.java:136
void setTimeLimit(Duration limit)
Sets the time limit for the solve in seconds.
Definition: ModelSolver.java:54
void setSolverSpecificParameters(String parameters)
Sets solver specific parameters as string.
Definition: ModelSolver.java:59
double getUserTime()
Returns the user time since the creation of the solver.
Definition: ModelSolver.java:155
boolean solverIsSupported()
Returns whether solver specified during the ctor was found and correctly installed.
Definition: ModelSolver.java:64
int getIndex()
Returns the index of the variable in the underlying ModelBuilderHelper.
Definition: Variable.java:33