public interface IMIP extends Serializable
Modifier and Type | Method and Description |
---|---|
void |
add(Constraint constraint)
Adds a new constraint
|
String |
add(Variable var)
Adds a variable to the MIP formulation.
|
void |
addObjectiveTerm(double coefficient,
Variable var)
Adds a Term to the objective function.
|
void |
addObjectiveTerm(double coefficient,
Variable varA,
Variable varB)
Adds a Term to the objective function.
|
void |
addObjectiveTerm(LinearTerm term)
Adds a Term to the objective function.
|
void |
addObjectiveTerm(QuadraticTerm term)
Adds a Term to the objective function.
|
boolean |
clearObjective()
Removes the objective
|
void |
clearProposedValues()
Clears proposed value for this variable
|
void |
clearSolveParams() |
boolean |
getBooleanSolveParam(SolveParam param) |
boolean |
getBooleanSolveParam(SolveParam param,
boolean defaultValue) |
boolean |
getBooleanSolveParam(SolveParam param,
Boolean defaultValue) |
List<Constraint> |
getConstraints() |
double |
getDoubleSolveParam(SolveParam param) |
double |
getDoubleSolveParam(SolveParam param,
double defaultValue) |
double |
getDoubleSolveParam(SolveParam param,
Double defaultValue) |
int |
getIntSolveParam(SolveParam param) |
int |
getIntSolveParam(SolveParam param,
int defaultValue) |
int |
getIntSolveParam(SolveParam param,
Integer defaultValue) |
Collection<LinearTerm> |
getLinearObjectiveTerms() |
int |
getNumConstraints() |
int |
getNumVars() |
Collection<Term> |
getObjectiveTerms() |
boolean |
getProposedBooleanValue(Variable var)
returns the currently proposed value for Boolean variable var
|
double |
getProposedDoubleValue(Variable var)
returns the currently proposed value for Double variable var
|
int |
getProposedIntValue(Variable var)
returns the currently proposed value for Integer variable var
|
Map<Variable,Object> |
getProposedValuesMap()
useful for copying proposed var/vals to a new MIP
|
Collection<QuadraticTerm> |
getQuadraticObjectiveTerms() |
Object |
getSolveParam(SolveParam param)
These functions control how JOpt operates, and how the backend solver operates.
|
Collection<LinearTerm> |
getSortedLinearObjectiveTerms()
Get the terms sorted lexicographically
|
Collection<QuadraticTerm> |
getSortedQuadraticObjectiveTerms()
Get the terms sorted lexicographically
|
Set<SolveParam> |
getSpecifiedSolveParams() |
String |
getStringSolveParam(SolveParam param) |
String |
getStringSolveParam(SolveParam param,
String defaultValue) |
Variable |
getVar(String name) |
Map<String,Variable> |
getVars() |
Set<Variable> |
getVarsWithProposedValues()
useful for copying proposed var/vals to a new MIP
|
boolean |
isObjectiveMax() |
boolean |
isObjectiveMin() |
boolean |
isSolveParamSpecified(SolveParam param) |
void |
proposeValue(Variable var,
boolean value)
Sets proposed value for this variable
|
void |
proposeValue(Variable var,
double value)
Sets proposed value for this variable
|
void |
proposeValue(Variable var,
int value)
Sets proposed value for this variable
|
boolean |
remove(Constraint constraint)
removes a constraint from the formulation.
|
void |
remove(Variable var)
Removes a variable from the MIP formulation.
|
void |
removeObjectiveTerm(LinearTerm term)
removes a Term from the objective function.
|
void |
removeObjectiveTerm(QuadraticTerm term)
removes a Term from the objective function.
|
void |
removeProposedValue(Variable var)
Removes proposed value for this variable
|
void |
resetDefaultSolveParams()
reset behavior is solver specific; see implementing class
|
void |
setObjectiveMax(boolean isMax)
Set the objective to be MAX (true) or MIN (false)
|
void |
setProposedValues(Map<Variable,Object> proposedValues)
useful for copying proposed var/vals to a new MIP
|
void |
setSolveParam(SolveParam param,
Object value) |
IMIP |
typedClone() |
String add(Variable var)
void remove(Variable var)
int getNumVars()
void proposeValue(Variable var, double value)
void proposeValue(Variable var, int value)
void proposeValue(Variable var, boolean value)
void removeProposedValue(Variable var)
void clearProposedValues()
Set<Variable> getVarsWithProposedValues()
Map<Variable,Object> getProposedValuesMap()
void setProposedValues(Map<Variable,Object> proposedValues)
int getProposedIntValue(Variable var)
double getProposedDoubleValue(Variable var)
boolean getProposedBooleanValue(Variable var)
Collection<LinearTerm> getLinearObjectiveTerms()
Collection<LinearTerm> getSortedLinearObjectiveTerms()
void addObjectiveTerm(LinearTerm term)
term
- void addObjectiveTerm(double coefficient, Variable var)
term
- void removeObjectiveTerm(LinearTerm term)
term
- Collection<QuadraticTerm> getQuadraticObjectiveTerms()
Collection<QuadraticTerm> getSortedQuadraticObjectiveTerms()
void addObjectiveTerm(QuadraticTerm term)
term
- void addObjectiveTerm(double coefficient, Variable varA, Variable varB)
term
- void removeObjectiveTerm(QuadraticTerm term)
term
- boolean clearObjective()
Collection<Term> getObjectiveTerms()
boolean isObjectiveMax()
boolean isObjectiveMin()
void setObjectiveMax(boolean isMax)
isMax
- List<Constraint> getConstraints()
int getNumConstraints()
void add(Constraint constraint)
constraint
- the constraint to addboolean remove(Constraint constraint)
constraint
- Object getSolveParam(SolveParam param)
int getIntSolveParam(SolveParam param, int defaultValue)
getSolveParam(SolveParam)
double getDoubleSolveParam(SolveParam param, double defaultValue)
getSolveParam(SolveParam)
boolean getBooleanSolveParam(SolveParam param, boolean defaultValue)
getSolveParam(SolveParam)
int getIntSolveParam(SolveParam param, Integer defaultValue)
getSolveParam(SolveParam)
double getDoubleSolveParam(SolveParam param, Double defaultValue)
getSolveParam(SolveParam)
boolean getBooleanSolveParam(SolveParam param, Boolean defaultValue)
getSolveParam(SolveParam)
String getStringSolveParam(SolveParam param, String defaultValue)
getSolveParam(SolveParam)
int getIntSolveParam(SolveParam param)
getSolveParam(SolveParam)
double getDoubleSolveParam(SolveParam param)
getSolveParam(SolveParam)
boolean getBooleanSolveParam(SolveParam param)
getSolveParam(SolveParam)
String getStringSolveParam(SolveParam param)
getSolveParam(SolveParam)
void setSolveParam(SolveParam param, Object value)
getSolveParam(SolveParam)
Set<SolveParam> getSpecifiedSolveParams()
getSolveParam(SolveParam)
boolean isSolveParamSpecified(SolveParam param)
void clearSolveParams()
getSolveParam(SolveParam)
void resetDefaultSolveParams()
IMIP typedClone()
Copyright © 2017. All rights reserved.