public abstract class ExplorationParameters
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected java.lang.String[] |
constraintNames
Name of the constraints for each dimension.
|
protected int |
dimensions
Number of dimensions to be explored
|
protected int[] |
explorationGranularity
Granularity of Exploration.
|
protected int[] |
lowerBounds
Lower bounds for all the dimensions.
|
protected int[] |
upperBounds
Upper bounds for all the dimensions.
|
Modifier | Constructor and Description |
---|---|
protected |
ExplorationParameters(int dimensions)
Initialization exploration parameters object.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getConstraintName(int dimension)
Gets the name of the constraint for a dimension.
|
abstract int[] |
getCostsFromModel()
If the query was SAT, then this method will be called to get
the costs from the model given by the solver.
|
int |
getDimensions()
Gets number of dimensions in the exploration.
|
int |
getExplorationGranularity(int dimension)
Gets the exploration granularity for a dimension.
|
int[] |
getLowerBounds()
Get all lower bounds.
|
abstract java.util.Map<java.lang.String,java.lang.String> |
getModelFromSolver()
Get model of a SAT point from the solver.
|
int[] |
getUpperBounds()
Get all upper bounds.
|
abstract void |
popSolverContext(int numContext)
Retrieve back the solver context to add new const constraints.
|
abstract void |
pushSolverContext()
Save the Solver Context to save it before we add the cost constraints.
|
void |
setBounds(int[] lowerBound,
int[] upperBound)
Set lower and upper bounds for the exploration for each dimension.
|
abstract void |
setConstraint(int dimension,
int value)
Set a constraint for a particular dimension.
|
void |
setExplorationGranularity(int dimension,
int granularity)
Set exploration granularity for a given dimension.
|
void |
setLowerBound(int dimension,
int bound)
Set only lower bound of a dimension.
|
void |
setUpperBound(int dimension,
int bound)
Set only upper bound of a dimension.
|
abstract Z3Solver.SatResult |
solverQuery(int timeOutInSeconds)
After the constraints are set, the solver is queried for evaluation.
|
protected final int dimensions
protected int[] lowerBounds
protected int[] upperBounds
protected int[] explorationGranularity
protected java.lang.String[] constraintNames
protected ExplorationParameters(int dimensions)
dimensions
- number of dimensions to be explored.public abstract void setConstraint(int dimension, int value)
dimension
- dimension of which the constraint will be setvalue
- value to which the constraint will be setpublic abstract int[] getCostsFromModel()
public abstract java.util.Map<java.lang.String,java.lang.String> getModelFromSolver()
public abstract Z3Solver.SatResult solverQuery(int timeOutInSeconds)
timeOutInSeconds
- time out for this query.public abstract void pushSolverContext()
public abstract void popSolverContext(int numContext)
numContext
- number of pop should be made to the stack. Generally 1.public void setBounds(int[] lowerBound, int[] upperBound)
lowerBound
- lower bound for each dimensionupperBound
- upper bound for each dimensionpublic void setUpperBound(int dimension, int bound)
dimension
- dimension to be updatedbound
- value which should be set as a bound.public void setLowerBound(int dimension, int bound)
dimension
- dimension to be updatedbound
- value which should be set as a bound.public void setExplorationGranularity(int dimension, int granularity)
dimension
- dimension to be set for the granularitygranularity
- value of granularitypublic int getExplorationGranularity(int dimension)
dimension
- dimension to get the granularitypublic int[] getLowerBounds()
public int[] getUpperBounds()
public java.lang.String getConstraintName(int dimension)
dimension
- dimension to get the constraint namepublic int getDimensions()