public class QuadraticSolverBissectionBasic extends CplexSolver
Modifier and Type | Field and Description |
---|---|
protected double |
Omega
Nonlinear term.
|
constraints, cplex, linearCoefficients, linearPart, quadraticCoefficients, quadraticPart, x
Constructor and Description |
---|
QuadraticSolverBissectionBasic(double Omega,
double[] linearObjective)
Constructor by parameters.
|
QuadraticSolverBissectionBasic(double Omega,
double[] linearObjective,
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 |
---|---|
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 QuadraticSolverBissectionBasic(double Omega, double[] linearObjective) throws ilog.concert.IloException
Omega
- Coefficient of the nonlinear term. linearObjective
- Coefficients of the linear part of the objective.
ilog.concert.IloException
- If an exception occurs.public QuadraticSolverBissectionBasic(double Omega, double[] linearObjective, ilog.cplex.IloCplex cplex, ilog.concert.IloNumVar[] x, ilog.concert.IloRange[] constraints, ilog.concert.IloLinearNumExpr linearPart, ilog.concert.IloQuadNumExpr quadraticPart)
Omega
- Coefficient of the nonlinear term. linearObjective
- Coefficients of the linear part of the objective.
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 int getQPs()
getQPs
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 setTolerance(double tolerance)
CplexSolver
setTolerance
in class CplexSolver
tolerance
- The tolerance to set.