Cloud Stack Ninja

I am new to linear programming, and I am having trouble finding a solution to an easy problem.

I am using the language GMPL in the pragramme Gusek. My problem is that the variables are initially always greater than 0, but I need a -inf<x3<=0 bound. I have literally tried everything, and I haven't seen any solution to this problem.

The problem looks like:

var x1;
var x2;
var x3;

z: 9*x1+6*x2+4*x3;

subject to

c1: x1+2*x2-3*x3<=11;
c2: x1+x2+3*x3<=10;
c3: 4*x1+3*x2-2*x3>=24;


-inf < x3 <= 0


The "bounds" syntax doesn't work really. I mean it is not a valid syntax to my best knowledge, but as I said, I am new to this field. The problem is easily solved by hand, I know, but I'd like to be able to solve similar problems of bigger scale.

Thx in advance

Read more here:

Content Attribution

This content was originally published by Matyas at Recent Questions - Stack Overflow, and is syndicated here via their RSS feed. You can read the original post over there.

%d bloggers like this: