[gecode-users] ask propagator

Mauricio Toro mauriciotorob at gmail.com
Mon Apr 21 11:28:34 CEST 2008


Hello,
I have some questions about the concurrent constraint programming ask
propagator.
I want to have this behavior:
\textbf{blocking\_IF} $<boolean\_var>\ x0$ \textbf{then} $<ask\_body>\
procedureBody$ \textbf{else} $<skip>$

1) In this propagator would it matter if I use domain
consistency or bounds consistency? which one should I use?
2) I am passing this function void (* procedureBody) (Space*) as an
argument.
    If I would like to pass a closure, like an object with an executing
method, instead of the function pointer.
    What kind of additional information should I include in the object?
3) What do you think about this header for the Ask Propagator:



  /**
   * \brief Concurrent Constraint Programming ASK propagator
   *
   * Requires \code #include "gecode/int/ask.hh" \endcode
   * \ingroup FuncIntProp
   */
  template <class View>
  class Ask : public UnaryPropagator<View,PC_INT_BND> {
  protected:
    using UnaryPropagator<View,PC_INT_BND>::x0;


    /// Constructor for cloning \a p
    Ask(Space* home, bool share, Ask& p);
    /// Constructor for posting
    Ask(Space* home, View x0, void (* procedureBody) (Space*));
  public:
    /// Copy propagator during cloning
    virtual Actor*     copy(Space* home, bool share);
    /// Perform propagation
    virtual ExecStatus propagate(Space* home, ModEventDelta med);
    /// Specification for this propagator
    virtual Reflection::ActorSpec spec(const Space* home,
                                        Reflection::VarMap& m) const;
    /// Post propagator according to specification
    static void post(Space* home, Reflection::VarMap& vars,
                     const Reflection::ActorSpec& spec);
    /// Mangled propagator name
    static Support::Symbol ati(void);
    /// Post bounds-consistent propagator
    /// \textbf{blocking\_IF} $<boolean\_var>\ x0$ \textbf{then}
$<ask\_body>\ procedureBody$ \textbf{else} $<skip>$
    static  ExecStatus post(Space* home, View x0, void (* procedureBody)
(Space*));
  };


Thanks for everything.

Mauricio

-- 
Mauricio Toro Bermudez
Estudiante de Ingeniería de Sistemas
Pontificia Universidad Javeriana, Colombia

Stagiare à l'Ircam
1, place Igor-Stravinsky 75004 Paris,
France de 2008 à 2009
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.ps.uni-sb.de/pipermail/users/attachments/20080421/bba53155/attachment.htm>


More information about the gecode-users mailing list