Get a list of variables in a Space in Gecode

130 views Asked by At

Gecode uses Spaces to represent the constraint satisfaction problem in progress: each time a decision point is reached, the Space is copied.

I want to perform analysis on these spaces in progress. Is there a way to obtain the list of variables, constraints,... that are registered in a certain Space? The API documentation doesn't seem to provide such methods.

1

There are 1 answers

2
Zayenz On

There is currently no generic way to list all the variables and propagators that are currently in a space. Furthermore, such a view would seldom be what is needed, the set of still active variables and propagators may not resemble the original set of variables and propagators created when setting up the model in any meaningful way.

As a side note Gecode does not use full copying, it is a re-computation based system with intermittent copying. Therefore, it is not correct to state that "each time a decision point is reached, the Space is copied." See chapter 9.1 in Modeling and Programming with Gecode.