User Tools

Site Tools


2.2._data_of_the_supply_module

Data of the Supply Module

Presenter: Alexander Gocht

  • Overview
  • Structure of the Data cube
  • Exercise 2.2.1
  • Exercise 2.2.2

Exercise 2.2.2 Load from the data file and store all data for your region

* specify a scratch dir required in sets.gms
$setglobal scrdir  '..\output\temp\'
 
* include set definition in CAPRI
$include sets.gms
 
* define the sub set to filter the loaded data below
set Ourregion(RALL) /"DED00000"/;
set Time /"Y"/;
 
* define a parameter to which the data is loaded
parameter Data(OurRegion,COLS,ROWS,Time);
 
* load the data from CAPRI database
execute_load "..\output\results\simini\sim_ini_21230.gdx" data;
 
 
* make some didactic calculation for gross production at region
data(OurRegion,"GROF",O,"Y") =
               SUM(PACT_TO_O(MPACT,O), data(OurRegion,MPACT,"LEVL","Y")*
                             data(OurRegion,MPACT,O,"Y"))*0.001;
 
* store result to inspect it
execute_unload "our_results.gdx" data, rows, cols, RALL, PACT_TO_O;

Lecture

Downloads

Download presentation:2_2_data_of_the_supply_module.pptx

2.2._data_of_the_supply_module.txt · Last modified: 2022/11/07 10:23 by 127.0.0.1