I would like to know if it is possible to delay propagation of the invariants. For instance, if I want to implement a complex local move involving the modification of several variables, I want the invariants to be updated only after all the variables have been modified. Is it possible, and how?
Maybe this is automatic because invariants are updated only when the "output" variables are used. But then, is there a way to trigger the propagation of all invariants (that need to be updated) otherwise than by visiting all "output" variables?
Thank you for your answer,
Jean-Noël Monette
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Propagation is triggered when you query the value of variables, so that such moves are implemented in a straightforward way.
Propagation is total, that is: all output variables are updated, except if the queried variable has been registered for partial propagation, see method Model.registerForPartialPropagation.
BTW, you can also trigger propagation yourself, by calling Model.propagate.
Last edit: Renaud De Landtsheer 2012-05-31
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
There is just one restriction with respect to propagation triggering. toString does not trigger propagation altough it queries the value of the variables. The reason is that the debugger of SCALA calls toString on every item that it displays, so that using the debugger would have huge side effect on the state of the search engine.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I would like to know if it is possible to delay propagation of the invariants. For instance, if I want to implement a complex local move involving the modification of several variables, I want the invariants to be updated only after all the variables have been modified. Is it possible, and how?
Maybe this is automatic because invariants are updated only when the "output" variables are used. But then, is there a way to trigger the propagation of all invariants (that need to be updated) otherwise than by visiting all "output" variables?
Thank you for your answer,
Jean-Noël Monette
Propagation is triggered when you query the value of variables, so that such moves are implemented in a straightforward way.
Propagation is total, that is: all output variables are updated, except if the queried variable has been registered for partial propagation, see method Model.registerForPartialPropagation.
BTW, you can also trigger propagation yourself, by calling Model.propagate.
Last edit: Renaud De Landtsheer 2012-05-31
There is just one restriction with respect to propagation triggering. toString does not trigger propagation altough it queries the value of the variables. The reason is that the debugger of SCALA calls toString on every item that it displays, so that using the debugger would have huge side effect on the state of the search engine.