[Scip] Constraints which involve two variables
Martina Astegno
talpatina at yahoo.it
Thu Apr 22 15:21:49 MEST 2010
Hi all!
I'm modelling a clustering problem and it requires to use a binary variable for each element and for each cluster.
w[i][j] = 1 if element i is in cluster j; 0 otherwise.
I have to define another binary variable, z[i][l][j][h], that is equal to 1 if (w[i][j] and w[l][h]) = 1; 0 otherwise.
AND logic operator is implemented introducing 3 new constraints in the problem:
z[i][l][j][h] <= w[i][j]
z[i][l][j][h] <= w[l][h]
z[i][l][j][h] >= w[i][j] + w[l][h] -1
So, when I have to create the solver, to define the constraint on z variable, in function SCIPcreateConsLinear(), I don't know how to fix the lb/ub equal to the value of the w variable, because it's SCIP_VAR* type.
It's possible to know the value associated to a variable with the function SCIPgetSolVal() only after solve method and not during the solver construction.
Any idea what's going on?
Thanks!
Marty
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://listserv.zib.de/mailman/private/scip/attachments/20100422/01c8eb17/attachment.html
More information about the Scip
mailing list