Paolo;

 

That's ok, I'm a chemical engineer.

 

Unless you want to write your own MISLP you will have to linearize your
cost profiles and then have the binaries select what region or segment
the costs should be in.  It is actually a relatively easy thing to do.

 

Jeff

 

From: Paolo Rossi [mailto:[email protected]] 
Sent: Monday, April 04, 2011 3:10 PM
To: Kelly, Jeff (ON0F)
Cc: [email protected]
Subject: Re: [Help-glpk] LP problem with variable coeffcients
(parametric LPsimplex)

 

Hi Jeff,

 

thanks for that. I had figured it out in the meantime (while cradling my
son to sleep!) that the first one could be solved by something like

 

INJi <= MaxInj * BInj

Withi <= MaxWith * BWith

BInj + BWith = 1

 

which is I think exactly what you mention. So thank you very much  for
your reply, as I was wondering if my reasoning was making sense! At the
very beginning I thought I'd need to introduce BInj*INJi in the
objective function - that is why I stopped due to the introduction of
non-linearity in the objective function.

 

I get the hint from your remark on my second question but I really have
to think about how to implement it. Sorry my background is not in
operations Research..

 

Paolo 

 


 

On 4 April 2011 19:23, Kelly, Jeff (ON0F) <[email protected]>
wrote:

Paolo;

 

Your first issue of INJi * WITHi = 0 complementarity is easily modeled
by adding two binary variables for each quantity i.e., yINJi and yWITHi
then you need three constraints:

1.       INJi <= uINJi * yINJi 

2.       WITHi <= uWITHi * yWITHi

3.       yINHi + yWITHi = 1 or <= 1

4.       yINJi, yWITHi are binary

The first two constraints are semi-continuous and third is a SOS1/GUB
where the "u" prefix is the upper bound on the quantities.  A lower
bound is an exercise for you.

 

Your second issue requires piecewise linear approximation of the cost
curves due to most likely economizes/diseconomies-of-scale.  You will
need to define regions of linearity and create extra binary variables
for these regions with either SOS1 or SOS2 constraints depending on how
you implement the "separable programming" aspects.

 

I hope this helps - Jeff

 

 

From: help-glpk-bounces+jeff.kelly=honeywell.com <http://honeywell.com/>
@gnu.org <http://gnu.org/>  [mailto:help-glpk-bounces+jeff.kelly
<mailto:help-glpk-bounces%2Bjeff.kelly> =honeywell.com
<http://honeywell.com/> @gnu.org <http://gnu.org/> ] On Behalf Of Paolo
Rossi
Sent: Monday, April 04, 2011 1:48 PM
To: [email protected]
Subject: [Help-glpk] LP problem with variable coeffcients (parametric
LPsimplex)

 

Hi everyone,

 

I am trying to replicate the modelling Byers, 2006. Commodity Storage
Valuation: A linear optimization based on Traded Instruments, Energy
Economics. The author is quite concise on how the model has been
specified but it says that he used LpSolve

 

The paper assesses the value of a gas storage facility. The value is a
function of:

-          Injected quantity:                                INJ

-           Withdrawn quantity:                          WITH

-          Price paid for injections:                    Pi

-          Price paid for withdrawals:                Pw

-          cost ofinjecting one unit of gas:         ci

-          cost of withdrawing one unit of gas: cw

 

If one takes two periods, 

 

Max    -INJ1 x pi,1   +   WITH1 x pw,1   -   ci,1 x INJ1   -  cw,1 x
WITH1  -   INJ2 x pi,2    +   WITH2 x pw,2  -  ci,2 x INJ2- cw,2 x WITH2

 

Constraints

-          For each time period i, if INJi > 0 then WITHi = 0 and if
WITHi > 0 then INJi = 0 - you can either withdraw or inject. I thought
of using a binary variable but then I realised that it would need to
multiply INJi and WITHi so I got stuck as it would violate linearity of
objective functions

-           

-          For each time period I, cw,I and ci,I (cost of withdrawing
and cost of injecting) are a function of the gas stored in the facility.
The right curve here would be something similar to an exponential
function through the origin for ci, i.e. the more gas you have in the
facility the more it costs to push an extra unit of gas in. If one works
with strep functions, the formulation would be something like

ci =      1  if sum of (inj - with ) over the periods up to i  is
<= 3

              2  if sum of (inj - with ) over the periods up to i is
> 3 and <= 6

              3  if sum of (inj - with ) over the periods up to i is
>  6

 

For cw, the curve would be symmetric to the one above. 

cw =     3  if sum of (inj - with ) over the periods up to i is
<= 3

              2  if sum of (inj - with ) over the periods up to i is
> 3 and <= 6

              1  if sum of (inj - with ) over the periods up to i is
>  6

 

I am pretty stuck here so thanks a lot for any help

 

Paolo

 

 

 

_______________________________________________
Help-glpk mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-glpk

Reply via email to