Real valued .equation()

28 views
Skip to first unread message

juha.t...@gmail.com

unread,
Feb 7, 2023, 6:34:58 AM2/7/23
to choco-solver
Hi,

I tried the example from https://choco-solver.org/docs/modeling/realconstraints/ with Choco 4.10.10

double p = 0.01d;
RealVar x = model.realVar(1, 5, p);
RealVar y = model.realVar(1, 5, p);
// x / (y-2)
//x.div(y.sub(2))).equation().post(); //has extra ')'
x.div(y.sub(2)).equation().post();

x.div(y.sub(2)) is BiCarExpression that does not support .equation().
What is the correct way to do this?

More importantly, what is the status of pure Java continuous variables and expression subsystem? I am hoping to get rid of IBEX in most or even all cases in my application. So I would prefer to build on a stable and further developing basis. 

Are there plans to get pow,  ln, tan support? (well, tan can be managed with sin/cos)

Best regards,
Juha

juha.t...@gmail.com

unread,
Feb 7, 2023, 8:05:27 AM2/7/23
to choco-solver
It seems that the example is bad: equation needs a relational expression, so I added .le(0.1) and it works.
Are there any good examples on the use of pure java system? How does it perform vs IBEX? Anything special /considreration one should known when using it?
(I tried to search for documentaiton / examples, but failed)

Best,
Juha

cpru...@gmail.com

unread,
Feb 8, 2023, 3:08:21 AM2/8/23
to choco-solver
Hi Juha
Hope you are doing well.
Indeed, the documentation is not correct, it has to be fixed.

The pure java version was retrieved from an old version of choco (1.2.4 if I'm correct), and there are still bugs on precision and rounding.
Clearly, I am no expert in continuous aspects and it always consumes lot of my time for tiny progresses.
To be honest, I would really like to get rid of Ibex too, but I can't find time or resources to move to pure java alternative.

However, if you want to contribute or know someone who wants to contribute, I would make myself available.
Best
Charles 
Reply all
Reply to author
Forward
0 new messages