Replies: 10 comments 10 replies
-
Hi, |
Beta Was this translation helpful? Give feedback.
-
Thanks for the CMake rework! I don't know if I should open an issue for this. I'm on Windows. When building or-tools form source, I get a I also tried the binary release. It only ships an
and errors
Also, in the windows binary release the include folder is empty and it has a different folder structure than the build from source or the binary releases for linux. |
Beta Was this translation helpful? Give feedback.
-
In switching to 9.3, in C#, using CPSAT, how does one create constant IntVars with names? I used to do: var constant = model.NewConstant(0,"do not track changes"); but that went away. In C++, I have used Is is just impossible now to add names to constant IntVars? |
Beta Was this translation helpful? Give feedback.
-
I removed it. Do you really need it ? They were merged anyway in presolve. |
Beta Was this translation helpful? Give feedback.
-
Well, it certainly isn’t a requirement, but the constants will be the only variables without names, which somewhat breaks my debugging code that dumps out the constraints.
I guess I can create a regular IntVar, with a single value instead of a range, or perhaps with a constraint fixing the value.
Are there optimizations that I will miss if I don’t use constant?
James
… On Mar 22, 2022, at 23:13, Laurent Perron ***@***.***> wrote:
I removed it. Do you really need it ?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.
|
Beta Was this translation helpful? Give feedback.
-
Or just an IntVar with a fixed domain.
Laurent Perron | Operations Research | ***@***.*** | (33) 1 42 68 53
00
Le mer. 23 mars 2022 à 16:16, James Marca ***@***.***> a
écrit :
… Well, it certainly isn’t a requirement, but the constants will be the only
variables without names, which somewhat breaks my debugging code that dumps
out the constraints.
I guess I can create a regular IntVar, with a single value instead of a
range, or perhaps with a constraint fixing the value.
Are there optimizations that I will miss if I don’t use constant?
James
> On Mar 22, 2022, at 23:13, Laurent Perron ***@***.***> wrote:
>
>
> I removed it. Do you really need it ?
>
> —
> Reply to this email directly, view it on GitHub, or unsubscribe.
> You are receiving this because you commented.
—
Reply to this email directly, view it on GitHub
<#3183 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACUPL3ONBWQN4GZ3ULSY3RLVBMYTNANCNFSM5Q5OLOFA>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Not really. Constants are merged during presolve. but you do not care.
Laurent Perron | Operations Research | ***@***.*** | (33) 1 42 68 53
00
Le mer. 23 mars 2022 à 17:14, James Marca ***@***.***> a
écrit :
… Yes I've switched to using that. There are no optimizations missed from
not using NewConstant(), correct?
—
Reply to this email directly, view it on GitHub
<#3183 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACUPL3PCE2HBVCMGGPZ4AKDVBM7MVANCNFSM5Q5OLOFA>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Some details about rewritten java layer for cp-sat ? old: model.addEqualityWithOffset(taskStart, getTaskEndVariable(relation.getPreviousTask()), -relation.getMinDelta()); new: model.addEquality(LinearExpr.sum(new LinearArgument[] {taskStart, LinearExpr.constant(-relation.getMinDelta())}),
getTaskEndVariable(relation.getPreviousTask())); I like most alternative with an operator in string like: model.arithm(taskStart, "-", relation.getMinDelta(), "=", getTaskEndVariable(relation.getPreviousTask()); But it is my own taste. |
Beta Was this translation helpful? Give feedback.
-
We recommend using the builder paradigm.
LinearExpr.newBuilder().add(var).add(offset)
Le mer. 13 avr. 2022, 00:18, gregy4 ***@***.***> a écrit :
… Some details about rewritten java layer for cp-sat ?
So far I miss any method with 'offset' in name like
addLessOrEqualWithOffset for example. It is possible to rewrite it with
LinearExpr.sum but it is very ugly to write it frequently.
old:
model.addEqualityWithOffset(taskStart,
getTaskEndVariable(relation.getPreviousTask()), -relation.getMinDelta());
new:
model.addEquality(LinearExpr.sum(new LinearArgument[] {taskStart,
LinearExpr.constant(-relation.getMinDelta())}),
getTaskEndVariable(relation.getPreviousTask()));
I like most alternative with an operator in string like
model.arithm(taskStart, "-", relation.getMinDelta(), "=",
getTaskEndVariable(relation.getPreviousTask());
But it is my own taste.
Is it possible to make CpModel class not final ? Writing my own
alternatives would be easier and I can better survive changes in CpModel
like current one.
—
Reply to this email directly, view it on GitHub
<#3183 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACUPL3MQR5AIJV4MXKBPCMDVEXZCFANCNFSM5Q5OLOFA>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Great work on the newly implemented PDLP. I'd like to ask about the next step. Specifically any plans on a GPU version to accelerate PDLP? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Platform changes
Dependencies Update
3.4.0
.2021-11-01
.3.19.1
->3.19.4
.7.0.1
->v800
Python
Features
CP-SAT
e.g.
LinearExpr.ScalProd
->LinearExpr.WeightedSum
.AddAtLeastOne
/AddAtMostOne
/AddExactlyOne
methods.AddMultiplicationConstraint(z, x, y)
in all languages.AddMultipleCircuit()
in all languagesC++
IntVar(BoolVar)
LinearExpr::Add*
and replaced them by operator e.g.LinearExpr +=
LinearExpr::BooleanSum/BooleanScalProd
, useSum/WeightedSum
CpModelBuilder::FixVariable()
which overwrite the domain of the variable to a single valueJava
LinearExpr
, add a incremental builder class:LinearExpr.newBuilder().add(x).addSum(<array of variables).build()
Circuit
,MultipleCircuit
,Cumulative
,Reservoir
,AllowedAssignment
andForbiddenAssignment
now return a specialized class with incremental API to add new variables, terms, demands…C#
Circuit
,MultipleCircuit
,Cumulative
,Reservoir
,AllowedAssignment
andForbiddenAssignment
now return a specialized class with incremental API to add new variables, terms, demands…LinearExprBuilder
class to build expression incrementally.Build System
CMake
CMake >= 3.18
Make
This discussion was created from the release v9.3 (2022/03).
Beta Was this translation helpful? Give feedback.
All reactions