negative values in integer programming model
Posted
by
Lucia
on Stack Overflow
See other posts from Stack Overflow
or by Lucia
Published on 2012-03-31T05:24:33Z
Indexed on
2012/03/31
5:29 UTC
Read the original article
Hit count: 192
optimization
|integer
I'm new at using the glpk tool, and after writing a model for certain integer problem and running the solver (glpsol) i get negative values in some constraint that shouldn't be negative at all:
No.Row name Activity Lower bound Upper bound
8 act[1] 0 -0
9 act[2] -3 -0
10 act[2] -2 -0
That constraint is defined like this: act{j in J}: sum{i in I} d[i,j] <= y[j]*m;
where the sets and variables used are like this: param m, integer, > 0;
param n, integer, > 0;
set I := 1..m;
set J := 1..n;
var y{j in J}, binary;
As the upper bound is negative, i think the problem may be in the y[j]*m parte, of the right side of the inequality.. perhaps something with the multiplication of binarys? or that the j in that side of the constrait is undefined? i dont know... i would be greatly grateful if someone can help me with this! :) and excuse for my bad english
thanks in advance!
© Stack Overflow or respective owner