[Top][All Lists]

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

Re: [Help-glpk] Solving two optimization problems using the same model

From: Meketon, Marc
Subject: Re: [Help-glpk] Solving two optimization problems using the same model
Date: Sat, 2 Mar 2013 15:45:09 -0600

You can define a parameter to do this:


param IsModel1 := 1; #to run model 2, change this to IsModel1 := 0;


minimize IsModel1 * ( [the objective function of the first model]) + (1-IsModel1) * ([the objective function of the second model]);


subject to: Some_Constraint_in_Model2_Not_in_Model1

  (1-IsModel1) * ([the left-hand-side of the constraint] ) = (1-IsModel1)*([the right hand side of the constraint]);




From: help-glpk-bounces+address@hidden [mailto:help-glpk-bounces+address@hidden On Behalf Of Eduardo León
Sent: Saturday, March 02, 2013 12:59 PM
To: address@hidden
Subject: [Help-glpk] Solving two optimization problems using the same model


I want to make a model to solve two interrelated minimization problems. Both problems are largely the same: they are defined in terms of the same sets, are parametrized by the same data, have the same decision variables and largely the same constraints. The only differences between the two problems are:

1. They have different objective functions, let's call them f1 and f2 for problems 1 and 2.
2. Problem 2 has one additional constraint: f1's value in problem 2's solution cannot be more than 10% greater than f1's value in problem 1's solution.

Summarizing, problem 1 is:

minimize obj1: f1;
s.t. a bunch of constraints;

And problem 2 is:

minimize obj2: f2;
s.t. a bunch of constraints; # the same as in problem 1
s.t. deviation: f1 <= 1.1 * (problem 1's optimum);

Is there any way to handle these two optimization problems using a single model file?

Eduardo León

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]