-
Notifications
You must be signed in to change notification settings - Fork 72
Expand file tree
/
Copy pathmigration_v3_mock.sql
More file actions
40 lines (31 loc) · 2.85 KB
/
Copy pathmigration_v3_mock.sql
File metadata and controls
40 lines (31 loc) · 2.85 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
-- Mock data for v3 -> v4 migration testing
INSERT INTO Region (region) VALUES ('R1');
INSERT OR IGNORE INTO TechnologyType (label, description) VALUES ('p', 'production');
INSERT INTO Technology (tech, flag, unlim_cap, annual, reserve, curtail, retire, flex, exchange) VALUES ('T1', 'p', 0, 0, 0, 0, 0, 0, 0);
INSERT INTO TimePeriodType (label, description) VALUES ('e', 'existing');
INSERT INTO TimePeriodType (label, description) VALUES ('f', 'future');
INSERT INTO TimePeriod (sequence, period, flag) VALUES (1, 2020, 'e');
INSERT INTO TimePeriod (sequence, period, flag) VALUES (2, 2030, 'f');
INSERT INTO TimePeriod (sequence, period, flag) VALUES (3, 2040, 'f');
INSERT INTO TimeOfDay (sequence, tod) VALUES (1, 'day');
INSERT INTO TimeOfDay (sequence, tod) VALUES (2, 'night');
INSERT INTO TimeSeason (sequence, season) VALUES (1, 'winter');
INSERT INTO TimeSeason (sequence, season) VALUES (2, 'summer');
INSERT INTO TimeSegmentFraction (season, tod, segfrac) VALUES ('winter', 'day', 0.2);
INSERT INTO TimeSegmentFraction (season, tod, segfrac) VALUES ('winter', 'night', 0.1);
INSERT INTO TimeSegmentFraction (season, tod, segfrac) VALUES ('summer', 'day', 0.4);
INSERT INTO TimeSegmentFraction (season, tod, segfrac) VALUES ('summer', 'night', 0.3);
INSERT OR IGNORE INTO CommodityType (label, description) VALUES ('p', 'physical');
INSERT INTO Commodity (name, flag) VALUES ('In', 'p');
INSERT INTO Commodity (name, flag) VALUES ('Out', 'p');
INSERT INTO CapacityFactorProcess (region, season, tod, tech, vintage, factor) VALUES ('R1', 'winter', 'day', 'T1', 2030, 0.6);
INSERT INTO Efficiency (region, input_comm, tech, vintage, output_comm, efficiency) VALUES ('R1', 'In', 'T1', 2030, 'Out', 0.9);
INSERT INTO MinCapacity (region, tech, period, min_cap, units, notes) VALUES ('R1', 'T1', 2030, 10.0, 'GW', 'test op');
INSERT INTO EmissionLimit (region, period, emis_comm, value, units, notes) VALUES ('R1', 2030, 'Out', 100.0, 'kt', 'test op');
-- Split-table routing: T2 is an annual tech; its split rows must land in the *_annual tables.
INSERT INTO Technology (tech, flag, unlim_cap, annual, reserve, curtail, retire, flex, exchange) VALUES ('T2', 'p', 0, 1, 0, 0, 0, 0, 0);
INSERT INTO Efficiency (region, input_comm, tech, vintage, output_comm, efficiency) VALUES ('R1', 'In', 'T2', 2030, 'Out', 0.9);
INSERT INTO TechInputSplit (region, period, input_comm, tech, min_proportion, notes) VALUES ('R1', 2030, 'In', 'T1', 0.3, 'seasonal-tech split');
INSERT INTO TechInputSplit (region, period, input_comm, tech, min_proportion, notes) VALUES ('R1', 2030, 'In', 'T2', 0.4, 'annual-tech split');
INSERT INTO TechOutputSplit (region, period, tech, output_comm, min_proportion, notes) VALUES ('R1', 2030, 'T1', 'Out', 0.5, 'seasonal-tech split');
INSERT INTO TechOutputSplit (region, period, tech, output_comm, min_proportion, notes) VALUES ('R1', 2030, 'T2', 'Out', 0.6, 'annual-tech split');