Overview | Group | Tree | Graph | Index | Concepts |
An instance of this class is part of the Solver trace mechanism. It enables you to trace such events as failure of a variable, a demon, or a constraint in a solution search. With an instance of this class, you can access the modifications of an active demon or an active constraint at any time by calling the member functions:
Trace Events
Solver uses #define
to define the events that you can trace
with an instance of IlcTraceI
:
#define IlcTraceDemons ((IlcUInt) 1) #define IlcTraceConstraint ((IlcUInt) 2) #define IlcTraceProcess ((IlcUInt) 4) #define IlcTraceVars ((IlcUInt) 8) #define IlcTraceFail ((IlcUInt) 16) #define IlcTraceNoEvent ((IlcUInt) 32) #define IlcTraceAllEvent ((IlcUInt) 31)
When you use its constructor to create an instance of
IlcTraceI
, use one of those values to indicate which event or
events to trace. After you have created a trace (an instance of
IlcTraceI
) if you want to alter the events that it traces, use
the member functions setTraceDemon
,
setTraceConstraint
, etc., to alter the trace.
See Also:
IlcConstraint, IlcDemon, IlcPrintTrace, IlcTrace
Constructor and Destructor Summary | |
---|---|
public | IlcTraceI(IloSolver s, IlcUInt flags, const char * name=0) |
Method Summary | |
---|---|
public virtual void | beginAddRequired(const IlcIntSetVar var, IlcInt val) |
public virtual void | beginBoolVarProcess(const IlcConstraint constraint) |
public virtual void | beginConstraintPost(const IlcConstraint constraint) |
public virtual void | beginConstraintPropagate(const IlcConstraint constraint) |
public virtual void | beginDemonProcess(const IlcDemon demon) |
public virtual void | beginFloatVarProcess(const IlcFloatExp exp) |
public virtual void | beginIntSetVarProcess(const IlcIntSetVar var) |
public virtual void | beginIntVarProcess(const IlcIntExp exp) |
public virtual void | beginRemovePossible(const IlcIntSetVar var, IlcInt val) |
public virtual void | beginRemoveValueFloatVar(const IlcFloatExp, IlcFloat val) |
public virtual void | beginRemoveValueIntVar(const IlcIntExp exp, IlcInt val) |
public virtual void | beginSetMaxFloatVar(const IlcFloatExp exp, IlcFloat max) |
public virtual void | beginSetMaxIntVar(const IlcIntExp exp, IlcInt max) |
public virtual void | beginSetMinFloatVar(const IlcFloatExp exp, IlcFloat min) |
public virtual void | beginSetMinIntVar(const IlcIntExp exp, IlcInt min) |
public virtual void | beginSetValueFloatVar(const IlcFloatExp, IlcFloat val) |
public virtual void | beginSetValueIntVar(const IlcIntExp exp, IlcInt val) |
public virtual void | defineIlcOr(IlcInt nbOr) |
public virtual void | endAddRequired(const IlcIntSetVar var, IlcInt val) |
public virtual void | endBoolVarProcess(const IlcConstraint constraint) |
public virtual void | endConstraintPost(const IlcConstraint constraint) |
public virtual void | endConstraintPropagate(const IlcConstraint constraint) |
public virtual void | endDemonProcess(const IlcDemon demon) |
public virtual void | endFloatVarProcess(const IlcFloatExp exp) |
public virtual void | endIntSetVarProcess(const IlcIntSetVar var) |
public virtual void | endIntVarProcess(const IlcIntExp exp) |
public virtual void | endRemovePossible(const IlcIntSetVar var, IlcInt val) |
public virtual void | endRemoveValueFloatVar(const IlcFloatExp exp, IlcFloat val) |
public virtual void | endRemoveValueIntVar(const IlcIntExp exp, IlcInt val) |
public virtual void | endSetMaxFloatVar(const IlcFloatExp exp, IlcFloat max) |
public virtual void | endSetMaxIntVar(const IlcIntExp exp, IlcInt max) |
public virtual void | endSetMinFloatVar(const IlcFloatExp exp, IlcFloat min) |
public virtual void | endSetMinIntVar(const IlcIntExp exp, IlcInt min) |
public virtual void | endSetValueFloatVar(const IlcFloatExp exp, IlcFloat val) |
public virtual void | endSetValueIntVar(const IlcIntExp exp, IlcInt val) |
public virtual void | failDemon(const IlcDemon demon) |
public virtual void | failFloatVar(const IlcFloatExp exp) |
public virtual void | failIntSetVar(const IlcIntSetVar var) |
public virtual void | failIntVar(const IlcIntExp exp) |
public virtual void | failManager(IlcInt nbFails) |
public IlcDemon | getActiveDemon() |
public ostream & | getStream() const |
public IlcBool | isAllTraced() const |
public IlcBool | isConstraintTraced() const |
public IlcBool | isDemonTraced() const |
public IlcBool | isFailTraced() const |
public IlcBool | isNoneTraced() const |
public IlcBool | isProcessTraced() const |
public IlcBool | isVarTraced() const |
public void | setTraceAllEvents() |
public void | setTraceConstraint(IlcBool condition) |
public void | setTraceDemons(IlcBool condition) |
public void | setTraceFail(IlcBool condition) |
public void | setTraceNoEvent() |
public void | setTraceProcess(IlcBool condition) |
public void | setTraceVars(IlcBool condition) |
public void | trace(IlcAnySetVar) const |
public void | trace(IlcIntSetVar) const |
public void | trace(IlcFloatVar) const |
public void | trace(IlcAnyVar) const |
public void | trace(IlcIntVar) const |
Constructor and Destructor Detail |
---|
This constructor creates a trace for the solver s
. The parameter flags
indicates which events should be traced.
Method Detail |
---|
Solver calls this member function when it begins to add the element val
to the set of required elements of the set variable var
. (In this context, set means a group or collection of elements.) If the modification does not alter var
, then Solver does not call this member function.
If you want to use this facility, you must redefine this virtual member function.
Solver calls this member function when it begins to process a Boolean variable (that is, when the Boolean variable is in process). If the modification does not alter the Boolean variable, then Solver does not call this member function.
If you want to use this facility, you must define this virtual member function.
Solver calls this member function when it begins to post constraint
.
If you want to use this facility, you must define this virtual member function.
Solver calls this member function when it begins to propagate the constraint constraint
(that is, immediately before it calls the propagate member function for the constraint).
If you want to use this facility, you must define this virtual member function.
Solver calls this member function when it begins to process demon
(that is, immediately before it propagates demon
).
If you want to use this facility, you must define this virtual member function.
Solver calls this member function when it begins to process a floating-point expression (that is, when the floating-point expression is in process).
If you want to use this facility, you must define this virtual member function.
Solver calls this member function when it begins to process an integer set variable, that is, when the integer set variable is in process. In this context, set means a group or collection of elements.
If you want to use this facility, you must define this virtual member function.
Solver calls this member function when it begins to process an integer expression (that is, when the integer expression is in process).
If you want to use this facility, you must define this virtual member function.
Solver calls this member function immediately before it removes val
from the set of possible elements of the integer set variable var
. (In this context, set means a group or collection of elements.) In other words, var
has not yet been modified when it is passed to this member function. Normally, if the modification does not alter var
, then Solver does not call this member function. However, this modification necessarily modifies var
.
If you want to use this facility, you must define this virtual member function.
Solver calls this member function immediately before it removes val
from the domain of exp
. In other words, exp
has not yet been
modified when it is passed to this member function. Normally, if the modification does
not alter exp
, then Solver does not call this member function. However, this
modification necessarily modifies exp
.
If you want to use this facility, you must define this virtual member function.
Solver calls this member function immediately before it removes val
from the domain of exp
. In other words, exp
has not yet been modified when it is passed to this member function. Normally, if the modification does not alter exp
, then Solver does not call this member function. However, this modification necessarily modifies exp
.
If you want to use this facility, you must define this virtual member function.
Solver calls this member function immediately before it sets max
as the maximum of exp
. (In this context, set means to assign.) In other words, exp
has not yet been modified when it is passed to this member function. Normally, if the modification does not alter exp
, then Solver does not call this member function. However, this modification necessarily alters exp
.
If you want to use this facility, you must define this virtual member function.
Solver calls this member function immediately before it sets max
as the maximum of exp
. (In this context, set means to assign.) In other words, exp
has not yet been modified when it is passed to this member function. Normally, if the modification does not alter exp
, then Solver does not call this member function. However, this modification necessarily alters exp
.
If you want to use this facility, you must define this virtual member function.
Solver calls this member function immediately before it sets min
as the minimum of exp
. (In this context, set means to assign.) In other words, exp
has not yet been modified when it is passed to this member function. Normally, if the modification does not alter exp
, then Solver does not call this member function. However, this modification necessarily alters exp
.
If you want to use this facility, you must define this virtual member function.
Solver calls this member function immediately before it sets min
as the minimum of exp
. (In this context, set means to assign.) In other words, exp
has not yet been modified when it is passed to this member function. Normally, if the modification does not alter exp
, then Solver does not call this member function. However, this modification necessarily alters exp
.
If you want to use this facility, you must define this virtual member function.
Solver calls this member function immediately after it sets val
as
the value of exp
(that is, after it instantiates exp
).
(In this context, set means to assign.) If the modification does not alter exp
,
then Solver does not call this member function.
If you want to use this facility, you must define this virtual member function.
Solver calls this member function when it sets val
as the value of exp
. (In this context, set means to assign.) That is, Solver calls this member function immediately before it instantiates exp
. In other words, exp
has not yet been modified when it is passed to this member function. Normally, if the modification does not alter exp
, then Solver does not call this member function. However, instantiation necessarily modifies exp
.
If you want to use this facility, you must define this virtual member function.
Solver calls this member function when it sets a choice point.
If you want to use this facility, you must define this virtual member function.
Solver calls this member function immediately after it adds the element val
to the set of required elements of the set variable var
. (In this context, set means a group or collection of elements.) If the modification does not alter var
, then Solver does not call this member function.
If you want to use this facility, you must redefine this virtual member function.
Solver calls this member function immediately after the Boolean variable indicated by constraint
is processed.
If you want to use this facility, you must define this virtual member function
Solver calls this member function immediately after it calls the post
member function for constraint
(that is, while constraint
is in process).
If you want to use this facility, you must define this virtual member function.
Solver calls this member function immediately after it calls the propagate
member function for the constraint constraint
(that is, while the constraint is in process).
If you want to use this facility, you must define this virtual member function.
Solver calls this member function immediately after it calls the propagate
member function for demon
(that is, while demon
is in process).
If you want to use this facility, you must define this virtual member function.
Solver calls this member function immediately after exp
is processed.
If you want to use this facility, you must define this virtual member function
Solver calls this member function immediately after the integer set variable var
is processed. (In this context, set means a group or collection of elements.)
If you want to use this facility, you must define this virtual member function.
Solver calls this member function immediately after exp
is processed. If the modification does not alter exp
, then Solver does not call this member function.
If you want to use this facility, you must define this virtual member function.
Solver calls this member function immediately after it removes val
from the set of possible elements of the integer set variable var
. (In this context, set means a group or collection of elements.) If the modification does not alter var
, then Solver does not call this member function.
If you want to use this facility, you must define this virtual member function.
Solver calls this member function immediately after it removes val
from the domain of exp
. If the modification does not alter exp
, then Solver does not call this member function.
If you want to use this facility, you must define this virtual member function.
Solver calls this member function immediately after it removes val
from the domain of exp
. If the modification does not alter exp
, then Solver does not call this member function.
If you want to use this facility, you must define this virtual member function.
Solver calls this member function immediately after it sets max
as the maximum of exp
. (In this context, set means to assign.) If the modification does not alter exp
, then Solver does not call this member function.
If you want to use this facility, you must define this virtual member function.
Solver calls this member function immediately after it sets max
as the maximum of exp
. (In this context, set means to assign.) If the modification does not alter exp
, then Solver does not call this member function.
If you want to use this facility, you must define this virtual member function.
Solver calls this member function immediately after it sets min
as the minimum of exp
. (In this context, set means to assign.) If the modification does not alter exp
, then Solver does not call this member function.
If you want to use this facility, you must define this virtual member function.
Solver calls this member function immediately after it sets min
as the minimum of exp
. (In this context, set means to assign.) If the modification does not alter exp
, then Solver does not call this member function.
If you want to use this facility, you must define this virtual member function.
Solver calls this member function immediately after it sets val
as the value of exp
(that is, after it instantiates exp
). (In this context, set means to assign.) If the modification does not alter exp
, then Solver does not call this member function.
If you want to use this facility, you must define this virtual member function.
Solver calls this member function immediately after it sets val
as the value of exp
(that is, after it instantiates exp
). (In this context, set means to assign.) If the modification does not alter exp
, then Solver does not call this member function.
If you want to use this facility, you must define this virtual member function.
Solver calls this member function when demon
triggers a failure.
If you want to use this facility, you must define this virtual member function.
Solver calls this member function when the modification of exp
triggers a failure.
If you want to use this facility, you must define this virtual member function.
Solver calls this member function when the modification of the integer set variable var
triggers a failure. (In this context, set means a group or collection of elements.)
If you want to use this facility, you must define this virtual member function.
Solver calls this member function when the modification of exp
triggers a failure. You can access the demon or constraint where exp
triggered the failure; to do so, use the member function IlcTraceI::getActiveDemon
.
If you want to use this facility, you must define this virtual member function.
Solver calls this member function after it calls the member function IlcGoal::fail
or IlcConstraint::fail
(that is, when a failure occurs). You can access the current number of failures through the parameter nbFails
.
This member function returns the demon that is currently active (if there is one). It will return an empty handle if there is no active demon.
Since a constraint is also a demon (that is, IlcConstraint
derives from IlcDemon
), you can also use this member function to access the currently active constraint. You may also access any constraint associated with an active demon in these ways:
IlcDemon::getConstraint();
or
getActiveDemon().getConstraint();
This member function indicates which stream will be used for output of the trace.
This member function indicates whether all events are being traced.
This member function indicates whether calls to post and propagate constraints are being traced.
This member function indicates whether calls to propagate demons are being traced.
This member function indicates whether failures are being traced.
This member function indicates whether no events are being traced.
This member function indicates whether the variables in process are being traced.
This member function indicates whether all variables are being traced.
This member function traces all events.
If a constraint is pushed onto the propagation queue, then this member function traces it if condition
is true. In general, this member function traces the posting and propagation of constraints.
This member function traces all calls to all demons, including constraints, if condition
is true. (A constraint is also a demon.)
This member function traces failures if condition
is true. (For users of previous versions of Solver, this member function replaces setFailHook
.)
This member function traces no events. That is, it turns off event tracing.
This member function traces all the variables that are in process if condition
is true.
This member function traces the modifications of variables if condition
is true.
This member function hooks a variable; that is, it offers a link between a trace and a variable. (For users of previous versions of Solver, this member function resembles the trace hook mechanism.)
This member function hooks a variable; that is, it offers a link between a trace and a variable. (For users of previous versions of Solver, this member function resembles the trace hook mechanism.)
This member function hooks a variable; that is, it offers a link between a trace and a variable. (For users of previous versions of Solver, this member function resembles the trace hook mechanism.)
This member function hooks a variable; that is, it offers a link between a trace and a variable. (For users of previous versions of Solver, this member function resembles the trace hook mechanism.)
This member function hooks a variable; that is, it offers a link between a trace and a variable. (For users of previous versions of Solver, this member function resembles the trace hook mechanism.)