help-glpk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-glpk] Beginner questions (MIP model)


From: Andrew Makhorin
Subject: Re: [Help-glpk] Beginner questions (MIP model)
Date: Tue, 24 Feb 2009 22:28:14 +0300

> Hello Denis,


> Denis Debarbieux wrote:
>> 
>> I am a new GLPK user and I develop under Java. I would like to write a 
>> simple MIP model but I do not get the good answer. Could you help me
>> please?
>> 

> which java binding to GLPK do you use?
> Your coding does not look like using java libraries created via SWIG from
> GLPK 4.36.

It is a quite old interface to glpk using obsolete api routines.
Nevertheless the program looks correct and must work.

I rewrote the instance in cplex lp format:

Minimize
   obj: x

Subject To
   foo: x >= 7.2

Bounds
   0 <= x <= 10

General
   x

End

and obtained a correct result with glpsol:

Problem:
Rows:       1
Columns:    1 (1 integer, 0 binary)
Non-zeros:  1
Status:     INTEGER OPTIMAL
Objective:  obj = 8 (MINimum)

   No.   Row name        Activity     Lower bound   Upper bound
------ ------------    ------------- ------------- -------------
     1 foo                         8           7.2               

   No. Column name       Activity     Lower bound   Upper bound
------ ------------    ------------- ------------- -------------
     1 x            *              8             0            10 

Integer feasibility conditions:

KKT.PE: max.abs.err = 0.00e+00 on row 0
        max.rel.err = 0.00e+00 on row 0
        High quality

KKT.PB: max.abs.err = 0.00e+00 on row 0
        max.rel.err = 0.00e+00 on row 0
        High quality

End of output






reply via email to

[Prev in Thread] Current Thread [Next in Thread]