Hello everyone !
This conversation follows a question asked on stackoverflow: https://stackoverflow.com/questions/78741310/scheduling-problem-how-to-hanlde-stock-variation-hover-tasks
Laurent Perron, thank you very much for this answer !
So I tried to implement my code using a reservoire constraint (see attachment).
Unfortunately I'm still stuck on one point: my aim is to maximize and prioritize tasks with no missing parts (all the references needed for the task are in stock when the task starts). I can't figure out how to retrieve the state of the stock reservoir at a given moment. This is what I've called “GetVar” on line 54.
Do you have any ideas to help me?
Thanks in advance
Augustin
--
You received this message because you are subscribed to the Google Groups "or-tools-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to or-tools-discu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/or-tools-discuss/32a39de8-4f01-4af0-b70a-935eb13d72c9n%40googlegroups.com.
Hello Laurent,
Thank you very much for your reply. So I've adapted my code to your proposal. It's attached.
However, I don't understand why it's returning to me that there's no optimal solution, when with the JSON I give it as input, as there's enough stock for all the tasks at the start, it should place them all in 0 and that would optimize both constraints.
Do you have any ideas to help the solver find a solution?
Thanks in advance
Augustin
Hello everyone,
I went back over the code and realized that it was my way of assigning boolean constraints that was wrong. Now it works just fine (I still need to add a constraint to take into account the duration of previous tasks, but it shouldn't be too complicated). Attached the functional code if it can help someone else later.
Thanks again for your help !
I don't have the rights to set the conversation as finished/resolved. I leave it to an admin to do so.
Augustin