VERBOSITY_HIGH, VERBOSITY_LOW, VERBOSITY_NONE| Constructor and Description |
|---|
BeamSearch(int beamSize) |
| Modifier and Type | Method and Description |
|---|---|
int |
addBooleanVariable(double arg0)
Adds a new Boolean variable (an integer variable constrained to take either the value 0 or
the value 1) with the specified coefficient in the objective function to the problem.
|
int[] |
addDiscreteVariable(double[] arg0)
Adds a general, multi-valued discrete variable, which is implemented as a set of Boolean
variables, one per value of the discrete variable, with exactly one of those variables set
true at any given time. |
void |
addEqualityConstraint(int[] arg0,
double[] arg1,
double arg2)
Adds a new fixed constraint to the problem.
|
void |
addGreaterThanConstraint(int[] arg0,
double[] arg1,
double arg2)
Adds a new lower bounded constraint to the problem.
|
int |
addIntegerVariable(double arg0)
Adds a new Integer variable with the specified coefficient in the objective function to the
problem.
|
void |
addLessThanConstraint(int[] arg0,
double[] arg1,
double arg2)
Adds a new upper bounded constraint to the problem.
|
int |
addRealVariable(double arg0)
Adds a new Real variable with the specified coefficient in the objective function to the
problem.
|
boolean |
getBooleanValue(int arg0)
When the problem has been solved, use this method to retrieve the value of any Boolean
inference variable.
|
int |
getIntegerValue(int arg0)
When the problem has been solved, use this method to retrieve the value of any Integer
inference variable.
|
double |
getRealValue(int arg0)
When the problem has been solved, use this method to retrieve the value of any Real inference
variable.
|
boolean |
isSolved()
Tests whether the problem represented by this
ILPSolver instance has been solved
already. |
double |
objectiveCoeff(int index)
The coefficient of the variable in the objective function.
|
double |
objectiveValue()
When the problem has been solved, use this method to retrieve the value of the objective
function at the solution.
|
void |
reset()
This method clears the all constraints and variables out of the ILP solver's problem
representation, bringing the
ILPSolver instance back to the state it was in when
first constructed. |
void |
setMaximize(boolean arg0)
Sets the direction of the objective function.
|
boolean |
solve()
Solves the ILP problem, saving the solution internally.
|
void |
write(StringBuffer arg0)
Creates a textual representation of the ILP problem in an algebraic notation.
|
public int addBooleanVariable(double arg0)
ILPSolveraddBooleanVariable in interface ILPSolverarg0 - The objective function coefficient for the new Boolean variable.public int addRealVariable(double arg0)
ILPSolveraddRealVariable in interface ILPSolverarg0 - The objective function coefficient for the new Real variable.public int addIntegerVariable(double arg0)
ILPSolveraddIntegerVariable in interface ILPSolverarg0 - The objective function coefficient for the new Integer variable.public int[] addDiscreteVariable(double[] arg0)
ILPSolvertrue at any given time.addDiscreteVariable in interface ILPSolverarg0 - The objective function coefficients for the new Boolean variables.public void addEqualityConstraint(int[] arg0,
double[] arg1,
double arg2)
ILPSolverILPSolver.addBooleanVariable(double) or ILPSolver.addDiscreteVariable(double[]). The resulting
constraint has the form: xi * a = b where
xi represents the inference variables whose indexes are contained in
the array i and * represents dot product.addEqualityConstraint in interface ILPSolverarg0 - The indexes of the variables with non-zero coefficients.arg1 - The coefficients of the variables with the given indexes.arg2 - The new constraint will enforce equality with this constant.public void addGreaterThanConstraint(int[] arg0,
double[] arg1,
double arg2)
ILPSolverILPSolver.addBooleanVariable(double) or ILPSolver.addDiscreteVariable(double[]). The resulting
constraint has the form: xi * a >= b
where xi represents the inference variables whose indexes are
contained in the array i and * represents dot product.addGreaterThanConstraint in interface ILPSolverarg0 - The indexes of the variables with non-zero coefficients.arg1 - The coefficients of the variables with the given indexes.arg2 - The lower bound for the new constraint.public void addLessThanConstraint(int[] arg0,
double[] arg1,
double arg2)
ILPSolverILPSolver.addBooleanVariable(double) or ILPSolver.addDiscreteVariable(double[]). The resulting
constraint has the form: xi * a <= b
where xi represents the inference variables whose indexes are
contained in the array i and * represents dot product.addLessThanConstraint in interface ILPSolverarg0 - The indexes of the variables with non-zero coefficients.arg1 - The coefficients of the variables with the given indexes.arg2 - The upper bound for the new constraint.public boolean getBooleanValue(int arg0)
ILPSolvergetBooleanValue in interface ILPSolverarg0 - The index of the variable whose value is requested.public double getRealValue(int arg0)
ILPSolvergetRealValue in interface ILPSolverarg0 - The index of the variable whose value is requested.public int getIntegerValue(int arg0)
ILPSolvergetIntegerValue in interface ILPSolverarg0 - The index of the variable whose value is requested.public boolean isSolved()
ILPSolverILPSolver instance has been solved
already.public double objectiveValue()
ILPSolverobjectiveValue in interface ILPSolverpublic double objectiveCoeff(int index)
ILPSolverobjectiveCoeff in interface ILPSolverpublic void reset()
ILPSolverILPSolver instance back to the state it was in when
first constructed.public void setMaximize(boolean arg0)
ILPSolversetMaximize in interface ILPSolverarg0 - true if the objective function is to be maximized.public boolean solve()
throws Exception
ILPSolverpublic void write(StringBuffer arg0)
ILPSolverCopyright © 2017. All rights reserved.