6

assert requires a bool in the test part, and don't support var bool. A suggestion is to rewrite the increasing constraint to a loop with single asserts with bool expressions. For example: include "globals.mzn"; int: n = 5; array[1..n] of 1..n: x = [5,4,3,1,2]; constraint forall(i in 1..n-1) ( assert(x[i] <= x[i+1], "x is not increasing") ); solve ...


6

Before implementing anything, you need to understand the equations. A good approach is to think in terms of resources. When handling capacity constraints, you are dealing with a load resource which is limited to the vehicle's capacity. When dealing with constraints linked to time, you need an extra resource for this. Each of these resources can be delt with ...


5

Some of the coin-or open-source solvers like "couenne" can be used via MiniZn. You can follow the instruction of installation in this link. Info about Couenne: Couenne (Convex Over and Under ENvelopes for Nonlinear Estimation) is a branch&bound algorithm to solve Mixed-Integer Nonlinear Programming (MINLP) problems and aims at finding global optima of ...


5

With constraint solvers, I think it is generally desirable to exploit global constraints as much as is possible. As an alternative to your resource constraint, have a look at the section on the "cumulative" constraint (and the example using it) in the MiniZinc Handbook.


4

Of the constraint based solvers JaCoP (https://github.com/radsz/jacop ) and Gecode (https://www.gecode.org/) has support for float decision variables combined with nonlinear constraints. Choco (https://choco-solver.org/ ) is supposed to have support for float variables but I got errors when running float variable models. I would also add ECLiPSe CLP's ic ...


Only top voted, non community-wiki answers of a minimum length are eligible