|
From: | Leandro Barcelos |
Subject: | Re: [Help-glpk] using about GLPK |
Date: | Sat, 2 Jun 2007 12:49:43 -0300 |
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 mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/help-glpk
[Prev in Thread] | Current Thread | [Next in Thread] |