public class ActivityBased extends AbstractStrategy<IntVar> implements IMonitorDownBranch, IMonitorRestart, IMonitorInitialize, IVariableMonitor<IntVar>, Comparator<IntVar>
| Constructor and Description |
|---|
ActivityBased(IntVar[] vars) |
ActivityBased(Model model,
IntVar[] vars,
double g,
double d,
int a,
int samplingIterationForced,
long seed) |
| Modifier and Type | Method and Description |
|---|---|
void |
afterDownBranch(boolean left)
Action to perform after going down in the tree search
|
void |
afterInitialize() |
void |
afterRestart() |
void |
beforeDownBranch(boolean left)
Action to perform before going down in the tree search
|
void |
beforeRestart() |
int |
compare(IntVar o1,
IntVar o2) |
Decision<IntVar> |
computeDecision(IntVar variable)
Computes a decision to be applied to variable var
This method should be implemented in order to use search patterns
|
double |
getActivity(IntVar var) |
Decision<IntVar> |
getDecision()
Provides access to the current decision in the strategy.
|
boolean |
init()
Prepare
this to be used in a search loop
The initialization can detect inconsistency, in that case, it returns false |
void |
onUpdate(IntVar var,
IEventType evt)
Operations to execute after updating the domain variable
|
getVariables, makeIntDecision, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitbeforeInitializecomparing, comparing, comparingDouble, comparingInt, comparingLong, equals, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLongpublic ActivityBased(Model model, IntVar[] vars, double g, double d, int a, int samplingIterationForced, long seed)
public ActivityBased(IntVar[] vars)
public boolean init()
AbstractStrategythis to be used in a search loop
The initialization can detect inconsistency, in that case, it returns falseinit in class AbstractStrategy<IntVar>public void afterInitialize()
afterInitialize in interface IMonitorInitializepublic Decision<IntVar> computeDecision(IntVar variable)
AbstractStrategycomputeDecision in class AbstractStrategy<IntVar>variable - a variablepublic Decision<IntVar> getDecision()
AbstractStrategynull.getDecision in class AbstractStrategy<IntVar>public int compare(IntVar o1, IntVar o2)
compare in interface Comparator<IntVar>public double getActivity(IntVar var)
public void onUpdate(IntVar var, IEventType evt)
IVariableMonitoronUpdate in interface IVariableMonitor<IntVar>var - variable concernedevt - modification eventpublic void beforeDownBranch(boolean left)
IMonitorDownBranchbeforeDownBranch in interface IMonitorDownBranchleft - set to true to specify that this is a left branchpublic void afterDownBranch(boolean left)
IMonitorDownBranchafterDownBranch in interface IMonitorDownBranchleft - set to true to specify that this is a left branchpublic void beforeRestart()
beforeRestart in interface IMonitorRestartpublic void afterRestart()
afterRestart in interface IMonitorRestartCopyright © 2017. All rights reserved.