User Tools

Site Tools


2.2._data_of_the_supply_module

This is an old revision of the document!


* 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;
2.2._data_of_the_supply_module.1600144668.txt ยท Last modified: 2022/11/07 10:23 (external edit)