Warning when re-solving a model #4448
Replies: 4 comments
-
Did you follow sat/docs/model.md -> the variable-mapping step ( |
Beta Was this translation helpful? Give feedback.
-
In 9.11 creating an interval also adds the linear constraint that enforces the start +size==end This has been removed. Still I do not know why it fails. Note that copying is tricky and error prone. I recommend rebuilding the model |
Beta Was this translation helpful? Give feedback.
-
I have narrowed down my issue, it seems that the problem appears on my model because of a variable with a start = 0 |
Beta Was this translation helpful? Give feedback.
-
printing: this is the default behavior. 0 is the default value and is not
printed.
Laurent Perron | Operations Research | ***@***.*** | (33) 1 42 68 53
00
Le mar. 26 nov. 2024 à 09:47, userdev163 ***@***.***> a
écrit :
… I have narrowed down my issue, it seems that the problem appears on my
model because of a variable with a start = 0
When I'm giving an hint solution including this variable, the warning is
generated. But when I skip this variable in the hint solution, no warning.
I have also noticed that the solveur seems to remove this start = 0 and
replace it with {} (when i print the model)
I think this may be related.
—
Reply to this email directly, view it on GitHub
<#4448 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACUPL3OHYUB2Q6A2N4LMZJL2CQ7SNAVCNFSM6AAAAABSHHBYWKVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTCMZYGE4DENI>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Im sorry but it is very difficult to put code examples for my issue. I'm using ortools 9.11. I have the following workflow in my project:
I create a scheduling model and add constraints (no overlap) until the problem is not solvable.
Then I reuse the last feasible model that I saved (using a DeepCopy) and I solve this model again adding noOverlap constraints from another source. This raises :
"Warning, an interval constraint was likely used without a corresponding linear constraint linking its start, size and end."
When I solve the model (cp_model) again via:
solver = cp_model.CpSolver()
solver.Solve(self.model)
I have tried to solve again adding no constraints and I have the same result.
My best guess for know is that I have a constraint with a start value at 0, which would be a problem when reloaded (when exported to file this start becomes empty)
What could I be doing wrong in this situation?
Beta Was this translation helpful? Give feedback.
All reactions