[gecode-users] Generating constraints

Mikael Zayenz Lagerkvist zayenz at gmail.com
Tue Oct 28 16:08:59 CET 2008


On Tue, Oct 28, 2008 at 3:47 PM, Max <chaosangel at gmx.de> wrote:
> I'm not sure if i can use minimodel, do all the operators have the same
> return value?
> I just tested it and 2 things occur to me:
> Gecode::MiniModel::LinExpr<Gecode::IntVar> operator*(const
> Gecode::MiniModel::LinExpr<Gecode::IntVar>&, int)
> Gecode::MiniModel::LinExpr<Gecode::IntVar> operator*(int, const
> Gecode::MiniModel::LinExpr<Gecode::IntVar>&)
> do exists, but no variant of the operator which takes both sides a
> LinExpr<IntVar>
> Furthermore a constant -> so an integer, cannot be converted to a linear
> expression.
>
> Is there a reason for that, it would be so nice to implement it that way at
> least on my side of the code :-)

The reason is that it implements linear expressions (hence the LinExpr
name), so no term of the type variable*variable is allowed.

Cheers,
Mikael

-- 
Mikael Zayenz Lagerkvist, http://www.ict.kth.se/~zayenz/




More information about the gecode-users mailing list