Both the standalone and online versions of the vSPD model have previously been used to study the impact on wholesale prices of changes in demand. For example, see Wholesale price/demand sensitivity or More demand response analysis. With the release of v3.0.0 of vSPD back in September 2016, we added the capability to quickly and easily configure the model to undertake price sensitivity experiments.

The new capability enables price sensitivity experiments to be configured without having to explicitly construct an override. When the new functionality is activated, it also results in a new output file being produced that conveniently collects the results into a single file ready for further processing, such as running through a plotting script. To be clear, while this functionality is only accessible when using standalone vSPD, vSPD-online can still be used to undertake price sensitivity analysis, albeit not quite so conveniently.

The remainder of this post sets out the steps required to take advantage of the price sensitivity functionality.

  • Copy the required GDX input files into the vSPD Input folder.
  • Using the GAMS IDE, open the vSPD project file, vSPD.gpr, found in the vSPD Programs directory - File | Project | Open Project.
  • Using File | Open, open the file called, which can be found in the vSPD Programs directory and edit the three variables called runName, vSPDinputOvrdData, and opMode:
    • $setglobal runName                         TestRun     (i.e. give the model run a name - this is required)
    • $setglobal vSPDinputOvrdData        ''                 (i.e. leave string between quotes empty if no override is to be used)
    • $setglobal opMode                           DPS           (i.e. this setting is mandatory to activate the price sensitivity functionality).
  • Save changes and exit
  • Open the file called, found in the vSPD Programs directory, and enter the list of GDX files commensurate with the days for which you want to undertake price sensitivity analysis. For example:







  • Save changes and exit
  • Open the file called, found in the vSPD Programs directory, and enter the trading periods which you want covered by the analysis. For example:


TP15 * TP25

          to solve trading periods 15 through 25 for every GDX input file. Alternatively, you can enter something like:

/ TP15, TP25 / 

          to solve only trading periods 15 and 25 for every GDX input file. Finally, enter:

/ All / 

          to solve all trading periods for all GDX input files.

  • Save changes and exit
  • Open the file called Scenarios.gms, found in the Demand subdirectory of the Programs directory, and create the set of demand change scenarios - be aware that the set elements are just text labels. Even though they might contain numbers, they can't be used to perform arithmetic operations. For example:

Set drs "Demand response scenarios" /

  'decre 1.0%'

  'decre 0.8%'

  'decre 0.6%'

  'decre 0.4%'

  'decre 0.2%'


  'incre 0.2%'

  'incre 0.4%'

  'incre 0.6%'

  'incre 0.8%'

  'incre 1.0%'   / ;

  • Continue editing the file called Scenarios.gms to create a parameter of demand scaling factors, one for each scenario. Note that the parameter is defined on the previously created set. For example:

Parameter demandscale(drs) "Demand scaling factor for each demand scenario" /

 ‘decre 1.0%'    .990

 'decre 0.8%'    .992

 'decre 0.6%'    .994

 'decre 0.4%'    .996

 'decre 0.2%'    .998

 'base'             1

 'incre 0.2%'    1.002

 'incre 0.4%'    1.004

 'incre 0.6%'    1.006

 'incre 0.8%'    1.008

 'incre 1.0%'    1.010   / ;

  • Save changes and exit Scenario.gms.
  • Open the file called runvSPD.gms, found in the vSPD Program directory, in the GAMS IDE.
  • Press F9 or click on the Run GAMS button to start the model running.
  • The presence of a file called ProgressReport.txt in a subdirectory called TestRun in the vSPD Output directory will indicate the model run has finished. The results will be collected in a file called DemandPriceSensitivity.csv, which is also to be found in the TestRun output directory.