[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Help-glpk] Re: http://en.wikibooks.org/wiki/GLPK/Electricity_markets
From: |
Harley Mackenzie |
Subject: |
[Help-glpk] Re: http://en.wikibooks.org/wiki/GLPK/Electricity_markets |
Date: |
Tue, 06 Jul 2010 16:53:01 +1000 |
User-agent: |
Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.1.10) Gecko/20100512 Thunderbird/3.0.5 |
Thanks for the comments - I will try it out. There are quite a few more
examples to come so any help with the formulations is greatly appreciated.
One problem I had with the data section for an example that I havent yet
added is that I couldnt work out the correct way to implement a param
data structure to read in the following data. The only way I could get
it going was to use an external CSV file.
For parameters defined as:
set UNITS;
param no_bands;
set BANDS := 1..no_bands;
set UNITBANDS dimen 2;
param offerprice {UNITS, BANDS};
param offeravail {UNITS, BANDS};
param reg_offerprice {UNITS, BANDS};
param reg_offeravail {UNITS, BANDS};
table data IN "CSV" "energy_regulation_offers.csv": UNITBANDS <-
[unit,band], offerprice ~ energyprice, offeravail ~ energyavail,
reg_offerprice ~ regprice, reg_offeravail ~ regavail;
The data section had:
param no_bands := 5;
param : UNITS : capacity reg_capacity :=
1 10 5
2 10 5
3 10 5
4 10 5
5 10 5
6 10 5
7 10 5
8 10 5
9 10 5
10 10 5
;
where the external data was in a csv file [energy_regulation_offers.csv]:
unit,band,energyprice,energyavail,regprice,regavail
1,1,2,2,1,1
1,2,4,2,2,1
1,3,6,2,3,1
1,4,8,2,4,1
etc...
I couldnt find any combination of param data structure that could define
the same data without using the CSV file. Do you have any idea what the
param data structure should look like, as I would like to include all of
the model and data in the one file for the wiki example?
Regards,
Harley
On 6/07/10 3:41 PM, address@hidden wrote:
Hello Harley,
thank you for the examples added.
See comment on
http://en.wikibooks.org/wiki/Talk:GLPK/Electricity_markets
Best regards
Heinrich Schuchardt (Xypron)
--
------------------------------------------------------------------
Dr. Harley Mackenzie ABN: 36 348 783 012
HARD Software Web: www.hardsoftware.com
PO BOX 8004 Tel: +61 3 5222 3435
Newtown 3220, Australia Email: address@hidden
------------------------------------------------------------------
- [Help-glpk] Re: http://en.wikibooks.org/wiki/GLPK/Electricity_markets,
Harley Mackenzie <=