jopt.csp.spi.search.localsearch
Class ImproveSolutionAction
java.lang.Object
jopt.csp.spi.search.localsearch.ImproveSolutionAction
- All Implemented Interfaces:
- jopt.csp.search.SearchAction
- public class ImproveSolutionAction
- extends java.lang.Object
- implements jopt.csp.search.SearchAction
Action that will post a constraint during searching that will require additional
solutions located to be better than the solution given to this action.
- Version:
- $Revision: 1.3 $
- Author:
- Nick Coleman
- See Also:
AddConstraintAction
Method Summary |
static jopt.csp.variable.CspConstraint |
createImprovementConstraint(jopt.csp.variable.CspNumExpr obj,
double newObjVal,
boolean lessThan)
Creates constraint to improve an objective |
jopt.csp.search.SearchAction |
performAction()
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ImproveSolutionAction
public ImproveSolutionAction(ConstraintStore store,
jopt.csp.solution.SolverSolution solution,
double step)
performAction
public jopt.csp.search.SearchAction performAction()
throws jopt.csp.variable.PropagationFailureException
- Specified by:
performAction
in interface jopt.csp.search.SearchAction
- Throws:
jopt.csp.variable.PropagationFailureException
createImprovementConstraint
public static jopt.csp.variable.CspConstraint createImprovementConstraint(jopt.csp.variable.CspNumExpr obj,
double newObjVal,
boolean lessThan)
- Creates constraint to improve an objective
- Parameters:
obj
- Objective expression to improve uponnewObjVal
- New objective value that expression is constrained againstlessThan
- True if objective should be <= to new val, false if objective should be >= new val