Tobias,

Adding the first constraints yields:
S1 + S2 >= -2A

Similarly adding the second set of constraints:
S3 + S4 <= 2B

If A and B are positive (which you didn't specify) then
The minimum of S1+S2 is -2A, and the maximum of S3+S4 is 2B.

Thus, the minimum of S1+S2-S3-S4 is -2(A+B).  

Ravi. 

----------------------------------------------------------------------------
-------

Ravi Varadhan, Ph.D.

Assistant Professor, The Center on Aging and Health

Division of Geriatric Medicine and Gerontology 

Johns Hopkins University

Ph: (410) 502-2619

Fax: (410) 614-9625

Email: [EMAIL PROTECTED]

Webpage:  http://www.jhsph.edu/agingandhealth/People/Faculty/Varadhan.html

 

----------------------------------------------------------------------------
--------

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Tobias Schlottmann
Sent: Wednesday, July 18, 2007 1:24 PM
To: r-help@stat.math.ethz.ch
Subject: [R] Linear programming question

 Hi everybody,    
  consider please an optimization problem:  
   
  minimize   sum S1+S2
   
  Subject to :  y - x =< A + S1
                     x - y =< A + S2
   
  and we want to add two more constraints:
   
                   y - x =< B - S3
                   x - y =< B - S4
   
  where A is a small constant value and B is a large constant value, S1 and
S2 are surplus and S3 and S4 are slack variables.
   
  S3 and S4 have to be maximized in objective function. As objective
function, is this correct?  :
   
  minimize sum S1+ S2 - S3 -S4
   
  where actually we want to minimize S1 and S2; and maximize S3 and S4.
   
  If it is not correct, what to do ?
   
  Thank you for any guide.
   
  Tobias

 
---------------------------------


        [[alternative HTML version deleted]]

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to