|
From: | Kelly, Jeff (ON0F) |
Subject: | RE: [Help-glpk] LP problem with variable coeffcients (parametric LPsimplex) |
Date: | Mon, 4 Apr 2011 14:23:02 -0400 |
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: address@hidden [mailto:address@hidden On Behalf Of Paolo Rossi 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 |
[Prev in Thread] | Current Thread | [Next in Thread] |