Add multiple circuits on a CP model

290 views
Skip to first unread message

Ellie Choi

unread,
Aug 1, 2023, 10:22:47 PM8/1/23
to or-tools-discuss
Hi,

Is it possible to add multiple circuits on a CP model such as VRP?
I want to partition the origin weight matrix into multiple submatrices and then implement a circuit constraint respectively in one CP model.

Thanks indeed
Ellie

blind.line

unread,
Aug 1, 2023, 11:46:41 PM8/1/23
to or-tools...@googlegroups.com
Yes. 

There is also AddMultipleCircuit, but is a little convoluted to use. https://github.com/google/or-tools/blob/6897c64dbf7d18b97d3563d28dc4820e3eb52022/ortools/sat/python/cp_model.py#L1128C27-L1128C27

James

On Aug 1, 2023, at 19:24, Ellie Choi <lva...@gmail.com> wrote:

Hi,
--
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/ee144b29-466d-4ebf-b614-c8716b2b5558n%40googlegroups.com.

blind.line

unread,
Aug 2, 2023, 12:38:06 PM8/2/23
to or-tools...@googlegroups.com
Actually, perhaps I misspoke. I assumed you were talking about the CPSat solver. 

In the routing solver I think a similar functionality can be achieved using vehicle-specific cost functions 

James

On Aug 1, 2023, at 20:45, blind.line <blind.lin...@gmail.com> wrote:

Yes. 
Reply all
Reply to author
Forward
0 new messages