Examples ======== Sample scripts are distributed with the *pyaeso* source in the ``examples`` directory. These show how *pyaeso* might be used to build useful utilities and publication quality postscript, pdf, or raster graphs that could be used for books or for automated web applications. Currently distributed sample scripts are: * ``list_participants.py`` - prints a list of market participants. * ``simple.py`` - prints market equilibrium points for previous day. * ``marginal_prices.py`` - prints marginal price points for present and previous day. * ``print_gen_output.py`` - prints current output of Alberta power generators. * ``print_aieslog.py`` - prints snapshots of the Alberta Interconnected Electric Sysem (AIES) Event Log. ``list_participants.py`` ------------------------ An application to list market participants. Sample output:: Market Participants in Alphabetical Order According to AESO ETS '1016651 Alberta Ltd.' '3070281 Nova Scotia Company' '514285 AB. LTD.' '949675 Alberta Ltd' '955846 Alberta Ltd.' '967051 Alberta Ltd.' '982979 Alberta Ltd.' '994819 Alberta Ltd.' 'ADM Agri-Industries Company' 'AECO Gas Storage Partnership' 'AESO - Market' 'AESO - Transmission' 'API Grain Processors Ltd.' 'ARC Resources Ltd' 'ASTC Power Partnership' 'ATCO Electric' 'ATCO Electric Default Supply' 'ATCO Midstream Ltd' 'ATCO Power' 'ATCO Power (J.V. with CNRL)' 'ATCO Power (J.V. with Nova)' [ output truncated to save space ] ``simple.py`` ------------- A very simple application that prints market equilibrium price/volume pairs for the previous day (generated 2010-01-20). Sample output:: Yesterday's market clearing price/demand points. 2010-01-19 01:00:00-07:00 $28.03 7798.0MW 2010-01-19 02:00:00-07:00 $15.81 7711.0MW 2010-01-19 03:00:00-07:00 $24.47 7675.0MW 2010-01-19 04:00:00-07:00 $37.68 7644.0MW 2010-01-19 05:00:00-07:00 $39.29 7677.0MW [ output ommitted to save space ] 2010-01-19 20:00:00-07:00 $52.87 9224.0MW 2010-01-19 21:00:00-07:00 $52.53 9084.0MW 2010-01-19 22:00:00-07:00 $58.98 8821.0MW 2010-01-19 23:00:00-07:00 $46.64 8421.0MW 2010-01-20 00:00:00-07:00 $47.17 8051.0MW ``marginal_prices.py`` ---------------------- An application that prints marginal price points for present and previous day (generated 2010-02-16). Sample output:: Recent Marginal Pool Prices: ============================ 2010-02-16 11:00:00-07:00 $50.05 2010-02-16 10:56:00-07:00 $50.05 2010-02-16 10:55:00-07:00 $49.88 2010-02-16 10:53:00-07:00 $49.05 2010-02-16 10:46:00-07:00 $47.00 [ output ommitted to save space ] 2010-02-15 02:00:00-07:00 $30.12 2010-02-15 01:33:00-07:00 $30.12 2010-02-15 01:00:00-07:00 $31.80 2010-02-15 00:43:00-07:00 $31.80 2010-02-15 00:00:00-07:00 $33.88 ``print_aieslog.py`` ---------------------- An application that prints snapshots of the AIES event log. .. versionadded:: 0.5 Sample output (generated 2010-03-10):: Alberta Interconnected Electric System Event Log -==============================================- 2010-03-10 17:38:00-07:00, 922 Line returned to service. 2010-03-10 07:45:00-07:00, 922L out of Service 2010-03-10 02:45:00-07:00, Genesee #2 on line. 2010-03-09 22:18:00-07:00, Sundance #1 on line. 2010-03-09 17:53:00-07:00, 9L57 line back in service 2010-03-09 17:33:00-07:00, 922 line back in service 2010-03-09 07:26:00-07:00, 9L57 out of service 2010-03-09 07:25:00-07:00, 922L out of service 2010-03-08 23:06:00-07:00, Genesee #2 off line. 2010-03-08 16:57:00-07:00, Wabamun #4 on line. 2010-03-08 10:11:00-07:00, Wabamun #4 off line. 2010-03-08 10:00:00-07:00, Wabamun #4 on line. 2010-03-08 02:04:00-07:00, Wabamun #4 off line. 2010-03-07 20:50:00-07:00, Sundance #1 off line. 2010-03-07 15:18:00-07:00, 5L92 back in service. 2010-03-07 12:22:00-07:00, Sheerness #1 on line. 2010-03-07 07:31:00-07:00, Sheerness #1 off line. 2010-03-07 04:40:00-07:00, Sheerness #2 off line. 2010-03-06 09:09:00-07:00, 5L92 out of service as per schedule. 2010-03-04 17:06:00-07:00, Sundance #6 on line. ``print_gen_output.py`` ----------------------- An application that prints the output state of Alberta generators. .. versionadded:: 0.5 Sample output (generated 2010-03-10):: Current Alberta Generator Unit Outputs -====================================- MCR = Maximum continuous rating TNG = Total net generation DCR = Dispatched (and accepted) Contingency Reserve time, unit, MCR, TNG, DCR 2010-03-10 19:04:00-07:00, Coal, 5946, 5145, 0 2010-03-10 19:04:00-07:00, Gas, 5071, 3036, 224 2010-03-10 19:04:00-07:00, Hydro, 871, 217, 255 2010-03-10 19:04:00-07:00, Other, 264, 175, 0 2010-03-10 19:04:00-07:00, Wind, 629, 315, 0 2010-03-10 19:04:00-07:00, Battle River #3, 148, 148, 0 2010-03-10 19:04:00-07:00, Battle River #4, 148, 137, 0 [ output ommitted to save space ] 2010-03-10 19:04:00-07:00, Drayton Valley, 11, 10, 0 2010-03-10 19:04:00-07:00, Grande Prairie EcoPower, 25, 21, 0 2010-03-10 19:04:00-07:00, Weldwood, 50, 31, 0 2010-03-10 19:04:00-07:00, Westlock, 17, 17, 0 2010-03-10 19:04:00-07:00, Whitecourt Power, 25, 27, 0