Gecode::Propagator Class Reference
[Programming actors]
Base-class for propagators. More...
#include <core.hpp>
Protected Member Functions | |
Propagator (Home home) | |
Constructor for posting. | |
Propagator (Space &home, bool share, Propagator &p) | |
Constructor for cloning p. | |
Friends | |
ExecStatus | ES_SUBSUMED (Propagator &, size_t) |
ExecStatus | ES_SUBSUMED (Propagator &, Space &) |
ExecStatus | ES_FIX_PARTIAL (Propagator &, const ModEventDelta &) |
ExecStatus | ES_NOFIX_PARTIAL (Propagator &, const ModEventDelta &) |
Propagation | |
| |
virtual ExecStatus | propagate (Space &home, const ModEventDelta &med)=0 |
Propagation function. | |
virtual PropCost | cost (const Space &home, const ModEventDelta &med) const =0 |
Cost function. | |
virtual ExecStatus | advise (Space &home, Advisor &a, const Delta &d) |
Advise function. | |
Information | |
| |
double | afc (void) const |
Return the accumlated failure count. |
Detailed Description
Base-class for propagators.
Definition at line 841 of file core.hpp.
Constructor & Destructor Documentation
Gecode::Propagator::Propagator | ( | Home | home | ) | [inline, protected] |
Gecode::Propagator::Propagator | ( | Space & | home, | |
bool | share, | |||
Propagator & | p | |||
) | [inline, protected] |
Member Function Documentation
virtual ExecStatus Gecode::Propagator::propagate | ( | Space & | home, | |
const ModEventDelta & | med | |||
) | [pure virtual] |
Propagation function.
The propagation function must return an execution status as follows:
- ES_FAILED: the propagator has detected failure
- ES_NOFIX: the propagator has done propagation
- ES_FIX: the propagator has done propagation and has computed a fixpoint. That is, running the propagator immediately again will do nothing.
Apart from the above values, a propagator can return the result from calling one of the functions
- ES_SUBSUMED: the propagator is subsumed and has been already deleted.
- ES_NOFIX_PARTIAL: the propagator has consumed some of its propagation events.
- ES_FIX_PARTIAL: the propagator has consumed some of its propagation events and with respect to these events is at fixpoint For more details, see the individual functions.
Implemented in Gecode::Graph::Circuit::Val< View >, Gecode::Graph::Circuit::Dom< View >, Gecode::Int::Arithmetic::AbsBnd< View >, Gecode::Int::Arithmetic::AbsDom< View >, Gecode::Int::Arithmetic::MaxBnd< View >, Gecode::Int::Arithmetic::NaryMaxBnd< View >, Gecode::Int::Arithmetic::MaxDom< View >, Gecode::Int::Arithmetic::NaryMaxDom< View >, Gecode::Int::Arithmetic::SqrPlusBnd< VA, VB >, Gecode::Int::Arithmetic::SqrBnd< View >, Gecode::Int::Arithmetic::SqrPlusDom< VA, VB >, Gecode::Int::Arithmetic::SqrDom< View >, Gecode::Int::Arithmetic::SqrtBnd< View >, Gecode::Int::Arithmetic::SqrtDom< View >, Gecode::Int::Arithmetic::MultZeroOne< View, pc >, Gecode::Int::Arithmetic::MultPlusBnd< Val, VA, VB, VC >, Gecode::Int::Arithmetic::MultBnd< View >, Gecode::Int::Arithmetic::MultPlusDom< Val, VA, VB, VC >, Gecode::Int::Arithmetic::MultDom< View >, Gecode::Int::Arithmetic::DivPlusBnd< Val, VA, VB, VC >, Gecode::Int::Arithmetic::DivBnd< View >, Gecode::Int::Arithmetic::DivMod< View >, Gecode::Int::Bool::OrTrueSubsumed< BV >, Gecode::Int::Bool::Eq< BVA, BVB >, Gecode::Int::Bool::NaryEq< BV >, Gecode::Int::Bool::Lq< BV >, Gecode::Int::Bool::BinOrTrue< BVA, BVB >, Gecode::Int::Bool::TerOrTrue< BV >, Gecode::Int::Bool::QuadOrTrue< BV >, Gecode::Int::Bool::Or< BVA, BVB, BVC >, Gecode::Int::Bool::NaryOr< VX, VY >, Gecode::Int::Bool::NaryOrTrue< BV >, Gecode::Int::Bool::Eqv< BVA, BVB, BVC >, Gecode::Int::Bool::Clause< VX, VY >, Gecode::Int::Bool::ClauseTrue< VX, VY >, Gecode::Int::Channel::Val< View, shared >, Gecode::Int::Channel::Dom< View, shared >, Gecode::Int::Channel::LinkSingle, Gecode::Int::Channel::LinkMulti, Gecode::Int::Count::EqInt< VX, VY >, Gecode::Int::Count::GqInt< VX, VY >, Gecode::Int::Count::LqInt< VX, VY >, Gecode::Int::Count::NqInt< VX, VY >, Gecode::Int::Count::EqView< VX, VY, VZ, shr >, Gecode::Int::Count::NqView< VX, VY, VZ, shr >, Gecode::Int::Count::LqView< VX, VY, VZ, shr >, Gecode::Int::Count::GqView< VX, VY, VZ, shr >, Gecode::Int::Distinct::Val< View >, Gecode::Int::Distinct::Bnd< View >, Gecode::Int::Distinct::Dom< View >, Gecode::Int::Distinct::TerDom< View >, Gecode::Int::Dom::ReRange< View >, Gecode::Int::Dom::ReIntSet< View >, Gecode::Int::Element::Int< V0, V1, Idx, Val >, Gecode::Int::Element::ViewBnd< VA, VB, VC >, Gecode::Int::Element::ViewDom< VA, VB, VC >, Gecode::Int::Element::Pair, Gecode::Int::Exec::When, Gecode::Int::Extensional::LayeredGraph< View, Val, Degree, StateIdx >, Gecode::Int::Extensional::Basic< View, shared >, Gecode::Int::Extensional::Incremental< View >, Gecode::Int::GCC::Val< Card >, Gecode::Int::GCC::Bnd< Card >, Gecode::Int::GCC::Dom< Card >, Gecode::Int::Linear::EqBin< Val, A, B >, Gecode::Int::Linear::ReEqBin< Val, A, B, Ctrl >, Gecode::Int::Linear::NqBin< Val, A, B >, Gecode::Int::Linear::LqBin< Val, A, B >, Gecode::Int::Linear::GqBin< Val, A, B >, Gecode::Int::Linear::ReLqBin< Val, A, B >, Gecode::Int::Linear::EqTer< Val, A, B, C >, Gecode::Int::Linear::NqTer< Val, A, B, C >, Gecode::Int::Linear::LqTer< Val, A, B, C >, Gecode::Int::Linear::Eq< Val, P, N >, Gecode::Int::Linear::DomEq< Val, View >, Gecode::Int::Linear::ReEq< Val, P, N, Ctrl >, Gecode::Int::Linear::Nq< Val, P, N >, Gecode::Int::Linear::Lq< Val, P, N >, Gecode::Int::Linear::ReLq< Val, P, N >, Gecode::Int::Linear::EqBoolInt< VX >, Gecode::Int::Linear::GqBoolInt< VX >, Gecode::Int::Linear::NqBoolInt< VX >, Gecode::Int::Linear::ReGqBoolInt< VX, VB >, Gecode::Int::Linear::ReEqBoolInt< VX, VB >, Gecode::Int::Linear::EqBoolView< XV, YV >, Gecode::Int::Linear::NqBoolView< XV, YV >, Gecode::Int::Linear::GqBoolView< XV, YV >, Gecode::Int::Linear::ReEqBoolView< XV, YV, BV >, Gecode::Int::Linear::ReGqBoolView< XV, YV, BV >, Gecode::Int::Linear::EqBoolScale< SBAP, SBAN, VX >, Gecode::Int::Linear::LqBoolScale< SBAP, SBAN, VX >, Gecode::Int::Linear::NqBoolScale< SBAP, SBAN, VX >, Gecode::Int::Rel::EqDom< View0, View1 >, Gecode::Int::Rel::EqBnd< View0, View1 >, Gecode::Int::Rel::NaryEqDom< View >, Gecode::Int::Rel::NaryEqBnd< View >, Gecode::Int::Rel::ReEqDom< View, CtrlView >, Gecode::Int::Rel::ReEqBnd< View, CtrlView >, Gecode::Int::Rel::ReEqDomInt< View, CtrlView >, Gecode::Int::Rel::ReEqBndInt< View, CtrlView >, Gecode::Int::Rel::Nq< View >, Gecode::Int::Rel::Lq< View >, Gecode::Int::Rel::Le< View >, Gecode::Int::Rel::ReLq< View, CtrlView >, Gecode::Int::Rel::ReLqInt< View, CtrlView >, Gecode::Int::Rel::Lex< View >, Gecode::Int::Sorted::Sorted< View, Perm >, Gecode::Kernel::UnaryWait< View >, Gecode::Kernel::NaryWait< View >, Gecode::Scheduling::Cumulatives::Val< ViewM, ViewD, ViewH, View >, Gecode::Scheduling::Unary::ManProp< ManTask >, Gecode::Scheduling::Unary::OptProp< OptTask >, Gecode::Set::Convex::Convex, Gecode::Set::Convex::ConvexHull, Gecode::Set::Distinct::AtmostOne, Gecode::Set::Element::ElementIntersection< SView, RView >, Gecode::Set::Element::ElementUnion< SView, RView >, Gecode::Set::Element::ElementUnionConst< SView, RView >, Gecode::Set::Element::ElementDisjoint< SView, RView >, Gecode::Set::Int::MinElement< View >, Gecode::Set::Int::NotMinElement< View >, Gecode::Set::Int::ReMinElement< View >, Gecode::Set::Int::MaxElement< View >, Gecode::Set::Int::NotMaxElement< View >, Gecode::Set::Int::ReMaxElement< View >, Gecode::Set::Int::Card< View >, Gecode::Set::Int::Match< View >, Gecode::Set::Int::ChannelInt< View >, Gecode::Set::Int::ChannelBool< View >, Gecode::Set::Int::Weights< View >, Gecode::Set::RelOp::SuperOfInter< View0, View1, View2 >, Gecode::Set::RelOp::SubOfUnion< View0, View1, View2 >, Gecode::Set::RelOp::Intersection< View0, View1, View2 >, Gecode::Set::RelOp::Union< View0, View1, View2 >, Gecode::Set::RelOp::IntersectionN< View0, View1 >, Gecode::Set::RelOp::UnionN< View0, View1 >, Gecode::Set::RelOp::PartitionN< View0, View1 >, Gecode::Set::Rel::Subset< View0, View1 >, Gecode::Set::Rel::NoSubset< View0, View1 >, Gecode::Set::Rel::ReSubset< View0, View1 >, Gecode::Set::Rel::Eq< View0, View1 >, Gecode::Set::Rel::ReEq< View0, View1 >, Gecode::Set::Rel::Distinct< View0, View1 >, Gecode::Set::Rel::DistinctDoit< View0 >, Gecode::Set::Sequence::Seq, and Gecode::Set::Sequence::SeqU.
virtual PropCost Gecode::Propagator::cost | ( | const Space & | home, | |
const ModEventDelta & | med | |||
) | const [pure virtual] |
Cost function.
Implemented in Gecode::Graph::Circuit::Val< View >, Gecode::Graph::Circuit::Dom< View >, Gecode::Int::Arithmetic::AbsBnd< View >, Gecode::Int::Arithmetic::AbsDom< View >, Gecode::Int::Arithmetic::MaxDom< View >, Gecode::Int::Arithmetic::NaryMaxDom< View >, Gecode::Int::Arithmetic::SqrPlusDom< VA, VB >, Gecode::Int::Arithmetic::SqrDom< View >, Gecode::Int::Arithmetic::SqrtDom< View >, Gecode::Int::Arithmetic::MultPlusDom< Val, VA, VB, VC >, Gecode::Int::Arithmetic::MultDom< View >, Gecode::Int::Bool::BoolBinary< BVA, BVB >, Gecode::Int::Bool::BoolTernary< BVA, BVB, BVC >, Gecode::Int::Bool::NaryEq< BV >, Gecode::Int::Bool::NaryOr< VX, VY >, Gecode::Int::Bool::NaryOrTrue< BV >, Gecode::Int::Bool::Clause< VX, VY >, Gecode::Int::Bool::ClauseTrue< VX, VY >, Gecode::Int::Channel::Base< Info, pc >, Gecode::Int::Channel::Dom< View, shared >, Gecode::Int::Channel::LinkSingle, Gecode::Int::Channel::LinkMulti, Gecode::Int::Count::BaseInt< VX, VY >, Gecode::Int::Count::NqInt< VX, VY >, Gecode::Int::Count::BaseView< VX, VY, VZ, shr >, Gecode::Int::Distinct::Bnd< View >, Gecode::Int::Distinct::Dom< View >, Gecode::Int::Element::Int< V0, V1, Idx, Val >, Gecode::Int::Element::View< VA, VB, VC, pc_ac >, Gecode::Int::Element::ViewDom< VA, VB, VC >, Gecode::Int::Extensional::LayeredGraph< View, Val, Degree, StateIdx >, Gecode::Int::Extensional::Base< View, subscribe >, Gecode::Int::Extensional::Basic< View, shared >, Gecode::Int::Extensional::Incremental< View >, Gecode::Int::GCC::Val< Card >, Gecode::Int::GCC::Bnd< Card >, Gecode::Int::GCC::Dom< Card >, Gecode::Int::Linear::LinBin< Val, A, B, pc >, Gecode::Int::Linear::ReLinBin< Val, A, B, pc, Ctrl >, Gecode::Int::Linear::NqBin< Val, A, B >, Gecode::Int::Linear::LinTer< Val, A, B, C, pc >, Gecode::Int::Linear::Lin< Val, P, N, pc >, Gecode::Int::Linear::DomEq< Val, View >, Gecode::Int::Linear::LinBoolInt< VX >, Gecode::Int::Linear::NqBoolInt< VX >, Gecode::Int::Linear::ReLinBoolInt< VX, VB >, Gecode::Int::Linear::LinBoolView< XV, YV >, Gecode::Int::Linear::LinBoolScale< SBAP, SBAN, VX, pcx >, Gecode::ReUnaryPropagator< View, pc, CtrlView >, Gecode::ReBinaryPropagator< View, pc, CtrlView >, Gecode::ReMixBinaryPropagator< View0, pc0, View1, pc1, CtrlView >, Gecode::Int::Rel::EqDom< View0, View1 >, Gecode::Int::Rel::NaryEqDom< View >, Gecode::Int::Rel::NaryEqBnd< View >, Gecode::Int::Rel::Nq< View >, Gecode::Int::Rel::Lex< View >, Gecode::Int::Sorted::Sorted< View, Perm >, Gecode::UnaryPropagator< View, pc >, Gecode::BinaryPropagator< View, pc >, Gecode::TernaryPropagator< View, pc >, Gecode::NaryPropagator< View, pc >, Gecode::NaryOnePropagator< View, pc >, Gecode::MixBinaryPropagator< View0, pc0, View1, pc1 >, Gecode::MixTernaryPropagator< View0, pc0, View1, pc1, View2, pc2 >, Gecode::MixNaryOnePropagator< View0, pc0, View1, pc1 >, Gecode::Kernel::UnaryWait< View >, Gecode::Kernel::NaryWait< View >, Gecode::Scheduling::Cumulatives::Val< ViewM, ViewD, ViewH, View >, Gecode::Scheduling::TaskProp< Task >, Gecode::Set::Element::ElementIntersection< SView, RView >, Gecode::Set::Element::ElementUnion< SView, RView >, Gecode::Set::Element::ElementUnionConst< SView, RView >, Gecode::Set::Element::ElementDisjoint< SView, RView >, Gecode::Set::Int::Match< View >, Gecode::Set::Int::ChannelInt< View >, Gecode::Set::Int::ChannelBool< View >, Gecode::Set::Int::Weights< View >, Gecode::IntSetPropagator< View, pcs, pci >, Gecode::IntSetRePropagator< View, pcs, pci >, Gecode::Set::RelOp::IntersectionN< View0, View1 >, Gecode::Set::RelOp::UnionN< View0, View1 >, Gecode::Set::RelOp::PartitionN< View0, View1 >, Gecode::Set::Rel::ReSubset< View0, View1 >, Gecode::Set::Rel::ReEq< View0, View1 >, Gecode::Int::Bool::BoolBinary< BV, BV >, Gecode::Int::Channel::Base< DomInfo< View >, PC_INT_DOM >, Gecode::Int::Channel::Base< ValInfo< View >, PC_INT_VAL >, Gecode::Int::Element::View< VA, VB, VC, PC_INT_DOM >, Gecode::Int::Element::View< VA, VB, VC, PC_INT_BND >, Gecode::Int::Extensional::Base< View, false >, Gecode::Int::Extensional::Base< View >, Gecode::Int::Linear::LinBin< Val, A, B, PC_INT_BND >, Gecode::Int::Linear::LinBin< Val, A, B, PC_INT_VAL >, Gecode::Int::Linear::ReLinBin< Val, A, B, PC_INT_BND, Ctrl >, Gecode::Int::Linear::ReLinBin< Val, A, B, PC_INT_BND, BoolView >, Gecode::Int::Linear::LinTer< Val, A, B, C, PC_INT_BND >, Gecode::Int::Linear::LinTer< Val, A, B, C, PC_INT_VAL >, Gecode::Int::Linear::Lin< Val, View, View, PC_INT_DOM >, Gecode::Int::Linear::Lin< Val, P, N, PC_INT_VAL >, Gecode::Int::Linear::Lin< Val, P, N, pc >, Gecode::Int::Linear::Lin< Val, P, N, PC_INT_BND >, Gecode::Int::Linear::LinBoolScale< SBAP, SBAN, VX, PC_INT_VAL >, Gecode::Int::Linear::LinBoolScale< SBAP, SBAN, VX, PC_INT_BND >, Gecode::ReUnaryPropagator< View, PC_INT_DOM, CtrlView >, Gecode::ReUnaryPropagator< View, PC_INT_BND, CtrlView >, Gecode::ReUnaryPropagator< View, PC_INT_BND, BoolView >, Gecode::ReUnaryPropagator< View, PC_INT_DOM, BoolView >, Gecode::ReBinaryPropagator< View, PC_INT_DOM, CtrlView >, Gecode::ReBinaryPropagator< View, PC_INT_BND, CtrlView >, Gecode::UnaryPropagator< View0, PC_SET_ANY >, Gecode::UnaryPropagator< BoolView, PC_BOOL_VAL >, Gecode::UnaryPropagator< SetView, PC_SET_ANY >, Gecode::BinaryPropagator< VX, PC_INT_VAL >, Gecode::BinaryPropagator< View, PC_INT_DOM >, Gecode::BinaryPropagator< View, PC_INT_VAL >, Gecode::BinaryPropagator< VX, PC_INT_DOM >, Gecode::BinaryPropagator< View, PC_INT_BND >, Gecode::BinaryPropagator< SetView, PC_SET_ANY >, Gecode::BinaryPropagator< BV, PC_BOOL_VAL >, Gecode::TernaryPropagator< IntView, PC_INT_DOM >, Gecode::TernaryPropagator< View, PC_INT_DOM >, Gecode::TernaryPropagator< View, PC_INT_BND >, Gecode::NaryPropagator< View, PC_INT_DOM >, Gecode::NaryPropagator< View, PC_INT_VAL >, Gecode::NaryPropagator< View, Int::PC_INT_DOM >, Gecode::NaryPropagator< View, PC_INT_BND >, Gecode::NaryPropagator< SetView, PC_SET_ANY >, Gecode::NaryPropagator< BV, PC_BOOL_VAL >, Gecode::NaryOnePropagator< View, PC_INT_DOM >, Gecode::NaryOnePropagator< View, PC_INT_BND >, Gecode::NaryOnePropagator< SetView, PC_SET_ANY >, Gecode::MixBinaryPropagator< VA, PC_INT_DOM, VB, PC_INT_DOM >, Gecode::MixBinaryPropagator< VA, PC_INT_BND, VB, PC_INT_BND >, Gecode::MixBinaryPropagator< View0, PC_SET_CGLB, View1, PC_SET_CLUB >, Gecode::MixBinaryPropagator< View0, PC_SET_VAL, View1, PC_SET_VAL >, Gecode::MixBinaryPropagator< View0, PC_INT_DOM, View1, PC_INT_DOM >, Gecode::MixBinaryPropagator< VX, PC_BOOL_VAL, VY, PC_BOOL_VAL >, Gecode::MixBinaryPropagator< View0, PC_INT_BND, View1, PC_INT_BND >, Gecode::MixBinaryPropagator< View0, PC_SET_ANY, View1, PC_SET_ANY >, Gecode::MixBinaryPropagator< View0, PC_SET_CLUB, View1, PC_SET_CGLB >, Gecode::MixBinaryPropagator< BoolView, PC_BOOL_VAL, IntView, PC_INT_VAL >, Gecode::MixTernaryPropagator< VA, PC_INT_BND, VB, PC_INT_BND, VC, PC_INT_BND >, Gecode::MixTernaryPropagator< View0, PC_SET_ANY, View1, PC_SET_ANY, View2, PC_SET_CLUB >, Gecode::MixTernaryPropagator< VA, PC_INT_DOM, VB, PC_INT_DOM, VC, PC_INT_DOM >, Gecode::MixTernaryPropagator< View0, PC_SET_ANY, View1, PC_SET_ANY, View2, PC_SET_ANY >, Gecode::MixNaryOnePropagator< BoolView, PC_BOOL_VAL, IntView, PC_INT_DOM >, Gecode::MixNaryOnePropagator< VX, PC_BOOL_NONE, VY, PC_BOOL_VAL >, Gecode::MixNaryOnePropagator< View0, PC_SET_ANY, View1, PC_SET_ANY >, Gecode::MixNaryOnePropagator< Gecode::Int::BoolView, Gecode::Int::PC_BOOL_VAL, View, PC_GEN_NONE >, Gecode::Scheduling::TaskProp< ManTask >, Gecode::Scheduling::TaskProp< OptTask >, Gecode::IntSetPropagator< View, PC_SET_ANY, Gecode::Int::PC_INT_BND >, Gecode::IntSetPropagator< View, PC_SET_ANY, Gecode::Int::PC_INT_DOM >, Gecode::IntSetPropagator< View, PC_SET_CARD, Gecode::Int::PC_INT_BND >, and Gecode::IntSetRePropagator< View, PC_SET_ANY, Gecode::Int::PC_INT_DOM >.
ExecStatus Gecode::Propagator::advise | ( | Space & | home, | |
Advisor & | a, | |||
const Delta & | d | |||
) | [virtual] |
Advise function.
The advisor is passed as argument a.
A propagator must specialize this advise function, if it uses advisors. The advise function must return an execution status as follows:
- ES_FAILED: the advisor has detected failure
- ES_FIX: the advisor's propagator (that is, this propagator) does not need to be run
- ES_NOFIX: the advisor's propagator (that is, this propagator) must be run
Apart from the above values, an advisor can return the result from calling the function
- ES_SUBSUMED_FIX: the advisor is subsumed, the advisor's propagator does not need to be run
- ES_SUBSUMED_NOFIX: the advisor is subsumed, the advisor's propagator must be run For more details, see the function documentation.
The delta d describes how the variable has been changed by an operation on the advisor's variable. Typically, the delta information can only be utilized by either static or member functions of views as the actual delta information is both domain and view dependent.
Reimplemented in Gecode::Int::Bool::NaryOr< VX, VY >, Gecode::Int::Bool::Clause< VX, VY >, Gecode::Int::Extensional::LayeredGraph< View, Val, Degree, StateIdx >, Gecode::Int::Extensional::Incremental< View >, Gecode::Int::Linear::EqBoolInt< VX >, Gecode::Int::Linear::GqBoolInt< VX >, Gecode::Int::Linear::ReGqBoolInt< VX, VB >, Gecode::Int::Linear::ReEqBoolInt< VX, VB >, and Gecode::Set::Int::ChannelBool< View >.
double Gecode::Propagator::afc | ( | void | ) | const [inline] |
Friends And Related Function Documentation
ExecStatus ES_SUBSUMED | ( | Propagator & | , | |
size_t | ||||
) | [friend] |
ExecStatus ES_SUBSUMED | ( | Propagator & | , | |
Space & | ||||
) | [friend] |
ExecStatus ES_FIX_PARTIAL | ( | Propagator & | , | |
const ModEventDelta & | ||||
) | [friend] |
ExecStatus ES_NOFIX_PARTIAL | ( | Propagator & | , | |
const ModEventDelta & | ||||
) | [friend] |
Member Data Documentation
size_t Gecode::Propagator::size |
The documentation for this class was generated from the following files:
- gecode/kernel/core.hpp (Revision: 10035)
- gecode/kernel/core.cpp (Revision: 10035)