Skip to content

Commit

Permalink
General update of moo branch
Browse files Browse the repository at this point in the history
-Update of the temoa_moo file: in f2lowest_rule, now emissions are cumulative and not anymore only related to 2050
-Deletion of unnecessary files
  • Loading branch information
gianvito-colucci committed Jul 22, 2024
1 parent 4f721e9 commit a821eea
Show file tree
Hide file tree
Showing 82 changed files with 81 additions and 12,565 deletions.
982 changes: 0 additions & 982 deletions data_files/PowerSector.dat

This file was deleted.

1,708 changes: 0 additions & 1,708 deletions data_files/PowerSector.sql

This file was deleted.

Binary file removed data_files/PowerSector.sqlite
Binary file not shown.
153 changes: 80 additions & 73 deletions data_files/PowerSector_Backup.sql → data_files/PowerSector_2050.sql
Original file line number Diff line number Diff line change
Expand Up @@ -353,81 +353,64 @@ CREATE TABLE "comm_emi_MOO" (
INSERT INTO "comm_emi_MOO" VALUES ('TOT_CO2','');

--EnergySR
CREATE TABLE "commodity_supplyshare" (
"comm_name" text,
"notes" text,
PRIMARY KEY("comm_name")
);
INSERT INTO "commodity_supplyshare" VALUES ('ELC_COA','');
INSERT INTO "commodity_supplyshare" VALUES ('ELC_NGA','');
INSERT INTO "commodity_supplyshare" VALUES ('ELC_WIN','');
INSERT INTO "commodity_supplyshare" VALUES ('ELC_BIO','');
INSERT INTO "commodity_supplyshare" VALUES ('ELC_GEO','');
INSERT INTO "commodity_supplyshare" VALUES ('ELC_HYD','');
INSERT INTO "commodity_supplyshare" VALUES ('ELC_SOL','');
INSERT INTO "commodity_supplyshare" VALUES ('ELC_H2','');
INSERT INTO "commodity_supplyshare" VALUES ('ELC_NUC','');
INSERT INTO "commodity_supplyshare" VALUES ('ELC_IMP','');

--EnergySR
CREATE TABLE "ConcentrationIndexImport_energy" (
"regions" text,
"commodity" text,
"periods" integer,
"index_global" real,
"concentrationimport_units" text,
"concentrationimport_notes" text,
PRIMARY KEY("regions","commodity","periods"),
FOREIGN KEY("commodity") REFERENCES "commodities"("comm_name"),
CREATE TABLE "EnergyCommodityConcentrationIndex" (
"regions" text,
"comm_name" text,
"periods" integer,
"concentration_index" real,
"concentration_index_units" text,
"concentration_index_notes" text,
PRIMARY KEY("regions","comm_name","periods"),
FOREIGN KEY("comm_name") REFERENCES "commodities"("comm_name"),
FOREIGN KEY("periods") REFERENCES "time_periods"("t_periods")
);
INSERT INTO "ConcentrationIndexImport_energy" VALUES ('IT','ELC_COA',2050,0.98,'[-]','');
INSERT INTO "ConcentrationIndexImport_energy" VALUES ('IT','ELC_NGA',2050,1.39,'[-]','');
INSERT INTO "ConcentrationIndexImport_energy" VALUES ('IT','ELC_H2',2050,0.94,'[-]','');
INSERT INTO "ConcentrationIndexImport_energy" VALUES ('IT','ELC_NUC',2050,1.11,'[-]','');
INSERT INTO "ConcentrationIndexImport_energy" VALUES ('IT','ELC_BIO',2050,0.71,'[-]','');
INSERT INTO "EnergyCommodityConcentrationIndex" VALUES ('IT','ELC_COA',2050,0.98,'[-]','');
INSERT INTO "EnergyCommodityConcentrationIndex" VALUES ('IT','ELC_NGA',2050,1.39,'[-]','');
INSERT INTO "EnergyCommodityConcentrationIndex" VALUES ('IT','ELC_H2',2050,0.94,'[-]','');
INSERT INTO "EnergyCommodityConcentrationIndex" VALUES ('IT','ELC_NUC',2050,1.11,'[-]','');
INSERT INTO "EnergyCommodityConcentrationIndex" VALUES ('IT','ELC_BIO',2050,0.71,'[-]','');

--MaterialSR
CREATE TABLE "TechnologySupplyRisk_material" (
"regions" text,
"tech" text,
"vintage" integer,
"technologySR_material" real,
"technologySR_material_units" text,
"technologySR_material_notes" text,
CREATE TABLE "TechnologyMaterialSupplyRisk" (
"regions" text,
"tech" text,
"vintage" integer,
"tech_msr" real,
"tech_msr_units" text,
"tech_msr_notes" text,
PRIMARY KEY("regions","tech","vintage"),
FOREIGN KEY("tech") REFERENCES "technologies"("tech"),
FOREIGN KEY("vintage") REFERENCES "time_periods"("t_periods")
);
-- Storage
INSERT INTO "TechnologySupplyRisk_material" VALUES ('IT','STG_ELC_CEN_BTT',2050,7.3E-01,'1/GW','');
INSERT INTO "TechnologyMaterialSupplyRisk" VALUES ('IT','STG_ELC_CEN_BTT',2050,7.3E-01,'1/GW','');
-- Electricity sector
INSERT INTO "TechnologySupplyRisk_material" VALUES ('IT','ELC_PV_N',2050,9.7E-03,'1/GW',''); --9.7E-03 (c-Si 95%), 9.5E-02 (CIGS 50%)
INSERT INTO "TechnologySupplyRisk_material" VALUES ('IT','ELC_WIN_ON_N',2050,2.7E+00,'1/GW','');
INSERT INTO "TechnologySupplyRisk_material" VALUES ('IT','ELC_WIN_OF_N',2050,9.2E+00,'1/GW','');
INSERT INTO "TechnologySupplyRisk_material" VALUES ('IT','ELC_GEO_N',2050,5.1E-01,'1/GW','');
INSERT INTO "TechnologySupplyRisk_material" VALUES ('IT','ELC_HYD_N',2050,2.1E-03,'1/GW','');
INSERT INTO "TechnologySupplyRisk_material" VALUES ('IT','ELC_BIO_N',2050,4.7E-02,'1/GW','');
INSERT INTO "TechnologySupplyRisk_material" VALUES ('IT','ELC_NUC_N',2050,8.1E-02,'1/GW','');
INSERT INTO "TechnologySupplyRisk_material" VALUES ('IT','ELC_H2_N',2050,1.4E-03,'1/GW','');
INSERT INTO "TechnologySupplyRisk_material" VALUES ('IT','ELC_COA_N',2050,7.2E-02,'1/GW','');
INSERT INTO "TechnologySupplyRisk_material" VALUES ('IT','ELC_NGA_N',2050,3.3E-02,'1/GW','');
INSERT INTO "TechnologyMaterialSupplyRisk" VALUES ('IT','ELC_PV_N',2050,9.7E-03,'1/GW',''); --9.7E-03 (c-Si 95%), 9.5E-02 (CIGS 50%)
INSERT INTO "TechnologyMaterialSupplyRisk" VALUES ('IT','ELC_WIN_ON_N',2050,2.7E+00,'1/GW','');
INSERT INTO "TechnologyMaterialSupplyRisk" VALUES ('IT','ELC_WIN_OF_N',2050,9.2E+00,'1/GW','');
INSERT INTO "TechnologyMaterialSupplyRisk" VALUES ('IT','ELC_GEO_N',2050,5.1E-01,'1/GW','');
INSERT INTO "TechnologyMaterialSupplyRisk" VALUES ('IT','ELC_HYD_N',2050,2.1E-03,'1/GW','');
INSERT INTO "TechnologyMaterialSupplyRisk" VALUES ('IT','ELC_BIO_N',2050,4.7E-02,'1/GW','');
INSERT INTO "TechnologyMaterialSupplyRisk" VALUES ('IT','ELC_NUC_N',2050,8.1E-02,'1/GW','');
INSERT INTO "TechnologyMaterialSupplyRisk" VALUES ('IT','ELC_H2_N',2050,1.4E-03,'1/GW','');
INSERT INTO "TechnologyMaterialSupplyRisk" VALUES ('IT','ELC_COA_N',2050,7.2E-02,'1/GW','');
INSERT INTO "TechnologyMaterialSupplyRisk" VALUES ('IT','ELC_NGA_N',2050,3.3E-02,'1/GW','');
-- CCUS, Power
INSERT INTO "TechnologySupplyRisk_material" VALUES ('IT','CCUS_ELC_OXY_NGA',2050,5.7E-02,'1/GW','');
INSERT INTO "TechnologyMaterialSupplyRisk" VALUES ('IT','CCUS_ELC_OXY_NGA',2050,5.7E-02,'1/GW','');
-- Dummy
--INSERT INTO "TechnologySupplyRisk_material" VALUES ('IT','DMY_PHY_NON_ANNUAL',2050,1.0E+10,'1/GW','');
--INSERT INTO "TechnologyMaterialSupplyRisk" VALUES ('IT','DMY_PHY_NON_ANNUAL',2050,1.0E+10,'1/GW','');

--MaterialSR
CREATE TABLE "MaterialIntensity" (
"regions" text,
"material" text,
"tech" text,
"vintage" integer,
"mat_int" real,
"regions" text,
"comm_name" text,
"tech" text,
"vintage" integer,
"mat_int" real,
"mat_int_units" text,
"mat_int_notes" text,
PRIMARY KEY("regions","tech","material","vintage"),
FOREIGN KEY("material") REFERENCES "commodities"("comm_name"),
PRIMARY KEY("regions","tech","comm_name","vintage"),
FOREIGN KEY("comm_name") REFERENCES "commodities"("comm_name"),
FOREIGN KEY("tech") REFERENCES "technologies"("tech"),
FOREIGN KEY("vintage") REFERENCES "time_periods"("t_periods")
);
Expand Down Expand Up @@ -584,7 +567,7 @@ INSERT INTO "PlanningReserveMargin" VALUES ('IT',0.35);
CREATE TABLE "tech_groups" (
"tech" text,
"notes" text,
PRIMARY KEY(tech)
PRIMARY KEY("tech")
);
-- H2
INSERT INTO "tech_groups" VALUES ('UPS_IMP_H2','');
Expand All @@ -599,18 +582,18 @@ CREATE TABLE "groups" (
INSERT INTO "groups" VALUES ('H2_SUPPLY_GRP','');

CREATE TABLE "TechGroupWeight" (
"regions" text,
"tech" text,
"group_name" text,
"weight" real,
"weight" real,
"tech_desc" text,
PRIMARY KEY("tech","group_name","regions")
PRIMARY KEY("tech","group_name")
);
-- H2
INSERT INTO "TechGroupWeight" VALUES ('IT','UPS_IMP_H2','H2_SUPPLY_GRP',1.0,'');
INSERT INTO "TechGroupWeight" VALUES ('IT','H2_GEN','H2_SUPPLY_GRP',1.0,'');
INSERT INTO "TechGroupWeight" VALUES ('UPS_IMP_H2','H2_SUPPLY_GRP',1.0,'');
INSERT INTO "TechGroupWeight" VALUES ('H2_GEN','H2_SUPPLY_GRP',1.0,'');

CREATE TABLE "MinActivityGroup" (
"regions" text,
"periods" integer,
"group_name" text,
"min_act_g" real,
Expand All @@ -619,16 +602,18 @@ CREATE TABLE "MinActivityGroup" (
);

CREATE TABLE "MaxActivityGroup" (
"regions" text,
"periods" integer,
"group_name" text,
"max_act_g" real,
"notes" text,
PRIMARY KEY("periods","group_name")
);
-- H2
INSERT INTO "MaxActivityGroup" VALUES (2050,'H2_SUPPLY_GRP',1000,'PJ');
INSERT INTO "MaxActivityGroup" VALUES ('IT',2050,'H2_SUPPLY_GRP',1000,'PJ');

CREATE TABLE "MinCapacityGroup" (
"regions" text,
"periods" integer,
"group_name" text,
"min_cap_g" real,
Expand All @@ -637,6 +622,7 @@ CREATE TABLE "MinCapacityGroup" (
);

CREATE TABLE "MaxCapacityGroup" (
"regions" text,
"periods" integer,
"group_name" text,
"max_cap_g" real,
Expand Down Expand Up @@ -1581,13 +1567,15 @@ CREATE TABLE "Output_VMat_Cons" (
"regions" text,
"scenario" text,
"sector" text,
"material" text,
"material_comm" text,
"tech" text,
"vintage" integer,
"vmat_cons" real,
PRIMARY KEY("regions","scenario","material","vintage"),
PRIMARY KEY("regions","scenario","material_comm","tech","vintage"),
FOREIGN KEY("vintage") REFERENCES "time_periods"("t_periods"),
FOREIGN KEY("sector") REFERENCES "sector_labels"("sector"),
FOREIGN KEY("material") REFERENCES "commodities"("comm_name")
FOREIGN KEY("material_comm") REFERENCES "commodities"("comm_name"),
FOREIGN KEY("tech") REFERENCES "technologies"("tech")
);
--In case of MOO, Objective = f1* = f1 - s*c/o(f2)
CREATE TABLE "Output_Objective" (
Expand All @@ -1602,27 +1590,46 @@ CREATE TABLE "Output_Slack_MOO" (
PRIMARY KEY("scenario")
);
--CostMOO
CREATE TABLE "Output_TotalSystemCost" (
CREATE TABLE "Output_TotalCosts" (
"regions" text,
"scenario" text,
"total_system_cost" real
"t_periods" integer,
"total_costs" real,
PRIMARY KEY("regions","scenario","t_periods"),
FOREIGN KEY("t_periods") REFERENCES "time_periods"("t_periods")
FOREIGN KEY("regions") REFERENCES "regions"("regions")
);

--EmissionsMOO
CREATE TABLE "Output_TotalEmissions" (
"regions" text,
"scenario" text,
"t_periods" integer,
"total_emissions" real,
PRIMARY KEY("scenario")
PRIMARY KEY("regions","scenario","t_periods"),
FOREIGN KEY("t_periods") REFERENCES "time_periods"("t_periods")
FOREIGN KEY("regions") REFERENCES "regions"("regions")
);
--EnergySR
CREATE TABLE "Output_EnergySupplyRisk" (
"regions" text,
"scenario" text,
"t_periods" integer,
"energySR" real,
PRIMARY KEY("scenario")
PRIMARY KEY("regions","scenario","t_periods"),
FOREIGN KEY("t_periods") REFERENCES "time_periods"("t_periods")
FOREIGN KEY("regions") REFERENCES "regions"("regions")
);

--MaterialSR
CREATE TABLE "Output_MaterialSupplyRisk" (
"regions" text,
"scenario" text,
"t_periods" integer,
"materialSR" real,
PRIMARY KEY("scenario")
PRIMARY KEY("regions","scenario","t_periods"),
FOREIGN KEY("t_periods") REFERENCES "time_periods"("t_periods")
FOREIGN KEY("regions") REFERENCES "regions"("regions")
);

CREATE TABLE "Output_Emissions" (
Expand Down
Binary file removed data_files/PowerSector_Backup.sqlite
Binary file not shown.
Binary file removed data_files/PowerSector_test_run_model/test_run.xlsx
Binary file not shown.
Loading

0 comments on commit a821eea

Please sign in to comment.