0

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.

Willem Van Onsem
  • 443,496
  • 30
  • 428
  • 555

1 Answers1

1

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.

Zayenz
  • 1,914
  • 12
  • 11
  • Yes, I know that it doesn't support full copying. The problem is that I want to use Gecode partly for constraint programming, but be able to uninstantiate variables such that given a first solution, I can search for different solutions, without the branching paradigm. – Willem Van Onsem Nov 11 '14 at 22:33
  • 1
    The aim is thus to create a copy of the original space. Perform a first search. And then copy **part** of the values to the second space. And perform a different search strategy on the remaining variables. – Willem Van Onsem Nov 11 '14 at 23:14