[Top][All Lists]

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

Re: [Help-glpk] Problem representing c = min (a, b)

From: pradeep
Subject: Re: [Help-glpk] Problem representing c = min (a, b)
Date: Thu, 18 Nov 2010 18:52:30 +0530

one stupid way may be is

u,v binary
x,y integer >=0
M - large integer

On Thu, Nov 18, 2010 at 5:39 PM, dhiguero <address@hidden> wrote:

Hi everybody,

 I am trying to represent a problem using linear programming and I got stuck in how to model the minimum function. My problem is being c,a,b variables of the problem (not params), I would like to declare c as c = min(a,b). I have tried the approach of introducing a new binary variable B, such as:

 # c = min (a, b)
 (a-b)B >= 0
 (a-b)(1-B) <= 0
 c = aB+b(1-B)

 But the problem is that I receive a "multiplication of linear forms not allowed". Does anybody have any suggestion or solution on how to model this type of requirement? In order to clarify the context of the problem, imagine that a set of machines can be assigned different network cards (type A with speed 10, type B with speed 100). The assignation of type A and type B depends on the cost function, let's say A cost 100€ and B cost 200€. In this scenario I now want to add the cost of transfering data between 2 machines which is limited by the minimum speed.

 Thanks for your time, any comment is appreciated.

 Best Regards,


Help-glpk mailing list

reply via email to

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