public class PeriodParams extends ExplorationParameters
Modifier and Type | Field and Description |
---|---|
private static int |
dimensionsForThisExploration
Number of dimensions for this exploration.
|
private PeriodConstraints |
satSolver
Solver being used to determine the period cost.
|
constraintNames, dimensions, explorationGranularity, lowerBounds, upperBounds
Constructor and Description |
---|
PeriodParams(Graph graph,
Solutions solutions)
Initialize exploration parameters object.
|
Modifier and Type | Method and Description |
---|---|
int[] |
getCostsFromModel()
If the query was SAT, then this method will be called to get
the costs from the model given by the solver.
|
java.util.Map<java.lang.String,java.lang.String> |
getModelFromSolver()
Get model of a SAT point from the solver.
|
void |
popSolverContext(int numContext)
Retrieve back the solver context to add new const constraints.
|
void |
pushSolverContext()
Save the Solver Context to save it before we add the cost constraints.
|
void |
setConstraint(int constraintDimension,
int constraintValue)
Set a constraint for a particular dimension.
|
void |
setSolver(PeriodConstraints solver)
Set the SMT solver for exploration purposes.
|
Z3Solver.SatResult |
solverQuery(int timeOutInSeconds)
After the constraints are set, the solver is queried for evaluation.
|
getConstraintName, getDimensions, getExplorationGranularity, getLowerBounds, getUpperBounds, setBounds, setExplorationGranularity, setLowerBound, setUpperBound
private static final int dimensionsForThisExploration
private PeriodConstraints satSolver
public int[] getCostsFromModel()
ExplorationParameters
getCostsFromModel
in class ExplorationParameters
public void setConstraint(int constraintDimension, int constraintValue)
ExplorationParameters
setConstraint
in class ExplorationParameters
constraintDimension
- dimension of which the constraint will be setconstraintValue
- value to which the constraint will be setpublic void setSolver(PeriodConstraints solver)
solver
- solver to be used for explorationpublic java.util.Map<java.lang.String,java.lang.String> getModelFromSolver()
ExplorationParameters
getModelFromSolver
in class ExplorationParameters
public Z3Solver.SatResult solverQuery(int timeOutInSeconds)
ExplorationParameters
solverQuery
in class ExplorationParameters
timeOutInSeconds
- time out for this query.public void pushSolverContext()
ExplorationParameters
pushSolverContext
in class ExplorationParameters
public void popSolverContext(int numContext)
ExplorationParameters
popSolverContext
in class ExplorationParameters
numContext
- number of pop should be made to the stack. Generally 1.