Generated on Thu Jan 16 2025 00:00:00 for Gecode by doxygen 1.14.0

Propagator for the cumulatives constraint More...

#include <cumulatives.hh>

Public Member Functions

virtual Actorcopy (Space &home)
 Create copy during cloning.
virtual PropCost cost (const Space &home, const ModEventDelta &med) const
 Cost function (defined as low quadratic)
virtual void reschedule (Space &home)
 Schedule function.
virtual ExecStatus propagate (Space &home, const ModEventDelta &med)
 Perform propagation.
virtual size_t dispose (Space &home)
 Dispose propagator.
ModEventDelta modeventdelta (void) const
 Return the modification event delta.
virtual ExecStatus advise (Space &home, Advisor &a, const Delta &d)
 Advise function.
virtual void advise (Space &home, Advisor &a)
 Run advisor a to be run on failure in failed space.
double afc (void) const
 Return the accumlated failure count.
unsigned int id (void) const
 Return propagator id.
PropagatorGroup group (void) const
 Return group propagator belongs to.
void group (PropagatorGroup g)
 Add propagator to group g.
bool disabled (void) const
 Whether propagator is currently disabled.
virtual ~Actor (void)
 To avoid warnings.

Static Public Member Functions

static ExecStatus post (Home home, const ViewArray< ViewM > &, const ViewArray< View > &, const ViewArray< ViewP > &, const ViewArray< View > &, const ViewArray< ViewU > &, const SharedArray< int > &, bool)
 Post propagator.
static void * operator new (size_t s, Space &home)
 Allocate memory from space.
static void operator delete (void *p, Space &home)
 No-op for exceptions.
static void * operator new (size_t s)
 Not used.
static void operator delete (void *p)
 Not used.

Protected Member Functions

 Val (Space &home, Val< ViewM, ViewP, ViewU, View > &p)
 Val (Home home, const ViewArray< ViewM > &, const ViewArray< View > &, const ViewArray< ViewP > &, const ViewArray< View > &, const ViewArray< ViewU > &, const SharedArray< int > &, bool)
ExecStatus prune (Space &home, int low, int up, int r, int ntask, int su, int *contribution, int *prune_tasks, int &prune_tasks_size)
Protected Member Functions inherited from Gecode::Propagator
 Propagator (Home home)
 Constructor for posting.
 Propagator (Space &home, Propagator &p)
 Constructor for cloning p.
Propagatorfwd (void) const
 Return forwarding pointer during copying.
Kernel::GPI::Infogpi (void)
 Provide access to global propagator information.

Protected Attributes

ViewArray< ViewM > m
ViewArray< Views
ViewArray< ViewP > p
ViewArray< Viewe
ViewArray< ViewU > u
SharedArray< int > c
const bool at_most

Detailed Description

template<class ViewM, class ViewP, class ViewU, class View>
class Gecode::Int::Cumulatives::Val< ViewM, ViewP, ViewU, View >

Propagator for the cumulatives constraint

This class implements Beldiceanu's and Carlsson's sweep-line propagation algorithm for the cumulatives constraint.

Requires

Definition at line 86 of file cumulatives.hh.

Constructor & Destructor Documentation

◆ Val() [1/2]

template<class ViewM, class ViewP, class ViewU, class View>
Gecode::Int::Cumulatives::Val< ViewM, ViewP, ViewU, View >::Val ( Space & home,
Val< ViewM, ViewP, ViewU, View > & p )
inlineprotected

Definition at line 79 of file val.hpp.

◆ Val() [2/2]

template<class ViewM, class ViewP, class ViewU, class View>
Gecode::Int::Cumulatives::Val< ViewM, ViewP, ViewU, View >::Val ( Home home,
const ViewArray< ViewM > & _m,
const ViewArray< View > & _s,
const ViewArray< ViewP > & _p,
const ViewArray< View > & _e,
const ViewArray< ViewU > & _u,
const SharedArray< int > & _c,
bool _at_most )
inlineprotected

Definition at line 47 of file val.hpp.

Member Function Documentation

◆ prune()

template<class ViewM, class ViewP, class ViewU, class View>
ExecStatus Gecode::Int::Cumulatives::Val< ViewM, ViewP, ViewU, View >::prune ( Space & home,
int low,
int up,
int r,
int ntask,
int su,
int * contribution,
int * prune_tasks,
int & prune_tasks_size )
protected

Definition at line 168 of file val.hpp.

◆ copy()

template<class ViewM, class ViewP, class ViewU, class View>
Actor * Gecode::Int::Cumulatives::Val< ViewM, ViewP, ViewU, View >::copy ( Space & home)
virtual

Create copy during cloning.

Implements Gecode::Actor.

Definition at line 123 of file val.hpp.

◆ cost()

template<class ViewM, class ViewP, class ViewU, class View>
PropCost Gecode::Int::Cumulatives::Val< ViewM, ViewP, ViewU, View >::cost ( const Space & home,
const ModEventDelta & med ) const
virtual

Cost function (defined as low quadratic)

Implements Gecode::Propagator.

Definition at line 107 of file val.hpp.

◆ reschedule()

template<class ViewM, class ViewP, class ViewU, class View>
void Gecode::Int::Cumulatives::Val< ViewM, ViewP, ViewU, View >::reschedule ( Space & home)
virtual

Schedule function.

Implements Gecode::Propagator.

Definition at line 113 of file val.hpp.

◆ propagate()

template<class ViewM, class ViewP, class ViewU, class View>
ExecStatus Gecode::Int::Cumulatives::Val< ViewM, ViewP, ViewU, View >::propagate ( Space & home,
const ModEventDelta & med )
virtual

Perform propagation.

Implements Gecode::Propagator.

Definition at line 271 of file val.hpp.

◆ post()

template<class ViewM, class ViewP, class ViewU, class View>
ExecStatus Gecode::Int::Cumulatives::Val< ViewM, ViewP, ViewU, View >::post ( Home home,
const ViewArray< ViewM > & m,
const ViewArray< View > & s,
const ViewArray< ViewP > & p,
const ViewArray< View > & e,
const ViewArray< ViewU > & u,
const SharedArray< int > & c,
bool at_most )
static

Post propagator.

Definition at line 69 of file val.hpp.

◆ dispose()

template<class ViewM, class ViewP, class ViewU, class View>
size_t Gecode::Int::Cumulatives::Val< ViewM, ViewP, ViewU, View >::dispose ( Space & home)
virtual

Dispose propagator.

Reimplemented from Gecode::Actor.

Definition at line 91 of file val.hpp.

Member Data Documentation

◆ m

template<class ViewM, class ViewP, class ViewU, class View>
ViewArray<ViewM> Gecode::Int::Cumulatives::Val< ViewM, ViewP, ViewU, View >::m
protected

Definition at line 88 of file cumulatives.hh.

◆ s

template<class ViewM, class ViewP, class ViewU, class View>
ViewArray<View> Gecode::Int::Cumulatives::Val< ViewM, ViewP, ViewU, View >::s
protected

Definition at line 89 of file cumulatives.hh.

◆ p

template<class ViewM, class ViewP, class ViewU, class View>
ViewArray<ViewP> Gecode::Int::Cumulatives::Val< ViewM, ViewP, ViewU, View >::p
protected

Definition at line 90 of file cumulatives.hh.

◆ e

template<class ViewM, class ViewP, class ViewU, class View>
ViewArray<View> Gecode::Int::Cumulatives::Val< ViewM, ViewP, ViewU, View >::e
protected

Definition at line 91 of file cumulatives.hh.

◆ u

template<class ViewM, class ViewP, class ViewU, class View>
ViewArray<ViewU> Gecode::Int::Cumulatives::Val< ViewM, ViewP, ViewU, View >::u
protected

Definition at line 92 of file cumulatives.hh.

◆ c

template<class ViewM, class ViewP, class ViewU, class View>
SharedArray<int> Gecode::Int::Cumulatives::Val< ViewM, ViewP, ViewU, View >::c
protected

Definition at line 93 of file cumulatives.hh.

◆ at_most

template<class ViewM, class ViewP, class ViewU, class View>
const bool Gecode::Int::Cumulatives::Val< ViewM, ViewP, ViewU, View >::at_most
protected

Definition at line 94 of file cumulatives.hh.


The documentation for this class was generated from the following files: