Groups
Groups
Sign in
Groups
Groups
or-tools-discuss
Conversations
About
Send feedback
Help
solver.Add(solver.Sum()<X) Or solver.Add(sum .. Or model.Add( sum .. ?
272 views
Skip to first unread message
CK CK
unread,
Oct 11, 2023, 1:56:11 PM
10/11/23
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to or-tools-discuss
I read an example
https://developers.google.com/optimization/assignment
Should we use
solver.Add(
solver.
Sum(
only CP?
model.Add(
sum
in MIP ?
When we use
solver.Add(
sum
?
Priidik Vilumaa
unread,
Oct 12, 2023, 2:05:00 AM
10/12/23
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to or-tools-discuss
Add the constraint as per the solver you are using requires. If you do it wrong you'll hear about it.
sum vs Sum:
https://groups.google.com/g/or-tools-discuss/c/IaozQRNxcIE/m/lnPZLwQmAgAJ
Best,
Priidik
CK CK
unread,
Oct 12, 2023, 3:15:35 PM
10/12/23
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to or-tools-discuss
Thanks!
if you know the size is small, use sum(). If the size is data dependent, use Sum().
The API is cp_model.LinearExpr.Sum() for CP-SAT
четверг, 12 октября 2023 г. в 09:05:00 UTC+3,
vil...@gmail.com
:
Reply all
Reply to author
Forward
0 new messages