Model.Model()
Constructor of model.
Synopsis
Model(Envr env, String name)
Arguments
env
: associated environment object.
name
: string of model name.
Model.addAffineCone()
Add an affine cone constraint to model.
Synopsis
AffineCone addAffineCone(AffineConeBuilder builder, String name)
Arguments
builder
: builder for new affine cone constraint.
name
: name of new affine cone.Return
new affine cone constraint object.
Model.addAffineCone()
Add an affine cone constraint to model.
Synopsis
AffineCone addAffineCone(
Expr[] exprs,
int type,
String name)
Arguments
exprs
: linear expressioins that participate in the affine cone constraint.
type
: type of an affine cone constraint.
name
: name of new affine cone.Return
new affine cone constraint object.
Model.addAffineCone()
Add an affine cone constraint to model.
Synopsis
AffineCone addAffineCone(
PsdExpr[] exprs,
int type,
String name)
Arguments
exprs
: PSD expressioins that participate in the affine cone constraint.
type
: type of an affine cone constraint.
name
: name of new affine cone.Return
new affine cone constraint object.
Model.addCone()
Add a cone constraint to model.
Synopsis
Cone addCone(
int dim,
int type,
char[] pvtype,
String prefix)
Arguments
dim
: dimension of the cone constraint.
type
: type of a cone constraint.
pvtype
: types of variables in the cone.
prefix
: name prefix of variables in the cone.Return
new cone constraint object.
Model.addCone()
Add a cone constraint to model.
Synopsis
Cone addCone(ConeBuilder builder)
Arguments
builder
: builder for new cone constraint.Return
new cone constraint object.
Model.addCone()
Add a cone constraint to model.
Synopsis
Cone addCone(Var[] vars, int type)
Arguments
vars
: variables that participate in the cone constraint.
type
: type of a cone constraint.Return
new cone constraint object.
Model.addCone()
Add a cone constraint to model.
Synopsis
Cone addCone(VarArray vars, int type)
Arguments
vars
: variables that participate in the cone constraint.
type
: type of a cone constraint.Return
new cone constraint object.
Model.addConstr()
Add a linear constraint to model.
Synopsis
Constraint addConstr(
Expr expr,
char sense,
double rhs,
String name)
Arguments
expr
: expression for the new contraint.
sense
: sense for new linear constraint, other than range sense.
rhs
: right hand side value for the new constraint.
name
: name of new constraint.Return
new constraint object.
Model.addConstr()
Add a linear constraint to model.
Synopsis
Constraint addConstr(
Expr expr,
char sense,
Var var,
String name)
Arguments
expr
: expression for the new contraint.
sense
: sense for new linear constraint, other than range sense.
var
: varible for the new constraint.
name
: name of new constraint.Return
new constraint object.
Model.addConstr()
Add a linear constraint to model.
Synopsis
Constraint addConstr(
Expr lhs,
char sense,
Expr rhs,
String name)
Arguments
lhs
: left hand side expression for the new constraint.
sense
: sense for new linear constraint, other than range sense.
rhs
: right hand side expression for the new constraint.
name
: name of new constraint.Return
new constraint object.
Model.addConstr()
Add a linear constraint to model.
Synopsis
Constraint addConstr(
Expr expr,
double lb,
double ub,
String name)
Arguments
expr
: expression for the new constraint.
lb
: lower bound for the new constraint.
ub
: upper bound for the new constraint
name
: name of new constraint.Return
new constraint object.
Model.addConstr()
Add a linear constraint to a model.
Synopsis
Constraint addConstr(ConstrBuilder builder, String name)
Arguments
builder
: builder for the new constraint.
name
: name of new constraint.Return
new constraint object.
Model.addConstrs()
Add linear constraints to model.
Synopsis
ConstrArray addConstrs(
int count,
char[] senses,
double[] rhss,
String prefix)
Arguments
count
: number of constraints added to model.
senses
: sense array for new linear constraints, other than range sense.
rhss
: right hand side values for new variables.
prefix
: name prefix for new constraints.Return
array of new constraint objects.
Model.addConstrs()
Add linear constraints to a model.
Synopsis
ConstrArray addConstrs(
int count,
double[] lbs,
double[] ubs,
String prefix)
Arguments
count
: number of constraints added to the model.
lbs
: lower bounds of new constraints.
ubs
: upper bounds of new constraints.
prefix
: name prefix for new constraints.Return
array of new constraint objects.
Model.addConstrs()
Add linear constraints to a model.
Synopsis
ConstrArray addConstrs(ConstrBuilderArray builders, String prefix)
Arguments
builders
: builders for new constraints.
prefix
: name prefix for new constraints.Return
array of new constraint objects.
Model.addDenseMat()
Add a dense symmetric matrix to a model.
Synopsis
SymMatrix addDenseMat(int dim, double[] vals)
Arguments
dim
: dimension of the dense symmetric matrix.
vals
: array of non-zero elements, filled in column-wise up to len or max length of symmetric matrix.Return
new symmetric matrix object.
Model.addDenseMat()
Add a dense symmetric matrix to a model.
Synopsis
SymMatrix addDenseMat(int dim, double val)
Arguments
dim
: dimension of dense symmetric matrix.
val
: value to fill dense symmetric matrix.Return
new symmetric matrix object.
Model.addDiagMat()
Add a diagonal matrix to a model.
Synopsis
SymMatrix addDiagMat(int dim, double val)
Arguments
dim
: dimension of diagonal matrix.
val
: value to fill diagonal elements.Return
new diagonal matrix object.
Model.addDiagMat()
Add a diagonal matrix to a model.
Synopsis
SymMatrix addDiagMat(int dim, double[] vals)
Arguments
dim
: dimension of diagonal matrix.
vals
: array of values of diagonal elements.Return
new diagonal matrix object.
Model.addDiagMat()
Add a diagonal matrix to a model.
Synopsis
SymMatrix addDiagMat(
int dim,
double val,
int offset)
Arguments
dim
: dimension of diagonal matrix.
val
: value to fill diagonal elements.
offset
: shift distance against diagonal line.Return
new diagonal matrix object.
Model.addDiagMat()
Add a diagonal matrix to a model.
Synopsis
SymMatrix addDiagMat(
int dim,
double[] vals,
int offset)
Arguments
dim
: dimension of diagonal matrix.
vals
: array of values of diagonal elements.
offset
: shift distance against diagonal line.Return
new diagonal matrix object.
Model.addExpCone()
Add an exponential cone constraint to model.
Synopsis
ExpCone addExpCone(
int type,
char[] pvtype,
String prefix)
Arguments
type
: type of an exponential cone constraint.
pvtype
: types of variables in the exponential cone.
prefix
: name prefix of variables in the exponential cone.Return
new exponential cone constraint object.
Model.addExpCone()
Add an exponential cone constraint to model.
Synopsis
ExpCone addExpCone(ExpConeBuilder builder)
Arguments
builder
: builder for new exponential cone constraint.Return
new exponential cone constraint object.
Model.addExpCone()
Add an exponential cone constraint to model.
Synopsis
ExpCone addExpCone(Var[] vars, int type)
Arguments
vars
: variables that participate in the exponential cone constraint.
type
: type of an exponential cone constraint.Return
new exponential cone constraint object.
Model.addExpCone()
Add an exponential cone constraint to model.
Synopsis
ExpCone addExpCone(VarArray vars, int type)
Arguments
vars
: variables that participate in the exponential cone constraint.
type
: type of an exponential cone constraint.Return
new exponential cone constraint object.
Model.addEyeMat()
Add an identity matrix to a model.
Synopsis
SymMatrix addEyeMat(int dim)
Arguments
dim
: dimension of identity matrix.Return
new identity matrix object.
Model.addGenConstrIndicator()
Add a general constraint of type indicator to model.
Synopsis
GenConstr addGenConstrIndicator(GenConstrBuilder builder, String name)
Arguments
builder
: builder for the general constraint.
name
: name of new general constraint.Return
new general constraint object of type indicator.
Model.addGenConstrIndicator()
Add a general constraint of type indicator to model.
Synopsis
GenConstr addGenConstrIndicator(
Var binvar,
int binval,
ConstrBuilder builder,
int type,
String name)
Arguments
binvar
: binary indicator variable.
binval
: value for binary indicator variable that force a linear constraint to be satisfied(0 or 1).
builder
: builder for linear constraint.
type
: type of general constraint.
name
: name of new general constraint.Return
new general constraint object of type indicator.
Model.addGenConstrIndicator()
Add a general constraint of type indicator to model.
Synopsis
GenConstr addGenConstrIndicator(
Var binvar,
int binval,
Expr expr,
char sense,
double rhs,
int type,
String name)
Arguments
binvar
: binary indicator variable.
binval
: value for binary indicator variable that force a linear constraint to be satisfied(0 or 1).
expr
: expression for new linear contraint.
sense
: sense for new linear constraint.
rhs
: right hand side value for new linear constraint.
type
: type of general constraint.
name
: name of new general constraint.Return
new general constraint object of type indicator.
Model.addGenConstrIndicators()
Add general constraints to a model.
Synopsis
GenConstrArray addGenConstrIndicators(GenConstrBuilderArray builders, String prefix)
Arguments
builders
: builders for new general constraints.
prefix
: name prefix for new general constraints.Return
array of new general constraint objects.
Model.addLazyConstr()
Add a lazy constraint to model.
Synopsis
void addLazyConstr(
Expr lhs,
char sense,
double rhs,
String name)
Arguments
lhs
: expression for lazy contraint.
sense
: sense for lazy constraint.
rhs
: right hand side value for lazy constraint.
name
: name of lazy constraint.
Model.addLazyConstr()
Add a lazy constraint to model.
Synopsis
void addLazyConstr(
Expr lhs,
char sense,
Expr rhs,
String name)
Arguments
lhs
: left hand side expression for lazy contraint.
sense
: sense for lazy constraint.
rhs
: right hand side expression for lazy contraint.
name
: name of lazy constraint.
Model.addLazyConstr()
Add a lazy constraint to model.
Synopsis
void addLazyConstr(ConstrBuilder builder, String name)
Arguments
builder
: builder for lazy contraint.
name
: name of lazy constraint.
Model.addLazyConstrs()
Add lazy constraints to model.
Synopsis
void addLazyConstrs(ConstrBuilderArray builders, String prefix)
Arguments
builders
: array of builders for lazy contraints.
prefix
: name prefix of new lazy constraints.
Model.addLmiConstr()
Add an LMI constraint to model.
Synopsis
LmiConstraint addLmiConstr(LmiExpr expr, String name)
Arguments
expr
: LMI expression for new LMI contraint.
name
: name of new LMI constraint.Return
new LMI constraint object.
Model.addOnesMat()
Add a dense symmetric matrix of value one to a model.
Synopsis
SymMatrix addOnesMat(int dim)
Arguments
dim
: dimension of dense symmetric matrix.Return
new symmetric matrix object.
Model.addPsdConstr()
Add a PSD constraint to model.
Synopsis
PsdConstraint addPsdConstr(
PsdExpr expr,
char sense,
double rhs,
String name)
Arguments
expr
: PSD expression for new PSD contraint.
sense
: sense for new PSD constraint.
rhs
: double value at right side of the new PSD constraint.
name
: name of new PSD constraint.Return
new PSD constraint object.
Model.addPsdConstr()
Add a PSD constraint to model.
Synopsis
PsdConstraint addPsdConstr(
PsdExpr expr,
double lb,
double ub,
String name)
Arguments
expr
: expression for new PSD constraint.
lb
: lower bound for ew PSD constraint.
ub
: upper bound for new PSD constraint
name
: name of new PSD constraint.Return
new PSD constraint object.
Model.addPsdConstr()
Add a PSD constraint to model.
Synopsis
PsdConstraint addPsdConstr(
PsdExpr lhs,
char sense,
PsdExpr rhs,
String name)
Arguments
lhs
: PSD expression at left side of new PSD constraint.
sense
: sense for new PSD constraint.
rhs
: PSD expression at right side of new PSD constraint.
name
: name of new PSD constraint.Return
new PSD constraint object.
Model.addPsdConstr()
Add a PSD constraint to a model.
Synopsis
PsdConstraint addPsdConstr(PsdConstrBuilder builder, String name)
Arguments
builder
: builder for new PSD constraint.
name
: name of new PSD constraint.Return
new PSD constraint object.
Model.addPsdVar()
Add a new PSD variable to model.
Synopsis
PsdVar addPsdVar(int dim, String name)
Arguments
dim
: dimension of new PSD variable.
name
: name of new PSD variable.Return
PSD variable object.
Model.addPsdVars()
Add new PSD variables to model.
Synopsis
PsdVarArray addPsdVars(
int count,
int[] dims,
String prefix)
Arguments
count
: number of new PSD variables.
dims
: array of dimensions of new PSD variables.
prefix
: name prefix of new PSD variables.Return
array of PSD variable objects.
Model.addQConstr()
Add a quadratic constraint to model.
Synopsis
QConstraint addQConstr(
QuadExpr expr,
char sense,
double rhs,
String name)
Arguments
expr
: quadratic expression for the new contraint.
sense
: sense for new quadratic constraint.
rhs
: double value at right side of the new quadratic constraint.
name
: name of new quadratic constraint.Return
new quadratic constraint object.
Model.addQConstr()
Add a quadratic constraint to model.
Synopsis
QConstraint addQConstr(
QuadExpr lhs,
char sense,
QuadExpr rhs,
String name)
Arguments
lhs
: quadratic expression at left side of new quadratic constraint.
sense
: sense for new quadratic constraint.
rhs
: quadratic expression at right side of new quadratic constraint.
name
: name of new quadratic constraint.Return
new quadratic constraint object.
Model.addQConstr()
Add a quadratic constraint to a model.
Synopsis
QConstraint addQConstr(QConstrBuilder builder, String name)
Arguments
builder
: builder for the new quadratic constraint.
name
: name of new quadratic constraint.Return
new quadratic constraint object.
Model.addSos()
Add a SOS constraint to model.
Synopsis
Sos addSos(SosBuilder builder)
Arguments
builder
: builder for new SOS constraint.Return
new SOS constraint object.
Model.addSos()
Add a SOS constraint to model.
Synopsis
Sos addSos(
Var[] vars,
double[] weights,
int type)
Arguments
vars
: variables that participate in the SOS constraint.
weights
: weights for variables in the SOS constraint.
type
: type of SOS constraint.Return
new SOS constraint object.
Model.addSos()
Add a SOS constraint to model.
Synopsis
Sos addSos(
VarArray vars,
double[] weights,
int type)
Arguments
vars
: variables that participate in the SOS constraint.
weights
: weights for variables in the SOS constraint.
type
: type of SOS constraint.Return
new SOS constraint object.
Model.addSparseMat()
Add a sparse symmetric matrix to a model.
Synopsis
SymMatrix addSparseMat(
int dim,
int nElems,
int[] rows,
int[] cols,
double[] vals)
Arguments
dim
: dimension of the sparse symmetric matrix.
nElems
: number of non-zero elements in the sparse symmetric matrix.
rows
: array of row indexes of non-zero elements.
cols
: array of col indexes of non-zero elements.
vals
: array of values of non-zero elements.Return
new symmetric matrix object.
Model.addSymMat()
Given a symmetric matrix expression, add results matrix to model.
Synopsis
SymMatrix addSymMat(SymMatExpr expr)
Arguments
expr
: symmetric matrix expression object.Return
results symmetric matrix object.
Model.addUserCut()
Add a user cut to model.
Synopsis
void addUserCut(
Expr lhs,
char sense,
double rhs,
String name)
Arguments
lhs
: expression for user cut.
sense
: sense for user cut.
rhs
: right hand side value for user cut.
name
: name of user cut.
Model.addUserCut()
Add a user cut to model.
Synopsis
void addUserCut(
Expr lhs,
char sense,
Expr rhs,
String name)
Arguments
lhs
: left hand side expression for user cut.
sense
: sense for user cut.
rhs
: right hand side expression for user cut.
name
: name of user cut.
Model.addUserCut()
Add a user cut to model.
Synopsis
void addUserCut(ConstrBuilder builder, String name)
Arguments
builder
: builder for user cut.
name
: name of user cut.
Model.addUserCuts()
Add user cuts to model.
Synopsis
void addUserCuts(ConstrBuilderArray builders, String prefix)
Arguments
builders
: array of builders for user cuts.
prefix
: name prefix of new user cuts.
Model.addVar()
Add a variable and the associated non-zero coefficients as column.
Synopsis
Var addVar(
double lb,
double ub,
double obj,
char vtype,
String name)
Arguments
lb
: lower bound for new variable.
ub
: upper bound for new variable.
obj
: objective coefficient for new variable.
vtype
: variable type for new variable.
name
: name for new variable.Return
new variable object.
Model.addVar()
Add a variable and the associated non-zero coefficients as column.
Synopsis
Var addVar(
double lb,
double ub,
double obj,
char vtype,
Column col,
String name)
Arguments
lb
: lower bound for new variable.
ub
: upper bound for new variable.
obj
: objective coefficient for new variable.
vtype
: variable type for new variable.
col
: column object for specifying a set of constraints to which the variable belongs.
name
: name for new variable.Return
new variable object.
Model.addVars()
Add new variables to model.
Synopsis
VarArray addVars(
int count,
char vtype,
String prefix)
Arguments
count
: the number of variables to add.
vtype
: variable types for new variables.
prefix
: prefix part for names of new variables.Return
array of new variable objects.
Model.addVars()
Add new variables to model.
Synopsis
VarArray addVars(
int count,
double lb,
double ub,
double obj,
char vtype,
String prefix)
Arguments
count
: the number of variables to add.
lb
: lower bound for new variables.
ub
: upper bound for new variables.
obj
: objective coefficient for new variables.
vtype
: variable type for new variables.
prefix
: prefix part for names of new variables.Return
array of new variable objects.
Model.addVars()
Add new variables to model.
Synopsis
VarArray addVars(
int count,
double[] lbs,
double[] ubs,
double[] objs,
char[] types,
String prefix)
Arguments
count
: the number of variables to add.
lbs
: lower bounds for new variables. if NULL, lower bounds are 0.0.
ubs
: upper bounds for new variables. if NULL, upper bounds are infinity or 1 for binary variables.
objs
: objective coefficients for new variables. if NULL, objective coefficients are 0.0.
types
: variable types for new variables. if NULL, variable types are continuous.
prefix
: prefix part for names of new variables.Return
array of new variable objects.
Model.addVars()
Add new variables to model.
Synopsis
VarArray addVars(
double[] lbs,
double[] ubs,
double[] objs,
char[] types,
Column[] cols,
String prefix)
Arguments
lbs
: lower bounds for new variables. if NULL, lower bounds are 0.0.
ubs
: upper bounds for new variables. if NULL, upper bounds are infinity or 1 for binary variables.
objs
: objective coefficients for new variables. if NULL, objective coefficients are 0.0.
types
: variable types for new variables. if NULL, variable types are continuous.
cols
: column objects for specifying a set of constraints to which each new variable belongs.
prefix
: prefix part for names of new variables.Return
array of new variable objects.
Model.addVars()
Add new variables to model.
Synopsis
VarArray addVars(
double[] lbs,
double[] ubs,
double[] objs,
char[] types,
ColumnArray cols,
String prefix)
Arguments
lbs
: lower bounds for new variables. if NULL, lower bounds are 0.0.
ubs
: upper bounds for new variables. if NULL, upper bounds are infinity or 1 for binary variables.
objs
: objective coefficients for new variables. if NULL, objective coefficients are 0.0.
types
: variable types for new variables. if NULL, variable types are continuous.
cols
: columnarray for specifying a set of constraints to which each new variable belongs.
prefix
: prefix part for names of new variables.Return
array of new variable objects.
Model.clear()
Clear all settings including problem itself.
Synopsis
void clear()
Model.clone()
Deep copy COPT model.
Synopsis
Model clone()
Return
cloned model object.
Model.computeIIS()
Compute IIS for infeasible model.
Synopsis
void computeIIS()
Model.delPsdObj()
delete PSD part of objective in model.
Synopsis
void delPsdObj()
Model.delQuadObj()
delete quadratic part of objective in model.
Synopsis
void delQuadObj()
Model.feasRelax()
Compute feasibility relaxation for infeasible model.
Synopsis
void feasRelax(
VarArray vars,
double[] colLowPen,
double[] colUppPen,
ConstrArray cons,
double[] rowBndPen,
double[] rowUppPen)
Arguments
vars
: an array of variables.
colLowPen
: penalties for lower bounds of variables.
colUppPen
: penalties for upper bounds of variables.
cons
: an array of constraints.
rowBndPen
: penalties for right hand sides of constraints.
rowUppPen
: penalties for upper bounds of range constraints.
Model.feasRelax()
Compute feasibility relaxation for infeasible model.
Synopsis
void feasRelax(int ifRelaxVars, int ifRelaxCons)
Arguments
ifRelaxVars
: whether to relax variables.
ifRelaxCons
: whether to relax constraints.
Model.get()
Query values of information associated with variables.
Synopsis
double[] get(String name, Var[] vars)
Arguments
name
: name of information.
vars
: a list of interested variables.Return
values of information.
Model.get()
Query values of information associated with variables.
Synopsis
double[] get(String name, VarArray vars)
Arguments
name
: name of information.
vars
: array of interested variables.Return
values of information.
Model.get()
Query values of information associated with constraints.
Synopsis
double[] get(String name, Constraint[] constrs)
Arguments
name
: name of information.
constrs
: a list of interested constraints.Return
values of information.
Model.get()
Query values of information associated with constraints.
Synopsis
double[] get(String name, ConstrArray constrs)
Arguments
name
: name of information.
constrs
: array of interested constraints.Return
values of information.
Model.get()
Query values of information associated with quadratic constraints.
Synopsis
double[] get(String name, QConstraint[] constrs)
Arguments
name
: name of information.
constrs
: a list of interested quadratic constraints.Return
values of information.
Model.get()
Query values of information associated with quadratic constraints.
Synopsis
double[] get(String name, QConstrArray constrs)
Arguments
name
: name of information.
constrs
: array of interested quadratic constraints.Return
values of information.
Model.get()
Query values of information associated with PSD constraints.
Synopsis
double[] get(String name, PsdConstraint[] constrs)
Arguments
name
: name of information.
constrs
: a list of desired PSD constraints.Return
output array of information values.
Model.get()
Query values of information associated with PSD constraints.
Synopsis
double[] get(String name, PsdConstrArray constrs)
Arguments
name
: name of information.
constrs
: a list of desired PSD constraints.Return
output array of information values.
Model.getAffineCone()
Get an affine cone constraint of given index in model.
Synopsis
AffineCone getAffineCone(int idx)
Arguments
idx
: index of the desired affine cone constraint.Return
the desired affine cone constraint object.
Model.GetAffineConeBuilder()
Get builder of given affine cone constraint in model.
Synopsis
AffineConeBuilder GetAffineConeBuilder(AffineCone cone)
Arguments
cone
: affine cone constraint.Return
desired affine cone constraint builder.
Model.GetAffineConeBuilders()
Get builders of all affine cone constraints in model.
Synopsis
AffineConeBuilderArray GetAffineConeBuilders()
Return
array object of affine cone constraint builders.
Model.getAffineConeBuilders()
Get builders of given affine cone constraints in model.
Synopsis
AffineConeBuilderArray getAffineConeBuilders(AffineCone[] cones)
Arguments
cones
: array of affine cone constraints.Return
array object of desired affine cone constraint builders.
Model.getAffineConeBuilders()
Get builders of given affine cone constraints in model.
Synopsis
AffineConeBuilderArray getAffineConeBuilders(AffineConeArray cones)
Arguments
cones
: array of affine cone constraints.Return
array object of desired affine cone constraint builders.
Model.getAffineConeByName()
Get an affine cone constraint of given name in model.
Synopsis
AffineCone getAffineConeByName(String name)
Arguments
name
: name of the desired affine cone constraint.Return
the desired affine cone constraint object.
Model.getAffineCones()
Get all affine cone constraints in model.
Synopsis
AffineConeArray getAffineCones()
Return
array object of affine cone constraints.
Model.getCoeff()
Get the coefficient of variable in linear constraint.
Synopsis
double getCoeff(Constraint constr, Var var)
Arguments
constr
: The requested constraint.
var
: The requested variable.Return
The requested coefficient.
Model.getCol()
Get a column object that have a list of constraints in which the variable participates.
Synopsis
Column getCol(Var var)
Arguments
var
: a variable object.Return
a column object associated with a variable.
Model.getColBasis()
Get status of column basis.
Synopsis
int[] getColBasis()
Return
basis status.
Model.getCone()
Get a cone constraint of given index in model.
Synopsis
Cone getCone(int idx)
Arguments
idx
: index of the desired cone constraint.Return
the desired cone constraint object.
Model.getConeBuilders()
Get builders of all cone constraints in model.
Synopsis
ConeBuilderArray getConeBuilders()
Return
array object of cone constraint builders.
Model.getConeBuilders()
Get builders of given cone constraints in model.
Synopsis
ConeBuilderArray getConeBuilders(Cone[] cones)
Arguments
cones
: array of cone constraints.Return
array object of desired cone constraint builders.
Model.getConeBuilders()
Get builders of given cone constraints in model.
Synopsis
ConeBuilderArray getConeBuilders(ConeArray cones)
Arguments
cones
: array of cone constraints.Return
array object of desired cone constraint builders.
Model.getCones()
Get all cone constraints in model.
Synopsis
ConeArray getCones()
Return
array object of cone constraints.
Model.getConstr()
Get a constraint of given index in model.
Synopsis
Constraint getConstr(int idx)
Arguments
idx
: index of the desired constraint.Return
the desired constraint object.
Model.getConstrBuilder()
Get builder of a constraint in model, including variables and associated coefficients, sense and RHS.
Synopsis
ConstrBuilder getConstrBuilder(Constraint constr)
Arguments
constr
: a constraint object.Return
constraint builder object.
Model.getConstrBuilders()
Get builders of all constraints in model.
Synopsis
ConstrBuilderArray getConstrBuilders()
Return
array object of constraint builders.
Model.getConstrByName()
Get a constraint of given name in model.
Synopsis
Constraint getConstrByName(String name)
Arguments
name
: name of the desired constraint.Return
the desired constraint object.
Model.getConstrLowerIIS()
Get IIS status of lower bounds of constraints.
Synopsis
int[] getConstrLowerIIS(ConstrArray constrs)
Arguments
constrs
: Array of constraints.Return
IIS status of lower bounds of constraints.
Model.getConstrLowerIIS()
Get IIS status of lower bounds of constraints.
Synopsis
int[] getConstrLowerIIS(Constraint[] constrs)
Arguments
constrs
: Array of constraints.Return
IIS status of lower bounds of constraints.
Model.getConstrs()
Get all constraints in model.
Synopsis
ConstrArray getConstrs()
Return
array object of constraints.
Model.getConstrUpperIIS()
Get IIS status of upper bounds of constraints.
Synopsis
int[] getConstrUpperIIS(ConstrArray constrs)
Arguments
constrs
: Array of constraints.Return
IIS status of upper bounds of constraints.
Model.getConstrUpperIIS()
Get IIS status of upper bounds of constraints.
Synopsis
int[] getConstrUpperIIS(Constraint[] constrs)
Arguments
constrs
: Array of constraints.Return
IIS status of upper bounds of constraints.
Model.getDblAttr()
Get value of a COPT double attribute.
Synopsis
double getDblAttr(String attr)
Arguments
attr
: name of double attribute.Return
value of double attribute.
Model.getDblParam()
Get value of a COPT double parameter.
Synopsis
double getDblParam(String param)
Arguments
param
: name of double parameter.Return
value of double parameter.
Model.getDblParamInfo()
Get current, default, minimum, maximum of COPT double parameter.
Synopsis
double[] getDblParamInfo(String name)
Arguments
name
: name of integer parameter.Return
current, default, minimum, maximum of COPT double parameter.
Model.getExpCone()
Get an exponential cone constraint of given index in model.
Synopsis
ExpCone getExpCone(int idx)
Arguments
idx
: index of the desired exponential cone constraint.Return
the desired exponential cone constraint object.
Model.getExpConeBuilders()
Get builders of all exponential cone constraints in model.
Synopsis
ExpConeBuilderArray getExpConeBuilders()
Return
array object of exponential cone constraint builders.
Model.getExpConeBuilders()
Get builders of given exponential cone constraints in model.
Synopsis
ExpConeBuilderArray getExpConeBuilders(ExpCone[] cones)
Arguments
cones
: array of exponential cone constraints.Return
array object of desired exponential cone constraint builders.
Model.getExpConeBuilders()
Get builders of given exponential cone constraints in model.
Synopsis
ExpConeBuilderArray getExpConeBuilders(ExpConeArray cones)
Arguments
cones
: array of exponential cone constraints.Return
array object of desired exponential cone constraint builders.
Model.getExpCones()
Get all exponential cone constraints in model.
Synopsis
ExpConeArray getExpCones()
Return
array object of exponential cone constraints.
Model.getGenConstr()
Get a general constraint of given index in model.
Synopsis
GenConstr getGenConstr(int idx)
Arguments
idx
: index of the desired general constraint.Return
the desired general constraint object.
Model.getGenConstrByName()
Get a general constraint of given name in model.
Synopsis
GenConstr getGenConstrByName(String name)
Arguments
name
: name of the desired general constraint.Return
the desired general constraint object.
Model.getGenConstrIndicator()
Get builder of given general constraint of type indicator.
Synopsis
GenConstrBuilder getGenConstrIndicator(GenConstr indicator)
Arguments
indicator
: a general constraint of type indicator.Return
builder object of general constraint of type indicator.
Model.getGenConstrIndicators()
Get builders of all general constraints in model.
Synopsis
GenConstrBuilderArray getGenConstrIndicators()
Return
array object of general constraint builders.
Model.getGenConstrs()
Get all general constraints in model.
Synopsis
GenConstrArray getGenConstrs()
Return
array object of general constraints.
Model.getIndicatorIIS()
Get IIS status of indicator constraints.
Synopsis
int[] getIndicatorIIS(GenConstrArray genconstrs)
Arguments
genconstrs
: Array of indicator constraints.Return
IIS status of indicator constraints.
Model.getIndicatorIIS()
Get IIS status of indicator constraints.
Synopsis
int[] getIndicatorIIS(GenConstr[] genconstrs)
Arguments
genconstrs
: Array of indicator constraints.Return
IIS status of indicator constraints.
Model.getIntAttr()
Get value of a COPT integer attribute
Synopsis
int getIntAttr(String attr)
Arguments
attr
: name of integer attribute.Return
value of integer attribute.
Model.getIntParam()
Get value of a COPT integer parameter.
Synopsis
int getIntParam(String param)
Arguments
param
: name of integer parameter.Return
value of integer parameter.
Model.getIntParamInfo()
Get current, default, minimum, maximum of COPT integer parameter.
Synopsis
int[] getIntParamInfo(String name)
Arguments
name
: name of integer parameter.Return
current, default, minimum, maximum of COPT integer parameter.
Model.getLmiCoeff()
Get the symmetric matrix of variable in LMI constraint.
Synopsis
SymMatrix getLmiCoeff(LmiConstraint constr, Var var)
Arguments
constr
: The desired LMI constraint.
var
: The desired variable.Return
The associated coefficient matrix.
Model.getLmiConstr()
Get LMI constraint of given index in model.
Synopsis
LmiConstraint getLmiConstr(int idx)
Arguments
idx
: index of desired LMI constraint.Return
LMI constraint object.
Model.getLmiConstrByName()
Get LMI constraint of given name in model.
Synopsis
LmiConstraint getLmiConstrByName(String name)
Arguments
name
: name of desired LMI constraint.Return
LMI constraint object.
Model.getLmiConstrs()
Get all LMI constraints in model.
Synopsis
LmiConstrArray getLmiConstrs()
Return
array object of LMI constraints.
Model.getLmiRhs()
Get the symmetric matrix of constant of LMI constraint.
Synopsis
SymMatrix getLmiRhs(LmiConstraint constr)
Arguments
constr
: The desired LMI constraint.Return
matrix of constant term.
Model.getLmiRow()
Get variables and associated symmetric matrices that participate in a LMI constraint.
Synopsis
LmiExpr getLmiRow(LmiConstraint constr)
Arguments
constr
: given LMI constraint object.Return
LMI expression object of the LMI constraint.
Model.getLmiSolution()
Get LMI solution.
Synopsis
Object[] getLmiSolution()
Return
slack and dual values.
Model.getLpSolution()
Get LP solution.
Synopsis
Object[] getLpSolution()
Return
solution, slack, dual and reduced values.
Model.getObjective()
Get linear expression of objective for model.
Synopsis
Expr getObjective()
Return
an linear expression object.
Model.getPoolObjVal()
Get the idx-th objective value in solution pool.
Synopsis
double getPoolObjVal(int idx)
Arguments
idx
: Index of solution.Return
The requested objective value.
Model.getPoolSolution()
Get the idx-th solution in solution pool.
Synopsis
double[] getPoolSolution(int idx, VarArray vars)
Arguments
idx
: Index of solution.
vars
: The requested variables.Return
The requested solution.
Model.getPoolSolution()
Get the idx-th solution in solution pool.
Synopsis
double[] getPoolSolution(int idx, Var[] vars)
Arguments
idx
: Index of solution.
vars
: The requested variables.Return
The requested solution.
Model.getPsdCoeff()
Get the symmetric matrix of PSD variable in a PSD constraint.
Synopsis
SymMatrix getPsdCoeff(PsdConstraint constr, PsdVar var)
Arguments
constr
: The desired PSD constraint.
var
: The desired PSD variable.Return
The associated coefficient matrix.
Model.getPsdConstr()
Get PSD constraint of given index in model.
Synopsis
PsdConstraint getPsdConstr(int idx)
Arguments
idx
: index of desired PSD constraint.Return
PSD constraint object.
Model.getPsdConstrBuilder()
Get builder of a PSD constraint in model, including PSD variables, sense and associated symmtric matrix.
Synopsis
PsdConstrBuilder getPsdConstrBuilder(PsdConstraint constr)
Arguments
constr
: a PSD constraint object.Return
PSD constraint builder object.
Model.getPsdConstrBuilders()
Get builders of all PSD constraints in model.
Synopsis
PsdConstrBuilderArray getPsdConstrBuilders()
Return
array object of PSD constraint builders.
Model.getPsdConstrByName()
Get PSD constraint of given name in model.
Synopsis
PsdConstraint getPsdConstrByName(String name)
Arguments
name
: name of desired PSD constraint.Return
PSD constraint object.
Model.getPsdConstrs()
Get all PSD constraints in model.
Synopsis
PsdConstrArray getPsdConstrs()
Return
array object of PSD constraints.
Model.getPsdObjective()
Get PSD objective of model.
Synopsis
PsdExpr getPsdObjective()
Return
a PSD expression object.
Model.getPsdRow()
Get PSD variables and associated symmetric matrices that participate in a PSD constraint.
Synopsis
PsdExpr getPsdRow(PsdConstraint constr)
Arguments
constr
: a PSD constraint object.Return
PSD expression object of the PSD constraint.
Model.getPsdSolution()
Get PSD solution.
Synopsis
Object[] getPsdSolution()
Return
solution, slack, dual and reduced values.
Model.getPsdVar()
Get a PSD variable of given index in model.
Synopsis
PsdVar getPsdVar(int idx)
Arguments
idx
: index of the desired PSD variable.Return
the desired PSD variable object.
Model.getPsdVarByName()
Get a PSD variable of given name in model.
Synopsis
PsdVar getPsdVarByName(String name)
Arguments
name
: name of the desired PSD variable.Return
the desired PSD variable object.
Model.getPsdVars()
Get all PSD variables in model.
Synopsis
PsdVarArray getPsdVars()
Return
array object of PSD variables.
Model.getQConstr()
Get a quadratic constraint of given index in model.
Synopsis
QConstraint getQConstr(int idx)
Arguments
idx
: index of the desired quadratic constraint.Return
the desired quadratic constraint object.
Model.getQConstrBuilder()
Get builder of a quadratic constraint in model, including variables and associated coefficients, sense and RHS.
Synopsis
QConstrBuilder getQConstrBuilder(QConstraint constr)
Arguments
constr
: a constraint object.Return
constraint builder object.
Model.getQConstrBuilders()
Get builders of all constraints in model.
Synopsis
QConstrBuilderArray getQConstrBuilders()
Return
array object of constraint builders.
Model.getQConstrByName()
Get a quadratic constraint of given name in model.
Synopsis
QConstraint getQConstrByName(String name)
Arguments
name
: name of the desired constraint.Return
the desired quadratic constraint object.
Model.getQConstrs()
Get all quadratic constraints in model.
Synopsis
QConstrArray getQConstrs()
Return
array object of quadratic constraints.
Model.getQuadObjective()
Get quadratic objective of model.
Synopsis
QuadExpr getQuadObjective()
Return
a quadratic expression object.
Model.getQuadRow()
Get quadratic expression that participate in quadratic constraint.
Synopsis
QuadExpr getQuadRow(QConstraint constr)
Arguments
constr
: a quadratic constraint object.Return
quadratic expression object of the constraint.
Model.getRow()
Get variables that participate in a constraint, and the associated coefficients.
Synopsis
Expr getRow(Constraint constr)
Arguments
constr
: a constraint object.Return
expression object of the constraint.
Model.getRowBasis()
Get status of row basis.
Synopsis
int[] getRowBasis()
Return
basis status.
Model.getSolution()
Get MIP solution.
Synopsis
double[] getSolution()
Return
solution values.
Model.getSos()
Get a SOS constraint of given index in model.
Synopsis
Sos getSos(int idx)
Arguments
idx
: index of the desired SOS constraint.Return
the desired SOS constraint object.
Model.getSosBuilders()
Get builders of all SOS constraints in model.
Synopsis
SosBuilderArray getSosBuilders()
Return
array object of SOS constraint builders.
Model.getSosBuilders()
Get builders of given SOS constraints in model.
Synopsis
SosBuilderArray getSosBuilders(Sos[] soss)
Arguments
soss
: array of SOS constraints.Return
array object of desired SOS constraint builders.
Model.getSosBuilders()
Get builders of given SOS constraints in model.
Synopsis
SosBuilderArray getSosBuilders(SosArray soss)
Arguments
soss
: array of SOS constraints.Return
array object of desired SOS constraint builders.
Model.getSOSIIS()
Get IIS status of SOS constraints.
Synopsis
int[] getSOSIIS(SosArray soss)
Arguments
soss
: Array of SOS constraints.Return
IIS status of SOS constraints.
Model.getSOSIIS()
Get IIS status of SOS constraints.
Synopsis
int[] getSOSIIS(Sos[] soss)
Arguments
soss
: Array of SOS constraints.Return
IIS status of SOS constraints.
Model.getSoss()
Get all SOS constraints in model.
Synopsis
SosArray getSoss()
Return
array object of SOS constraints.
Model.getSymMat()
Get a symmetric matrix of given index in model.
Synopsis
SymMatrix getSymMat(int idx)
Arguments
idx
: index of the desired symmetric matrix.Return
the desired symmetric matrix object.
Model.getVar()
Get a variable of given index in model.
Synopsis
Var getVar(int idx)
Arguments
idx
: index of the desired variable.Return
the desired variable object.
Model.getVarByName()
Get a variable of given name in model.
Synopsis
Var getVarByName(String name)
Arguments
name
: name of the desired variable.Return
the desired variable object.
Model.getVarLowerIIS()
Get IIS status of lower bounds of variables.
Synopsis
int[] getVarLowerIIS(VarArray vars)
Arguments
vars
: Array of variables.Return
IIS status of lower bounds of variables.
Model.getVarLowerIIS()
Get IIS status of lower bounds of variables.
Synopsis
int[] getVarLowerIIS(Var[] vars)
Arguments
vars
: Array of variables.Return
IIS status of lower bounds of variables.
Model.getVars()
Get all variables in model.
Synopsis
VarArray getVars()
Return
variable array object.
Model.getVarUpperIIS()
Get IIS status of upper bounds of variables.
Synopsis
int[] getVarUpperIIS(VarArray vars)
Arguments
vars
: Array of variables.Return
IIS status of upper bounds of variables.
Model.getVarUpperIIS()
Get IIS status of upper bounds of variables.
Synopsis
int[] getVarUpperIIS(Var[] vars)
Arguments
vars
: Array of variables.Return
IIS status of upper bounds of variables.
Model.interrupt()
Interrupt optimization of current problem.
Synopsis
void interrupt()
Model.loadMipStart()
Load final initial values of variables to the problem.
Synopsis
void loadMipStart()
Model.loadTuneParam()
Load specified tuned parameters into model.
Synopsis
void loadTuneParam(int idx)
Arguments
idx
: Index of tuned parameters.
Model.read()
Read problem, solution, basis, MIP start or COPT parameters from file.
Synopsis
void read(String filename)
Arguments
filename
: an input file name.
Model.readBasis()
Read basis from file.
Synopsis
void readBasis(String filename)
Arguments
filename
: an input file name.
Model.readBin()
Read problem in COPT binary format from file.
Synopsis
void readBin(String filename)
Arguments
filename
: an input file name.
Model.readCbf()
Read problem in CBF format from file.
Synopsis
void readCbf(String filename)
Arguments
filename
: an input file name.
Model.readLp()
Read problem in LP format from file.
Synopsis
void readLp(String filename)
Arguments
filename
: an input file name.
Model.readMps()
Read problem in MPS format from file.
Synopsis
void readMps(String filename)
Arguments
filename
: an input file name.
Model.readMst()
Read MIP start information from file.
Synopsis
void readMst(String filename)
Arguments
filename
: an input file name.
Model.readParam()
Read COPT parameters from file.
Synopsis
void readParam(String filename)
Arguments
filename
: an input file name.
Model.readSdpa()
Read problem in SDPA format from file.
Synopsis
void readSdpa(String filename)
Arguments
filename
: an input file name.
Model.readSol()
Read solution from file.
Synopsis
void readSol(String filename)
Arguments
filename
: an input file name.
Model.readTune()
Read tuning parameters from file.
Synopsis
void readTune(String filename)
Arguments
filename
: an input file name.
Model.remove()
Remove an array of variables from model.
Synopsis
void remove(Var[] vars)
Arguments
vars
: a list of variables.
Model.remove()
Remove array of variables from model.
Synopsis
void remove(VarArray vars)
Arguments
vars
: an array of variables.
Model.remove()
Remove a list of constraints from model.
Synopsis
void remove(Constraint[] constrs)
Arguments
constrs
: a list of constraints.
Model.remove()
Remove a list of constraints from model.
Synopsis
void remove(ConstrArray constrs)
Arguments
constrs
: an array of constraints.
Model.remove()
Remove a list of SOS constraints from model.
Synopsis
void remove(Sos[] soss)
Arguments
soss
: a list of SOS constraints.
Model.remove()
Remove a list of SOS constraints from model.
Synopsis
void remove(SosArray soss)
Arguments
soss
: an array of SOS constraints.
Model.remove()
Remove a list of cone constraints from model.
Synopsis
void remove(Cone[] cones)
Arguments
cones
: a list of cone constraints.
Model.remove()
Remove a list of cone constraints from model.
Synopsis
void remove(ConeArray cones)
Arguments
cones
: an array of cone constraints.
Model.remove()
Remove a list of exponential cone constraints from model.
Synopsis
void remove(ExpCone[] cones)
Arguments
cones
: a list of exponential cone constraints.
Model.remove()
Remove a list of exponential cone constraints from model.
Synopsis
void remove(ExpConeArray cones)
Arguments
cones
: an array of exponential cone constraints.
Model.remove()
Remove a list of affine cone constraints from model.
Synopsis
void remove(AffineCone[] cones)
Arguments
cones
: a list of affine cone constraints.
Model.remove()
Remove an array of affine cone constraints from model.
Synopsis
void remove(AffineConeArray cones)
Arguments
cones
: an array of affine cone constraints.
Model.remove()
Remove a list of gernal constraints from model.
Synopsis
void remove(GenConstr[] genConstrs)
Arguments
genConstrs
: a list of general constraints.
Model.remove()
Remove a list of gernal constraints from model.
Synopsis
void remove(GenConstrArray genConstrs)
Arguments
genConstrs
: an array of general constraints.
Model.remove()
Remove a list of quadratic constraints from model.
Synopsis
void remove(QConstraint[] qconstrs)
Arguments
qconstrs
: an array of quadratic constraints.
Model.remove()
Remove a list of quadratic constraints from model.
Synopsis
void remove(QConstrArray qconstrs)
Arguments
qconstrs
: an array of quadratic constraints.
Model.remove()
Remove a list of PSD variables from model.
Synopsis
void remove(PsdVar[] vars)
Arguments
vars
: an array of PSD variables.
Model.remove()
Remove a list of PSD variables from model.
Synopsis
void remove(PsdVarArray vars)
Arguments
vars
: an array of PSD variables.
Model.remove()
Remove a list of PSD constraints from model.
Synopsis
void remove(PsdConstraint[] constrs)
Arguments
constrs
: an array of PSD constraints.
Model.remove()
Remove a list of PSD constraints from model.
Synopsis
void remove(PsdConstrArray constrs)
Arguments
constrs
: an array of PSD constraints.
Model.remove()
Remove a list of LMI constraints from model.
Synopsis
void remove(LmiConstrArray constrs)
Arguments
constrs
: an array of LMI constraints.
Model.remove()
Remove a list of LMI constraints from model.
Synopsis
void remove(LmiConstraint[] constrs)
Arguments
constrs
: an array of LMI constraints.
Model.reset()
Reset solution of problem only.
Synopsis
void reset()
Model.resetAll()
Reset solution of problem, and additional information such as MIP start, etc.
Synopsis
void resetAll()
Model.resetParam()
Reset parameters to default settings.
Synopsis
void resetParam()
Model.set()
Set values of information associated with variables.
Synopsis
void set(
String name,
Var[] vars,
double[] vals)
Arguments
name
: name of information.
vars
: a list of interested variables.
vals
: values of information.
Model.set()
Set values of information associated with variables.
Synopsis
void set(
String name,
VarArray vars,
double[] vals)
Arguments
name
: name of information.
vars
: array of interested variables.
vals
: values of information.
Model.set()
Set values of information associated with constraints.
Synopsis
void set(
String name,
Constraint[] constrs,
double[] vals)
Arguments
name
: name of information.
constrs
: a list of interested constraints.
vals
: values of information.
Model.set()
Set values of information associated with constraints.
Synopsis
void set(
String name,
ConstrArray constrs,
double[] vals)
Arguments
name
: name of information.
constrs
: array of interested constraints.
vals
: values of information.
Model.set()
Set values of information associated with PSD constraints.
Synopsis
void set(
String name,
PsdConstraint[] constrs,
double[] vals)
Arguments
name
: name of information.
constrs
: a list of desired PSD constraints.
vals
: array of values of information.
Model.set()
Set values of information associated with PSD constraints.
Synopsis
void set(
String name,
PsdConstrArray constrs,
double[] vals)
Arguments
name
: name of information.
constrs
: a list of desired PSD constraints.
vals
: array of values of information.
Model.setBasis()
Set column and row basis status to model.
Synopsis
void setBasis(int[] colbasis, int[] rowbasis)
Arguments
colbasis
: status of column basis.
rowbasis
: status of row basis.
Model.setCallback()
Set user callback to COPT model.
Synopsis
void setCallback(CallbackBase cb, int cbctx)
Arguments
cb
: user callback instance, inheriting from CallbackBase class.
cbctx
: COPT callback context.
Model.setCoeff()
Set the coefficient of a variable in a linear constraint.
Synopsis
void setCoeff(
Constraint constr,
Var var,
double newVal)
Arguments
constr
: The requested constraint.
var
: The requested variable.
newVal
: New coefficient.
Model.setCoeffs()
Set a list of coefficients in the model.
Synopsis
void setCoeffs(
Constraint[] constrs,
Var[] vars,
double[] vals)
Arguments
constrs
: Array of constraints for coefficients to be set.
vars
: Array of vars for coefficients to be set.
vals
: New values for coefficients.
Model.setCoeffs()
Set a list of coefficients in the model.
Synopsis
void setCoeffs(
ConstrArray constrs,
VarArray vars,
double[] vals)
Arguments
constrs
: A list of constraints for coefficients to be set.
vars
: A list of vars for coefficients to be set.
vals
: New values for coefficients.
Model.setDblParam()
Set value of a COPT double parameter.
Synopsis
void setDblParam(String param, double val)
Arguments
param
: name of double parameter.
val
: double value.
Model.setIntParam()
Set value of a COPT integer parameter.
Synopsis
void setIntParam(String param, int val)
Arguments
param
: name of integer parameter.
val
: integer value.
Model.setLmiCoeff()
Set the coefficient matrix of a variable in LMI constraint.
Synopsis
void setLmiCoeff(
LmiConstraint constr,
Var var,
SymMatrix mat)
Arguments
constr
: The desired LMI constraint.
var
: The desired variable.
mat
: new coefficient matrix.
Model.setLmiRhs()
Set constant matrix of LMI constraint.
Synopsis
void setLmiRhs(LmiConstraint constr, SymMatrix mat)
Arguments
constr
: The desired LMI constraint.
mat
: new constant matrix.
Model.setLpSolution()
Set LP solution.
Synopsis
void setLpSolution(
double[] value,
double[] slack,
double[] rowDual,
double[] redCost)
Arguments
value
: solution of variables.
slack
: slack of constraints.
rowDual
: dual value of constraints.
redCost
: dual value of variables.
Model.setMipStart()
Set initial values for variables of given number, starting from the first one.
Synopsis
void setMipStart(int count, double[] vals)
Arguments
count
: the number of variables to set.
vals
: values of variables.
Model.setMipStart()
Set initial value for the specified variable.
Synopsis
void setMipStart(Var var, double val)
Arguments
var
: an interested variable.
val
: initial value of the variable.
Model.setMipStart()
Set initial value for the specified variable.
Synopsis
void setMipStart(Var[] vars, double[] vals)
Arguments
vars
: a list of interested variables.
vals
: initial values of the variables.
Model.setMipStart()
Set initial values for an array of variables.
Synopsis
void setMipStart(VarArray vars, double[] vals)
Arguments
vars
: a list of interested variables.
vals
: initial values of variables.
Model.setNames()
Set names for given variables in model.
Synopsis
void setNames(Var[] vars, String[] names)
Arguments
vars
: Array of variables.
names
: String array of names for variables.
Model.setNames()
Set names for given variables in model.
Synopsis
void setNames(VarArray vars, String[] names)
Arguments
vars
: A list of variables.
names
: string array of names for variables.
Model.setNames()
Set names for given constraints in model.
Synopsis
void setNames(Constraint[] cons, String[] names)
Arguments
cons
: array of constraints.
names
: string array of names for constraints.
Model.setNames()
Set names for given constraints in model.
Synopsis
void setNames(ConstrArray cons, String[] names)
Arguments
cons
: a list of constraints.
names
: string array of names for constraints.
Model.setNames()
Set names for given general constraints in model.
Synopsis
void setNames(GenConstr[] genConstrs, String[] names)
Arguments
genConstrs
: array of general constraints.
names
: string array of names for general constraints.
Model.setNames()
Set names for given general constraints in model.
Synopsis
void setNames(GenConstrArray genConstrs, String[] names)
Arguments
genConstrs
: a list of general constraints.
names
: string array of names for general constraints.
Model.setNames()
Set names for given quadratic constraints in model.
Synopsis
void setNames(QConstraint[] cons, String[] names)
Arguments
cons
: array of quadratic constraints.
names
: string array of names for quadratic constraints.
Model.setNames()
Set names for given quadratic constraints in model.
Synopsis
void setNames(QConstrArray cons, String[] names)
Arguments
cons
: a list of quadratic constraints.
names
: string array of names for quadratic constraints.
Model.setNames()
Set names for given PSD variables in model.
Synopsis
void setNames(PsdVar[] vars, String[] names)
Arguments
vars
: array of PSD variables.
names
: string array of names for PSD variables.
Model.setNames()
Set names for given PSD variables in model.
Synopsis
void setNames(PsdVarArray vars, String[] names)
Arguments
vars
: a list of PSD variables.
names
: string array of names for PSD variables.
Model.setNames()
Set names for given PSD constraints in model.
Synopsis
void setNames(PsdConstraint[] cons, String[] names)
Arguments
cons
: array of PSD constraints.
names
: string array of names for PSD constraints.
Model.setNames()
Set names for given PSD constraints in model.
Synopsis
void setNames(PsdConstrArray cons, String[] names)
Arguments
cons
: a list of PSD constraints.
names
: string array of names for PSD constraints.
Model.setNames()
Set names for given LMI constraints in model.
Synopsis
void setNames(LmiConstraint[] cons, String[] names)
Arguments
cons
: array of LMI constraints.
names
: string array of names for LMI constraints.
Model.setNames()
Set names for given LMI constraints in model.
Synopsis
void setNames(LmiConstrArray cons, String[] names)
Arguments
cons
: a list of LMI constraints.
names
: string array of names for LMI constraints.
Model.setNames()
Set names for given affine cone constraints in model.
Synopsis
void setNames(AffineConeArray cones, String[] names)
Arguments
cones
: an array of affine cone constraints.
names
: string array of names for affine cone constraints.
Model.setObjConst()
Set objective constant.
Synopsis
void setObjConst(double constant)
Arguments
constant
: constant value to set.
Model.setObjective()
Set objective for model.
Synopsis
void setObjective(Expr expr, int sense)
Arguments
expr
: expression of the objective.
sense
: optimization sense, which is either copt.Consts.MINIIMIZE or copt.Consts.MAXIMIZE. Set sense to 0 if do not change current sense.
Model.setObjSense()
Set objective sense for model.
Synopsis
void setObjSense(int sense)
Arguments
sense
: the objective sense.
Model.setPsdCoeff()
Set the coefficient matrix of a PSD variable in a PSD constraint.
Synopsis
void setPsdCoeff(
PsdConstraint constr,
PsdVar var,
SymMatrix mat)
Arguments
constr
: The desired PSD constraint.
var
: The desired PSD variable.
mat
: new coefficient matrix.
Model.setPsdObjective()
Set PSD objective for model.
Synopsis
void setPsdObjective(PsdExpr expr, int sense)
Arguments
expr
: PSD expression of the objective.
sense
: optimization sense, which is either copt.Consts.MINIIMIZE or copt.Consts.MAXIMIZE. Set sense to 0 if do not change current sense.
Model.setQuadObjective()
Set quadratic objective for model.
Synopsis
void setQuadObjective(QuadExpr expr, int sense)
Arguments
expr
: quadratic expression of the objective.
sense
: optimization sense, which is either copt.Consts.MINIIMIZE or copt.Consts.MAXIMIZE. Set sense to 0 if do not change current sense.
Model.setSlackBasis()
Set slack basis to model.
Synopsis
void setSlackBasis()
Model.setSolverLogFile()
Set log file for COPT.
Synopsis
void setSolverLogFile(String filename)
Arguments
filename
: log file name.
Model.solve()
Solve the model as MIP.
Synopsis
void solve()
Model.solveLp()
Solve the model as LP.
Synopsis
void solveLp()
Model.tune()
Tune model.
Synopsis
void tune()
Model.write()
Output problem, solution, basis, MIP start or modified COPT parameters to file.
Synopsis
void write(String filename)
Arguments
filename
: an output file name.
Model.writeBasis()
Output optimal basis to a file of type ‘.bas’.
Synopsis
void writeBasis(String filename)
Arguments
filename
: an output file name.
Model.writeBin()
Output problem to a file as COPT binary format.
Synopsis
void writeBin(String filename)
Arguments
filename
: an output file name.
Model.writeIIS()
Output IIS to file.
Synopsis
void writeIIS(String filename)
Arguments
filename
: Output file name.
Model.writeLp()
Output problem to a file as LP format.
Synopsis
void writeLp(String filename)
Arguments
filename
: an output file name.
Model.writeMps()
Output problem to a file as MPS format.
Synopsis
void writeMps(String filename)
Arguments
filename
: an output file name.
Model.writeMpsStr()
Output MPS problem to problem buffer.
Synopsis
ProbBuffer writeMpsStr()
Return
problem buffer for string of MPS problem.
Model.writeMst()
Output MIP start information to a file of type ‘.mst’.
Synopsis
void writeMst(String filename)
Arguments
filename
: an output file name.
Model.writeParam()
Output modified COPT parameters to a file of type ‘.par’.
Synopsis
void writeParam(String filename)
Arguments
filename
: an output file name.
Model.writePoolSol()
Output selected pool solution to a file of type ‘.sol’.
Synopsis
void writePoolSol(int idx, String filename)
Arguments
idx
: index of pool solution.
filename
: an output file name.
Model.writeRelax()
Output feasibility relaxation problem to file.
Synopsis
void writeRelax(String filename)
Arguments
filename
: Output file name.
Model.writeSol()
Output solution to a file of type ‘.sol’.
Synopsis
void writeSol(String filename)
Arguments
filename
: an output file name.
Model.writeTuneParam()
Output specified tuned parameters to a file of type ‘.par’.
Synopsis
void writeTuneParam(int idx, String filename)
Arguments
idx
: Index of tuned parameters.
filename
: Output file name.