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.

1 Answer 1

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.

Sign up to request clarification or add additional context in comments.

2 Comments

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.
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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.