[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Help-glpk] using about GLPK
From: |
lvkai |
Subject: |
[Help-glpk] using about GLPK |
Date: |
Sat, 2 Jun 2007 11:19:41 +0400 |
hello,
how are you?
I want to know how to solve the IP (not normal LP problem,but the problem whose
result is Integer)?
I have made the model as follow:
#problem.mod
#variables
var x1 >= 0;
var x2 >= 0;
#objective
maximize z: 3*x1 + 2*x2;
#constraints
s.t. firstCondition: 2*x1 + 3*x2 <= 14;
s.t. secondCondition: 2*x1 + x2 <= 9;
end;
but when I type :glpsol -m problem.mod -o result
the final result is 14.75 but not a interger
can you help me?
thank you!
°Ù Íò Íæ ŒÒ Í¬ Íæ µÄ ÀÖ Ô°£¬ÈË Æø ±¬ ·¢ µÄ ÃÎ »Ã Î÷ ÓÎ
hello,
how are you?
I want to know how to solve the IP (not normal LP problem,but the problem whose result is Integer)?
I have made the model as follow:
#problem.mod
#variables
var x1 >= 0;
var x2 >= 0;
#objective
maximize z: 3*x1 + 2*x2;
#constraints
s.t. firstCondition: 2*x1 + 3*x2 <= 14;
s.t. secondCondition: 2*x1 + x2 <= 9;
end;
but when I type :glpsol -m problem.mod -o result
the final result is 14.75 but not a interger
can you help me?
thank you!
°Ù Íò Íæ ¼Ò Í¬ Íæ µÄ ÀÖ Ô°£¬ÈË Æø ±¬ ·¢ µÄ ÃÎ »Ã Î÷ ÓÎ
- [Help-glpk] using about GLPK,
lvkai <=