I have a constraint which sums the nonzero elements of a sparse matrix. To do this, I am using the SLICE expression, so my constraint reads like this: con test{t in ASC}:sum{u in slice(<t,*>,Map)}y>=0; Here 'Map' is a sparse matrix, with 2 mapped variables - ASC and UIN, i.e. 'Map' contains all eligible pairs of ASC and UIN. The constraint should work like this: For each element 't' of ASC, it should check whether 't' has a corresponding value 'u' for UIN variable. If there is, then it adds y for that row. However, when I run this constraint, I get a "Constraint is empty" error. What am I doing wrong here/is there a better way of doing this?
... View more