public class ConicSolver extends CplexSolver
constraints, cplex, linearCoefficients, linearPart, quadraticCoefficients, quadraticPart, x
Constructor and Description |
---|
ConicSolver()
Constructor by parameters.
|
ConicSolver(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 |
---|---|
void |
addConicObjective(ilog.concert.IloQuadNumExpr quadraticExpression,
double Omega)
Adds a conic constraint to the problem.
|
int |
getIterations()
Gets the number of iterations/nodes used to solve the problem.
|
double |
getLowerBound()
Gets the best lower bound for the objective value.
|
int |
getQPs()
Gets the number of QPs solved.
|
double |
getRootRelaxation()
Gets the value at the root node of branch and bound.
|
double[] |
getSol()
Gets the optimal solution for the problem.
|
long |
getTime()
Gets the time used to solve the problem.
|
double |
getUpperBound()
Gets the objective value of the best feasible solution.
|
void |
setTolerance(double tolerance)
Sets the tolerance for the solver.
|
void |
solve()
Solves the problem.
|
setConfiguration
public ConicSolver() throws ilog.concert.IloException
ilog.concert.IloException
- If an exception occurs.public ConicSolver(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 long getTime()
CplexSolver
getTime
in class CplexSolver
public double getUpperBound()
CplexSolver
getUpperBound
in class CplexSolver
public double getLowerBound()
CplexSolver
getLowerBound
in class CplexSolver
public int getIterations()
CplexSolver
getIterations
in class CplexSolver
public double[] getSol()
CplexSolver
getSol
in class CplexSolver
public double getRootRelaxation()
CplexSolver
getRootRelaxation
in class CplexSolver
public void solve() throws ilog.concert.IloException
CplexSolver
solve
in class CplexSolver
ilog.concert.IloException
public void addConicObjective(ilog.concert.IloQuadNumExpr quadraticExpression, double Omega) throws ilog.concert.IloException
quadraticExpression
- The quadratic expression for the conic
objective. Omega
- Coefficient for the conic term. ilog.concert.IloException
public int getQPs()
CplexSolver
getQPs
in class CplexSolver
public void setTolerance(double tolerance)
CplexSolver
setTolerance
in class CplexSolver
tolerance
- The tolerance to set.