Gecode::FlatZinc::AuxVarBrancher Class Reference

Branching on the introduced variables. More...

## Classes

class | Choice
| Choice that only signals failure or success More...

## Public Member Functions

virtual bool | status (const Space &_home) const
| Check status of brancher, return true if alternatives left.
virtual Choice * | choice (Space &home)
| Return choice.
virtual Choice * | choice (const Space &, Archive &e)
| Return choice.
virtual ExecStatus | commit (Space &, const Gecode::Choice &c, unsigned int)
| Perform commit for choice c.
virtual void | print (const Space &, const Gecode::Choice &c, unsigned int, std::ostream &o) const
| Print explanation.
virtual Actor * | copy (Space &home)
| Copy brancher.
virtual size_t | dispose (Space &)
| Delete brancher and return its size.
virtual NGL * | ngl (Space &home, const Choice &c, unsigned int a) const
| Create no-good literal for choice c and alternative a.
unsigned int | id (void) const
| Return brancher id.
BrancherGroup | group (void) const
| Return group brancher belongs to.
void | group (BrancherGroup g)
| Add brancher to group g.
virtual | ~Actor (void)
| To avoid warnings.

## Static Public Member Functions

static void | post (Home home, TieBreak< IntVarBranch > int_varsel, IntValBranch int_valsel, TieBreak< BoolVarBranch > bool_varsel, BoolValBranch bool_valsel, SetVarBranch set_varsel, SetValBranch set_valsel, TieBreak< FloatVarBranch > float_varsel, FloatValBranch float_valsel)
| Post brancher.
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

| AuxVarBrancher (Home home, TieBreak< IntVarBranch > int_varsel0, IntValBranch int_valsel0, TieBreak< BoolVarBranch > bool_varsel0, BoolValBranch bool_valsel0, SetVarBranch set_varsel0, SetValBranch set_valsel0, TieBreak< FloatVarBranch > float_varsel0, FloatValBranch float_valsel0)
| Construct brancher.
| AuxVarBrancher (Space &home, AuxVarBrancher &b)
| Copy constructor.
Protected Member Functions inherited from Gecode::Brancher
| Brancher (Home home)
| Constructor for creation.
| Brancher (Space &home, Brancher &b)
| Constructor for cloning b.

## Protected Attributes

bool | done
| Flag whether brancher is done.
TieBreak< IntVarBranch > | int_varsel
IntValBranch | int_valsel
TieBreak< BoolVarBranch > | bool_varsel
BoolValBranch | bool_valsel
SetVarBranch | set_varsel
SetValBranch | set_valsel
TieBreak< FloatVarBranch > | float_varsel
FloatValBranch | float_valsel

## Detailed Description

Branching on the introduced variables.

This brancher makes sure that when a solution is found for the model variables, all introduced variables are either assigned, or the solution can be extended to a solution of the introduced variables.

The advantage over simply branching over the introduced variables is that only one such extension will be searched for, instead of enumerating all possible (equivalent) extensions.

Definition at line 102 of file flatzinc.cpp.

## Constructor & Destructor Documentation

## AuxVarBrancher() [1/2]

Gecode::FlatZinc::AuxVarBrancher::AuxVarBrancher | ( | Home | home,
|  | TieBreak< IntVarBranch > | int_varsel0,
|  | IntValBranch | int_valsel0,
|  | TieBreak< BoolVarBranch > | bool_varsel0,
|  | BoolValBranch | bool_valsel0,
|  | SetVarBranch | set_varsel0,
|  | SetValBranch | set_valsel0,
|  | TieBreak< FloatVarBranch > | float_varsel0,
|  | FloatValBranch | float_valsel0 )

inline protected

Construct brancher.

Definition at line 107 of file flatzinc.cpp.

## AuxVarBrancher() [2/2]

Gecode::FlatZinc::AuxVarBrancher::AuxVarBrancher | ( | Space & | home,
|  | AuxVarBrancher & | b )

inline protected

Copy constructor.

Definition at line 133 of file flatzinc.cpp.

## Member Function Documentation

## status()

virtual bool Gecode::FlatZinc::AuxVarBrancher::status | ( | const Space & | _home | ) | const

inline virtual

Check status of brancher, return true if alternatives left.

Implements Gecode::Brancher.

Definition at line 170 of file flatzinc.cpp.

## choice() [1/2]

virtual Choice * Gecode::FlatZinc::AuxVarBrancher::choice | ( | Space & | home | ) |

inline virtual

Return choice.

Implements Gecode::Brancher.

Definition at line 189 of file flatzinc.cpp.

## choice() [2/2]

virtual Choice * Gecode::FlatZinc::AuxVarBrancher::choice | ( | const Space & | ,
|  | Archive & | e )

inline virtual

Return choice.

Implements Gecode::Brancher.

Definition at line 211 of file flatzinc.cpp.

## commit()

virtual ExecStatus Gecode::FlatZinc::AuxVarBrancher::commit | ( | Space & | ,
|  | const Gecode::Choice & | c,
|  | unsigned int | )

inline virtual

Perform commit for choice c.

Implements Gecode::Brancher.

Definition at line 216 of file flatzinc.cpp.

## print()

virtual void Gecode::FlatZinc::AuxVarBrancher::print | ( | const Space & | ,
|  | const Gecode::Choice & | c,
|  | unsigned int | ,
|  | std::ostream & | o ) const

inline virtual

Print explanation.

Reimplemented from Gecode::Brancher.

Definition at line 220 of file flatzinc.cpp.

## copy()

virtual Actor * Gecode::FlatZinc::AuxVarBrancher::copy | ( | Space & | home | ) |

inline virtual

Copy brancher.

Implements Gecode::Actor.

Definition at line 228 of file flatzinc.cpp.

## post()

void Gecode::FlatZinc::AuxVarBrancher::post | ( | Home | home,
|  | TieBreak< IntVarBranch > | int_varsel,
|  | IntValBranch | int_valsel,
|  | TieBreak< BoolVarBranch > | bool_varsel,
|  | BoolValBranch | bool_valsel,
|  | SetVarBranch | set_varsel,
|  | SetValBranch | set_valsel,
|  | TieBreak< FloatVarBranch > | float_varsel,
|  | FloatValBranch | float_valsel )

inline static

Post brancher.

Definition at line 232 of file flatzinc.cpp.

## dispose()

virtual size_t Gecode::FlatZinc::AuxVarBrancher::dispose | ( | Space & |  | ) |

inline virtual

Delete brancher and return its size.

Reimplemented from Gecode::Actor.

Definition at line 259 of file flatzinc.cpp.

## Member Data Documentation

## done

bool Gecode::FlatZinc::AuxVarBrancher::done

protected

Flag whether brancher is done.

Definition at line 105 of file flatzinc.cpp.

## int_varsel

TieBreak<IntVarBranch> Gecode::FlatZinc::AuxVarBrancher::int_varsel

protected

Definition at line 155 of file flatzinc.cpp.

## int_valsel

IntValBranch Gecode::FlatZinc::AuxVarBrancher::int_valsel

protected

Definition at line 156 of file flatzinc.cpp.

## bool_varsel

TieBreak<BoolVarBranch> Gecode::FlatZinc::AuxVarBrancher::bool_varsel

protected

Definition at line 157 of file flatzinc.cpp.

## bool_valsel

BoolValBranch Gecode::FlatZinc::AuxVarBrancher::bool_valsel

protected

Definition at line 158 of file flatzinc.cpp.

## set_varsel

SetVarBranch Gecode::FlatZinc::AuxVarBrancher::set_varsel

protected

Definition at line 160 of file flatzinc.cpp.

## set_valsel

SetValBranch Gecode::FlatZinc::AuxVarBrancher::set_valsel

protected

Definition at line 161 of file flatzinc.cpp.

## float_varsel

TieBreak<FloatVarBranch> Gecode::FlatZinc::AuxVarBrancher::float_varsel

protected

Definition at line 164 of file flatzinc.cpp.

## float_valsel

FloatValBranch Gecode::FlatZinc::AuxVarBrancher::float_valsel

protected

Definition at line 165 of file flatzinc.cpp.

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

- gecode/flatzinc/flatzinc.cpp