public abstract class CplexSolver
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
ilog.concert.IloRange[] |
constraints
Constraints.
|
ilog.cplex.IloCplex |
cplex
Pointer to cplexGeneral.
|
protected double[] |
linearCoefficients
Coefficients of the linear part of the objective, separable quadratic part.
|
ilog.concert.IloLinearNumExpr |
linearPart
Linear part of the conic quadratic term.
|
protected double[] |
quadraticCoefficients
Coefficients of the linear part of the objective, separable quadratic part.
|
ilog.concert.IloQuadNumExpr |
quadraticPart
Quadratic part.
|
ilog.concert.IloNumVar[] |
x
Variables.
|
Constructor and Description |
---|
CplexSolver()
Constructor by parameters.
|
CplexSolver(ilog.cplex.IloCplex cplex,
ilog.concert.IloNumVar[] x,
ilog.concert.IloRange[] constraints,
ilog.concert.IloLinearNumExpr linearPart,
ilog.concert.IloQuadNumExpr quadraticPart)
Constructor by parameters.
|
Modifier and Type | Method and Description |
---|---|
abstract int |
getIterations()
Gets the number of iterations/nodes used to solve the problem.
|
abstract double |
getLowerBound()
Gets the best lower bound for the objective value.
|
abstract int |
getQPs()
Gets the number of QPs solved.
|
abstract double |
getRootRelaxation()
Gets the value at the root node of branch and bound.
|
abstract double[] |
getSol()
Gets the optimal solution for the problem.
|
abstract long |
getTime()
Gets the time used to solve the problem.
|
abstract double |
getUpperBound()
Gets the objective value of the best feasible solution.
|
void |
setConfiguration(Main.ObjAlgorithm algorithm)
Sets the configuration of the CPLEX solver according to the algorithm.
|
abstract void |
setTolerance(double tolerance)
Sets the tolerance for the solver.
|
abstract void |
solve()
Solves the problem.
|
public ilog.cplex.IloCplex cplex
public ilog.concert.IloNumVar[] x
public ilog.concert.IloRange[] constraints
public ilog.concert.IloLinearNumExpr linearPart
public ilog.concert.IloQuadNumExpr quadraticPart
protected double[] linearCoefficients
protected double[] quadraticCoefficients
public CplexSolver() throws ilog.concert.IloException
ilog.concert.IloException
public CplexSolver(ilog.cplex.IloCplex cplex, ilog.concert.IloNumVar[] x, ilog.concert.IloRange[] constraints, ilog.concert.IloLinearNumExpr linearPart, ilog.concert.IloQuadNumExpr quadraticPart)
cplex
- The cplex object. x
- The variables. constraints
- The constraints. linearPart
- The linear part. quadraticPart
- The quadratic part.public abstract long getTime()
public abstract double getUpperBound()
public abstract double getLowerBound()
public abstract double getRootRelaxation()
public abstract int getIterations()
public abstract int getQPs()
public abstract double[] getSol()
public abstract void setTolerance(double tolerance)
tolerance
- The tolerance to set.public abstract void solve() throws ilog.concert.IloException
ilog.concert.IloException
public void setConfiguration(Main.ObjAlgorithm algorithm) throws ilog.concert.IloException
algorithm
- The algorithm. ilog.concert.IloException