help-glpk
[Top][All Lists]
Advanced

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

RE: [Help-glpk] two question about LP with GLPK


From: Meketon, Marc
Subject: RE: [Help-glpk] two question about LP with GLPK
Date: Thu, 7 Dec 2006 11:46:01 -0500

I think you should switch to the dual simplex method before
re-optimization.

-----Original Message-----
From: address@hidden
[mailto:address@hidden On Behalf
Of Andrew Makhorin
Sent: Wednesday, December 06, 2006 14:23
To: George Andrew
Cc: address@hidden
Subject: Re: [Help-glpk] two question about LP with GLPK

> I have 2 questions about LP with glpk.
> 1) How to deal with problems with constraint boundary disturbance
quickly.
> For example, originally I have L_i<x_i<U_i (i=1,...n), when I get the
answer
> of x, how can I get another answer with glpk quickly to
> L_i-e<x_i<U_i+e,where e is a number(such as 0.2 or 0.5)?

You need to change bounds and then call lpx_simplex; this routine
retains the basis from the last call, so in this case it will start
from the current basis performing re-optimization.

>  
> 2) If x_i can only be some real number defined in a known table which
> satisfy L_i<x_i<U_i. For example 1<x_1<2 and x_1 can only possibly be
a
> number in the table of {1.1,1.13,1.5,1.77,1.93}.The table has no
special
> structure other than ascending sorted. How can I deal with such
problems in
> glpk?

This can be modeled with binary variables as follows:

Let A = {a1, a2, ..., an} be a set of values which x can take on,
and z1, z2, ..., zn be binary variables, where zj = 1 means that
x = aj. Then the following two constraints should be introduced:

z1 + z2 + ... + zn = 1

x = a1 * z1 + a2 * z2 + ... + an * zn


PS: George, please check your computer and mail agent for viruses.
Your message posted to help-glpk was corrupted by a chinese virus;
you will see that when the message will come back to you from the list,
because you are subscribed. I resent your message to the list, so you
do not need to send it again.



_______________________________________________
Help-glpk mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/help-glpk
---------------------------------------------------------------------------- 
This e-mail and any attachments may be confidential or legally privileged.  If 
you received this message in error or are not the intended recipient, you 
should destroy the e-mail message and any attachments or copies, and you are 
prohibited from retaining, distributing, disclosing or using any information 
contained herein.  Please inform us of the erroneous delivery by return e-mail. 

Thank you for your cooperation.
---------------------------------------------------------------------------- 





reply via email to

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