Problem with section 2.1.4 of MiniZinc tutorial

254 views
Skip to first unread message

Alberto Paparella

unread,
Oct 6, 2021, 6:03:35 PM10/6/21
to MiniZinc
Dear all,

I am a MiniZinc newbie, and I am currently taking my first steps following the MiniZinc handbook.
However, trying to solve the loan.mzn model presented in section 2.1.4 Real Number Solving using the COIN-BC solver, it gave me the following error:

Running loan.mzn
MiniZinc: evaluation error:

C:\Program Files\MiniZinc\share\minizinc\linear\redefinitions.mzn:320:
in if-then-else expression

C:\Program Files\MiniZinc\share\minizinc\linear\redefinitions.mzn:327:
in call 'abort'

Abort: Unable to create linear formulation for the `float_times(P, X_INTRODUCED_1_, X_INTRODUCED_2_)` constraint. Define QuadrFloat=true if your linear solver supports quadratic constraints, or use integer variables.

Process finished with non-zero exit code 1
Finished in 154msec

Anyone had the same problem and find any solution? Or could it be that something changed since the writing of the tutorial?

Thank you in advance!
Best regards,
Alberto

guido.tack

unread,
Oct 6, 2021, 6:11:29 PM10/6/21
to MiniZinc
Hi,

the loan problem requires some additional input to be solved with CBC. You'll have to run it with one of the given data files loan1.dzn, loan2.dzn or loan3.dzn.

Cheers,
Guido
Reply all
Reply to author
Forward
0 new messages