How to set the mix ratio of different goods type in or tools routing solver?

20 views
Skip to first unread message

周卫东

unread,
Dec 23, 2022, 6:55:41 AM12/23/22
to or-tools-discuss
As the title, I want to add a constraint for the goods {A, B} in the vehicle :
A / B <= 0.4,即 2B >= 5A

blind.line

unread,
Dec 23, 2022, 5:40:57 PM12/23/22
to or-tools...@googlegroups.com
Try just setting a constraint like that at every node. 

You’ll have to make sure the ratio is an integer, so multiply by 100 or something, and you’ll probably also find performance might degrade as candidate solutions that do not respect the ratio will be discarded. 

James

On Dec 23, 2022, at 03:55, 周卫东 <sirzh...@gmail.com> wrote:

As the title, I want to add a constraint for the goods {A, B} in the vehicle :
A / B <= 0.4,即 2B >= 5A

--
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/1213c878-6338-4b34-8d7b-bf80055dbe07n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages