-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Constraints reuse #919
Comments
I guess you are using the constraint solver engine.
I would recommend you use the CP-SAT solver as the original CP solver is in
maintenance mode.
With the CP-SAT solver, you cannot create a model without adding it to the
solver. So this question is moot IMO :-)
Laurent Perron | Operations Research | lperron@google.com | (33) 1 42 68 53
00
Le sam. 3 nov. 2018 à 17:07, xuanc <notifications@github.com> a écrit :
… Comparing to the "define solver -> solver.makeConstraint" way, the "define
a constraint -> add the constraint to a model/solver" way made constraints
reusable?
When the overall model is complex and difficult to solver directly,
constraint reuse is usual by iteratively solve two decomposed models with
(largely) overlapped constraints.
Is it possible?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#919>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AKj17bx99o6hTx0jhe6IY6Z3IHkLxmjcks5urb85gaJpZM4YM3rW>
.
|
I will close the issue. Please reopen if you need help. |
I was using the MILP wrapper/solver. For instance, in GAMS we can define that the model consists several constraints, where constraints are reusable in other models. https://www.gams.com/latest/gamslib_ml/libhtml/gamslib_gapmin.html |
The linear solver has no concept of constraints created but not added.
If you want to disable a constraint, just change its LB/UB to -inf, +inf
Laurent Perron | Operations Research | lperron@google.com | (33) 1 42 68 53
00
Le mer. 19 déc. 2018 à 04:44, xuanc <notifications@github.com> a écrit :
… I was using the MILP wrapper/solver.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<#919 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AKj17TCttO8vZpEvOZlp7i4vIaWpaoUMks5u6bYSgaJpZM4YM3rW>
.
|
Are you planning to develop the following feature? It strongly adds applicability.
|
Short answer: no.
Long answer: I challenge the usefulness. Most times, the code is divided
into blocks, one reads the data, and one build the model from that data.
Adding a layer of decomposition is just adding parameters or filters to the
code building block.
So instead of changing your model, you just call the model building block
with different parameters.
Thanks
Laurent Perron | Operations Research | lperron@google.com | (33) 1 42 68 53
00
Le jeu. 20 déc. 2018 à 07:03, xuanc <notifications@github.com> a écrit :
… Are you planning to develop the following feature? It strongly adds
applicability.
Comparing to the "define solver -> solver.makeConstraint" way, the "define
a constraint -> add the constraint to a model/solver" way made constraints
reusable?
When the overall model is complex and difficult to solver directly,
constraint reuse is usual by iteratively solve two decomposed models with
(largely) overlapped constraints.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<#919 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AKj17dDxYIrTwDMWxOwMBAqLXjUzcKx9ks5u6ygUgaJpZM4YM3rW>
.
|
https://amsterdamoptimization.com/pdf/benders.pdf Here is an example. GAMS uses: model /constraints 1, constraints, ... / |
I understand decomposition, and benders.
I am just saying you can tweak your model on the fly.
You can already change the model and resolve.
Laurent Perron | Operations Research | lperron@google.com | (33) 1 42 68 53
00
Le lun. 30 sept. 2019 à 10:35, xuanc <notifications@github.com> a écrit :
… https://amsterdamoptimization.com/pdf/benders.pdf
Here is an example.
GAMS uses: model /constraints 1, constraints, ... /
to flexibly define models/sub models/relaxed models ... in a word, models
with different constraints to implement decomposition / iteration
algorithms of "hard" problems.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<#919?email_source=notifications&email_token=ACUPL3PM72CM6WKK7TEQPR3QMG25PA5CNFSM4GBTPLLKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD744ABY#issuecomment-536461319>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ACUPL3KHTPKBTMOOXQXLTGDQMG25PANCNFSM4GBTPLLA>
.
|
Comparing to the "define solver -> solver.makeConstraint" way, the "define a constraint -> add the constraint to a model/solver" way made constraints reusable?
When the overall model is complex and difficult to solver directly, constraint reuse is usual by iteratively solve two decomposed models with (largely) overlapped constraints.
Is it possible?
The text was updated successfully, but these errors were encountered: