help-glpk
[Top][All Lists]
Advanced

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

[Help-glpk] dual solution


From: Zhihao Cen
Subject: [Help-glpk] dual solution
Date: Wed, 23 Jul 2008 02:06:23 -0700 (PDT)

I have a small problem and I want have the dual solution.

 

But I find that the GLPK and LP-solve give me 2 different dual solution (the primal solution and the objective value is the same).

 

Could someone help to explain the reason??

( I give the mps file. )

 

Thanks

 

GLPK:

Problem:    
   No.   Row name   St   Activity     Lower bound   Upper bound    Marginal
------ ------------ -- ------------- ------------- ------------- -------------
     1 R0           B        2071.61                            
     2 R1           NS           100           100             =       5.12392
     3 R2           NS           150           150             =       6.80022
     4 R3           NS           200           200             =       7.35016
     5 R4           NS           130           130             =      -4.45249
     6 R5           B            180           180             =
     7 R6           NS           140           140             =      -2.51445

   No. Column name  St   Activity     Lower bound   Upper bound    Marginal
------ ------------ -- ------------- ------------- ------------- -------------
     1 x1           B            100             0              
     2 x2           NL             0             0                    0.576412
     3 x3           NL             0             0                     6.39053
     4 x4           B             30             0              
     5 x5           B            120             0              
     6 x6           NL             0             0                     1.93804
     7 x7           NL             0             0                     0.28821
     8 x8           B             60             0              
     9 x9           B            140             0              

 

LP-solve :

Primal variables:

  Column name                      Value       Slack         Min         Max
  --------------------------------------------------------------------------
  x1                                 100           0     -1e+030      1e+030
  x2                                   0    0.576412         -30         100
  x3                                   0     6.39053         -30         100
  x4                                  30           0     -1e+030      1e+030
  x5                                 120           0     -1e+030      1e+030
  x6                                   0     1.93804         -60         120
  x7                                   0     0.28821        -120          30
  x8                                  60           0     -1e+030      1e+030
  x9                                 140           0     -1e+030      1e+030

Dual variables:

  Row name                         Value       Slack         Min         Max
  --------------------------------------------------------------------------
  R1                            0.671428         100         100         100
  R2                             2.34773         150         150         150
  R3                             2.89767         200         200         200
  R4                                   0         130     -1e+030      1e+030
  R5                             4.45249         180         180         180
  R6                             1.93804         140         140         140

 


Attachment: model.mps
Description: Text document


reply via email to

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