help-glpk
[Top][All Lists]
Advanced

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

Re: [Help-glpk] Re: Simplex method infeasible, IP method feasible


From: Nicolo' Giorgetti
Subject: Re: [Help-glpk] Re: Simplex method infeasible, IP method feasible
Date: Fri, 12 Sep 2003 12:11:46 +0200

> Please pull the model from my previous message, name it infeas.mod,
> and run the following program:

Dear Andrew,

Thank you very much. I've tryed your code and it works. I'm using glpk
4.1 and I still got the problem with my formulation 
I printed, with lpx_write_lpt(), both your problem and mine, and I got
the following files:

------- My infeasible problem: (infeas_lpt.lpt) --------------
\* Problem: Unknown *\

Minimize
 obj: + x(1)

Subject To
 r(1): - x(1) + x(2) + x(3) <= 0
 r(2): + x(1) <= 68.855
 r(3): - 0.22252 x(2) + 0.97493 x(3) <= 39.483
 r(4): - 0.90097 x(2) + 0.43388 x(3) <= 5.2338
 r(5): - 0.90097 x(2) - 0.43388 x(3) <= -73.042
 r(6): + 0.62349 x(2) - 0.78183 x(3) <= 76.044

Bounds
 -1e-06 <= x(1) <= 1e-06
 -1e-06 <= x(2) <= 1e-06
 -1e-06 <= x(3) <= 1e-06

End 


----- Your feasible problem: (work_mak.lpt) -------------------------

\* Problem: infeas *\

Minimize
 obj: + x(1)

Subject To
 r(2): - x(1) + x(2) + x(3) <= -0
 r(3): + x(1) <= 68.855
 r(4): - 0.22252 x(2) + 0.97493 x(3) <= 39.483
 r(5): - 0.90097 x(2) + 0.43388 x(3) <= 5.2338
 r(6): - 0.90097 x(2) - 0.43388 x(3) <= -73.042
 r(7): + 0.62349 x(2) - 0.78183 x(3) <= 76.044

Bounds
 -1000000 <= x(1) <= 1000000
 -1000000 <= x(2) <= 1000000
 -1000000 <= x(3) <= 1000000

End 
----------------------------------------

I've solved them using glpsol with extension '--lpt' and I got the
following outputs

$ glpsol --lpt infeas_lpt.lpt
lpt_read_prob: reading LP data from `infeas_lpt.lpt'...
lpt_read_prob: 3 variables, 6 constraints
lpt_read_prob: 19 lines were read
lpx_simplex: original LP has 6 rows, 3 columns, 12 non-zeros
PROBLEM HAS NO PRIMAL FEASIBLE SOLUTION
Time used:   0.0 secs
Memory used: 0.1M (60508 bytes)

$ glpsol --lpt work_mak.lpt
lpt_read_prob: reading LP data from `work_mak.lpt'...
lpt_read_prob: 3 variables, 6 constraints
lpt_read_prob: 19 lines were read
lpx_simplex: original LP has 6 rows, 3 columns, 12 non-zeros
lpx_simplex: presolved LP has 5 rows, 3 columns, 11 non-zeros
gm_scal: max / min = 4.494e+00
gm_scal: max / min = 3.016e+00
lpx_adv_basis: size of triangular part = 5
      0:   objval =  -2.000000000e+06   infeas =   1.000000000e+00 (0)
      4:   objval =   6.885450326e+01   infeas =   0.000000000e+00 (0)
OPTIMAL SOLUTION FOUND
Time used:   0.0 secs
Memory used: 0.1M (80720 bytes)


I'm doing some errors in defining the problem but I'm not able
to see where they are. Do you have any suggestion ?
Thank you very much.

Regards,
Nicolo'. 








reply via email to

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