Choquet Integrals Constraint Propagator. More...

#include <rchoquetpropagator.h>

Inheritance diagram for RChoquetPropagator:
[legend]
Collaboration diagram for RChoquetPropagator:
[legend]

Public Member Functions

 RChoquetPropagator (Gecode::Home home, RTestChoquet *test, Gecode::IntVarArray &V, Gecode::IntVarArray &i, Gecode::Float::FloatView cost)
 
 RChoquetPropagator (Gecode::Space &home, bool share, RChoquetPropagator &p)
 
virtual size_t dispose (Gecode::Space &home)
 
virtual Gecode::Propagator * copy (Gecode::Space &home, bool share)
 
virtual Gecode::PropCost cost (const Gecode::Space &home, const Gecode::ModEventDelta &mod) const
 
virtual Gecode::ExecStatus propagate (Gecode::Space &home, const Gecode::ModEventDelta &mod)
 
double vi (size_t id, size_t i) const
 
double Iij (size_t id, size_t i, size_t j) const
 
double ComputeChoquet (size_t choquet, R::RVector &vec) const
 
virtual ~RChoquetPropagator (void)
 

Static Public Member Functions

static Gecode::ExecStatus post (Gecode::Home home, RTestChoquet *test, Gecode::IntVarArray &V, Gecode::IntVarArray &i, Gecode::Float::FloatView cost)
 

Protected Attributes

RTestChoquetTest
 
Gecode::ViewArray
< Gecode::Int::IntView > 
v
 
Gecode::ViewArray
< Gecode::Int::IntView > 
I
 
Gecode::Float::FloatView Cost
 

Detailed Description

Choquet Integrals Constraint Propagator.

The RChoquetPropagator class provides a propagator of the constraints linked to the Choquet integrals. In practice, it waits until all the values are fixed and set the cost function.

Constructor & Destructor Documentation

RChoquetPropagator ( Gecode::Home  home,
RTestChoquet test,
Gecode::IntVarArray &  V,
Gecode::IntVarArray &  i,
Gecode::Float::FloatView  cost 
)

Constructor.

Parameters
homeHome space.
testTester.
VShapley indexes to optimize.
iInteraction indexes to optimize.
costCost function to optimize.
RChoquetPropagator ( Gecode::Space &  home,
bool  share,
RChoquetPropagator p 
)

Copy constructor.

Parameters
homeHome space.
shareInternal parameter for GeCode.
pPropagator to copy.
virtual ~RChoquetPropagator ( void  )
virtual

Destructor.

Member Function Documentation

static Gecode::ExecStatus post ( Gecode::Home  home,
RTestChoquet test,
Gecode::IntVarArray &  V,
Gecode::IntVarArray &  i,
Gecode::Float::FloatView  cost 
)
static

Function that post a Choquet integrals constraint propagator.

Parameters
homeHome space.
testTester.
VShapley indexes to optimize.
iInteraction indexes to optimize.
costCost function to optimize.
Returns
the status of operation.
virtual size_t dispose ( Gecode::Space &  home)
virtual

Release the instance.

Parameters
homeHome space.
Returns
the amount of memory to dispose.
virtual Gecode::Propagator* copy ( Gecode::Space &  home,
bool  share 
)
virtual

Create a new propagator by copy.

Parameters
homeHome space.
shareInternal parameter for GeCode.
Returns
a pointer to the propagator to create.
virtual Gecode::PropCost cost ( const Gecode::Space &  home,
const Gecode::ModEventDelta &  mod 
) const
virtual

Get the importance of this propagator.

Parameters
homeHome space.
modInternal parameter for GeCode.
Returns
PropCost::binary(PropCost::HI).
virtual Gecode::ExecStatus propagate ( Gecode::Space &  home,
const Gecode::ModEventDelta &  mod 
)
virtual

Verify if all the variables are assigned. If it is the case, the cost function is computed.

Parameters
homeHome space.
modInternal parameter for GeCode.
Returns
ES_SUBSUMED if all variables are assigned, else ES_NOFIX.
double vi ( size_t  id,
size_t  i 
) const

Get the value of a given Shapley index for a particular Choquet integral for the solution to evaluate.

Parameters
idIdentifier of the Choquet integral.
iIdentifier of the criteria.
Returns
the Shapley index.
double Iij ( size_t  id,
size_t  i,
size_t  j 
) const

Get the value of an interaction index for a particular Choquet integral for the solution to evaluate.

Parameters
idIdentifier of the Choquet integral.
iIdentifier of the first criteria.
jIdentifier of the second criteria.
Returns
the interaction index.
double ComputeChoquet ( size_t  choquet,
R::RVector vec 
) const

Compute the Choquet integral for a given identifier.

Parameters
idIdentifier of the Choquet integral.
vecVector containing the values for the different criteria.

Member Data Documentation

RTestChoquet* Test
protected

The tester.

Gecode::ViewArray<Gecode::Int::IntView> v
protected

Views on the Shapley indexes to optimize.

Gecode::ViewArray<Gecode::Int::IntView> I
protected

Views on the interaction indexes to optimize.

Gecode::Float::FloatView Cost
protected

View on the cost function to maximize.