-
Notifications
You must be signed in to change notification settings - Fork 145
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Providing Model.renewSolver() #490
Comments
After discussion with @jgFages :
|
Here is what calling
|
I also let |
Hi Charles , |
Though question. |
See #491 to discuss about nogoods |
Is the search strategy set back to null? |
By the way, this changes on reset will require a lot of changes for me developing dischoco based on choco4. I don't know what is the case for other choco users. In order to make it easier for us maybe it would be better to make Solver extendable and its attributes protected!! |
@jgFages the move is set to a new instance of MoveBinaryDFS which automatically erase the search strategy. So the answer is yes. |
thanks! Well, you have to redefined the search strategy, I believe you can redefine that you want to record nogoods... |
I finally made the choice of two methods instead of one:
The former restores the solver as before running the last resolution call, the latter restores the solver as after its creation. |
Hi thanks! here is my gradle (android studio) output:
|
Hi marquessbr, Please use the google groups and not an unrelated closed issue to post that kind of questions. Best, |
Hi, thanks, @cprudhom! |
I'm considering to create in
Model
a method namedrenewSolver()
that erases the current solver and replaces it by a new one.Such a method should be helpful when
Solver.reset()
is not enough, for instance when dealing with search monitors, counters or explanation (that is aLearner
but also anExplainer
).By creating a new solver, the model remains the same, but the way it can be solved may be adapted.
The following part should be reconsidered to avoid unexpected behavior:
Model.setObjective(boolean, IntVar)
should not create the objective manager, but only records the parameters. Then, at initialization, the solver should create the objective manager.Model.clearObjective()
There are also some restrictions to consider:
solver.reset()
on the old solver before creating the new one.Alternatively, we can consider a
deepReset()
inSolver
, that acts as a solver renewal, but that may be confusing with currentreset()
.In both cases, the actions about objective should be done.
The text was updated successfully, but these errors were encountered: