Hi all,

We were recently asked how to add a new offer to vSPD for testing purposes. To be clear, this question pertains to the standalone version of vSPD, and not vSPD-online.

Currently, we can easily modify the existing offer in vSPD but it is not straightforward to add a new (undeclared) offer into vSPD. In this topic, I will present some sample code that can be used to add a new offer ("ABC2201 XYZ0" ) to an existing location/pnode (e.g. HAM2201). I would recomend that this code snippet be inserted between code sections 4 and 5 of the vSPDSolve.gms file as follows:

*=====================================================================================

* 4. Input data overrides - declare and apply (include vSPDoverrides.gms)

*=====================================================================================

 $ontext

 - At this point, vSPDoverrides.gms is included into vSPDsolve.gms if an override file defined by the $setglobal vSPDinputOvrdData in vSPDSetting.inc exists.

 - All override data symbols have the characters 'Ovrd' appended to the original symbol name. After declaring the override symbols, the override data is installed and the original symbols are overwritten.

 - Note that the Excel interface permits a limited number of input data symbols to be overridden. The EMI interface will create a GDX file of override values for all data inputs to be overridden. If operating in standalone mode, overrides can be installed by any means the user prefers - GDX file, $include file, hard-coding, etc. But it probably makes sense to mimic the GDX file as used by EMI.

$offtext

 

$if exist "%ovrdPath%%vSPDinputOvrdData%.gdx"  $include vSPDoverrides.gms

*--------- adding a new generation offer ---------------------------------------------

$onmulti

*1. Declare a new offer (Ex: "ABC2201 XYZ0")

set      i_Offer       'Adding generation offer'   / 'ABC2201 XYZ0' / ;

$offmulti

 

*2. Map the new offer to an existing pnode (Ex: "HAM2201")

i_tradePeriodOfferNode(tp, 'ABC2201 XYZ0', 'HAM2201') = yes ;

 

*3. Map the new offer to an existing trader (Ex: "38486") . You can use any trader in the i_trader list

i_tradePeriodOfferTrader(tp,'ABC2201 XYZ0','38486')  = yes ;

 

*4. Adding offer paremeter data

i_tradePeriodOfferParameter(tp,'ABC2201 XYZ0','i_initialMW')  = 0;

i_tradePeriodOfferParameter(tp,'ABC2201 XYZ0','i_reserveGenerationMaximum')  = 10000;

i_tradePeriodOfferParameter(tp,'ABC2201 XYZ0','i_windOffer')  = 0;

i_tradePeriodOfferParameter(tp,'ABC2201 XYZ0','i_FKbandMW') = 0;

i_tradePeriodOfferParameter(tp,'ABC2201 XYZ0','i_rampUpRate') = 9999;

i_tradePeriodOfferParameter(tp,'ABC2201 XYZ0','i_rampDnRate') = 9999;

i_tradePeriodRiskGenerator(tp,'ABC2201 XYZ0') = no ;

 

*5. Adding offer quantity and price

i_tradePeriodEnergyOffer(tp,'ABC2201 XYZ0','t1','i_generationMWoffer') = 100 ;

i_tradePeriodEnergyOffer(tp,'ABC2201 XYZ0','t1','i_generationMWofferPrice') = 0.01;

i_tradePeriodEnergyOffer(tp,'ABC2201 XYZ0','t2','i_generationMWoffer') = 100 ;

i_tradePeriodEnergyOffer(tp,'ABC2201 XYZ0','t2','i_generationMWofferPrice') = 1000;

 

*=====================================================================================

* 5. Initialise constraint violation penalties (CVPs)

*=====================================================================================

Please post any related questions below, new questions in a new discussion, or drop us an email via the emi email address.

Hope this helps,

Tuong Nguyen.