help-glpk
[Top][All Lists]
Advanced

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

Re: [Help-glpk] Using max on an array of decision variables


From: Mark Gritter
Subject: Re: [Help-glpk] Using max on an array of decision variables
Date: Fri, 7 Sep 2007 17:44:52 -0500

What you can do is use an auxiliary variable to hold the maximum.
Let's call that m.  Then you need a new set of constraints saying that
"m" has to be greater than or equal to all the completion times.

s.t. maxim{s in SERVERS} : m >= CompletionTime[s]

Your objective should then be to minimize m.  The minimization ensures
that m is the maximum (and no larger) of the completion times.

If you don't use CompletionTime[s] for anything else you can eliminate
it and just write your constraints in the form m >= {forumula for
completion time for s}.

Mark

On 9/7/07, glpkuser <address@hidden> wrote:
>
> As part of my decision variables, I will have an array of numbers, where each
> element is the execution time to complete tasks at a server. The LP is to
> spread some load across the servers such that the maximum completion time
> across all tasks is minimised. I cannot figure out how to express this
> objective.
>
> I have something like this:
>
> set SERVERS;
> var CompletionTimes{s in SERVERS} >= 0;
> s.t. compl{s in SERVERS} : CompletionTime[s] = .......;
>
> minimize z: max(CompletionTimes{s in SERVERS}); # Doesn't work
>
>
> set SERVERS := 1 2 3 4 5;
>
> --
> View this message in context: 
> http://www.nabble.com/Using-max-on-an-array-of-decision-variables-tf4404121.html#a12564375
> Sent from the Gnu - GLPK - Help mailing list archive at Nabble.com.
>
>
>
> _______________________________________________
> Help-glpk mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/help-glpk
>




reply via email to

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