Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
c16e6cd
Move days_per_period parameter to config
idelder Mar 3, 2026
dcae359
Remove days_per_period from all sql files
idelder Mar 3, 2026
5b2ddd3
First pass at removing period index on seasons
idelder Mar 4, 2026
fc3b8c1
Update test sets for removal of period indexed seasons
idelder Mar 4, 2026
49d9095
Remove period index from time_next dicts
idelder Mar 4, 2026
bb54662
Update time_manual to remove period index
idelder Mar 4, 2026
d73a664
Remove period index from several tables
idelder Mar 4, 2026
5aeee57
Update test_system legacy values for more storage frac constraints
idelder Mar 4, 2026
8b548ef
Remove season_label table
idelder Mar 5, 2026
4b0e730
Change time_season_sequential pk to only seas_seq
idelder Mar 5, 2026
e0ea360
Fix ramp rate constraints to adjust limit to hourly output
idelder Mar 5, 2026
bb243ca
Add hours column to time_of_day
idelder Mar 6, 2026
fbf1408
Move segment_fraction definition to season tables
idelder Mar 6, 2026
e23f267
Fix sequencing of model construction for time params
idelder Mar 6, 2026
ba9ecc1
Update seasonal storage season weight adjustment
idelder Mar 6, 2026
c211edb
Update test values for new seg_frac definition as no longer rounded
idelder Mar 6, 2026
7419317
Fix two bugs in new season_seq definition
idelder Mar 6, 2026
495e26c
Remove erroneous fk from limit_storage_level_fraction
idelder Mar 6, 2026
9f8ea11
Update hours column of time_of_day to REAL not INTEGER
idelder Mar 6, 2026
52981e0
Reinforce 0 to 1 constraint on segfrac
idelder Mar 6, 2026
6c0d467
Remove erroneous season fk from output_storage_level
idelder Mar 6, 2026
e944356
Fix season fk in output_curtailment
idelder Mar 6, 2026
9076cfc
Fix storage fraction constraints in example dbs
idelder Mar 6, 2026
598f461
Fix 0 to 1 constraint on segment fractions
idelder Mar 6, 2026
11563a9
Fix index construction for limit_storage_level_fraction and add prope…
idelder Mar 6, 2026
4454147
Remove period from deprecated cfp check
idelder Mar 7, 2026
71cffe7
Update unit cost explorer tool
idelder Mar 7, 2026
ba2b2a0
Update sql data validation
idelder Mar 7, 2026
4ff3814
Add 0 to 1 sql check on limit_storage_level_fraction
idelder Mar 7, 2026
f6eba06
Change some param domains to PositiveReals to avoid divide-by-zero er…
idelder Mar 7, 2026
17a0ead
Make time_of_day consistent with test sql style
idelder Mar 7, 2026
ec2f3af
Remove redundant time_season entries from survival_curve test sql
idelder Mar 7, 2026
866a3a6
Change INSERT to REPLACE in time_of_day for utopia test
idelder Mar 7, 2026
e37e8cf
Make sequence column unique in season tables
idelder Mar 7, 2026
74da33a
Update data_files temoa_schema_v4
idelder Mar 8, 2026
ead3a39
adapting migrator to changes in v4 schema and adding test for migration
idelder Mar 8, 2026
b65aad5
Merge branch 'unstable' of https://github.com/TemoaProject/temoa into…
idelder Mar 24, 2026
f48bd7e
Rename time_season_sequential and remove unneeded season index
idelder Mar 23, 2026
c08bcad
Rename time_season_to_sequential (name was wrong)
idelder Mar 24, 2026
bbc69b7
Add sequence ordering to critical ordered time sets in loading
idelder Mar 24, 2026
c984fa2
Resolve some merge issues
idelder Mar 24, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Make time_of_day consistent with test sql style
  • Loading branch information
idelder authored and ParticularlyPythonicBS committed Mar 10, 2026
commit 17a0ead9925feb74c1d697a975229935469dd120
2 changes: 1 addition & 1 deletion tests/testing_data/annualised_demand.sql
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ REPLACE INTO "technology" VALUES('non_annual','p','energy',NULL,NULL,0,0,0,0,0,0
REPLACE INTO "technology_type" VALUES('p','production technology');
REPLACE INTO "technology_type" VALUES('pb','baseload production technology');
REPLACE INTO "technology_type" VALUES('ps','storage production technology');
REPLACE INTO "time_of_day" (sequence, tod, hours) VALUES(0,'D1',24);
REPLACE INTO "time_of_day" VALUES(0,'D1',24,NULL);
REPLACE INTO "time_period" VALUES(0,2000,'f');
REPLACE INTO "time_period" VALUES(1,2001,'f');
REPLACE INTO "time_period_type" VALUES('e','existing vintages');
Expand Down
4 changes: 2 additions & 2 deletions tests/testing_data/emissions.sql
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ REPLACE INTO "technology" VALUES('TechEndOfLife','p','energy',NULL,NULL,0,0,0,0,
REPLACE INTO "technology_type" VALUES('p','production technology');
REPLACE INTO "technology_type" VALUES('pb','baseload production technology');
REPLACE INTO "technology_type" VALUES('ps','storage production technology');
REPLACE INTO "time_of_day" (sequence, tod, hours) VALUES(1,'TOD1',12);
REPLACE INTO "time_of_day" (sequence, tod, hours) VALUES(2,'TOD2',12);
REPLACE INTO "time_of_day" VALUES(1,'TOD1',12,NULL);
REPLACE INTO "time_of_day" VALUES(2,'TOD2',12,NULL);
REPLACE INTO "time_period" VALUES(1,1999,'e');
REPLACE INTO "time_period" VALUES(2,2000,'f');
REPLACE INTO "time_period" VALUES(3,2005,'f');
Expand Down
18 changes: 5 additions & 13 deletions tests/testing_data/materials.sql
Original file line number Diff line number Diff line change
Expand Up @@ -362,10 +362,10 @@ REPLACE INTO "technology" VALUES('ELEC_INTERTIE','p','electricity',NULL,NULL,0,0
REPLACE INTO "technology_type" VALUES('p','production technology');
REPLACE INTO "technology_type" VALUES('pb','baseload production technology');
REPLACE INTO "technology_type" VALUES('ps','storage production technology');
REPLACE INTO "time_of_day" (sequence, tod, hours) VALUES(1,'morning',6);
REPLACE INTO "time_of_day" (sequence, tod, hours) VALUES(2,'afternoon',6);
REPLACE INTO "time_of_day" (sequence, tod, hours) VALUES(3,'evening',6);
REPLACE INTO "time_of_day" (sequence, tod, hours) VALUES(4,'overnight',6);
REPLACE INTO "time_of_day" VALUES(1,'morning',6,NULL);
REPLACE INTO "time_of_day" VALUES(2,'afternoon',6,NULL);
REPLACE INTO "time_of_day" VALUES(3,'evening',6,NULL);
REPLACE INTO "time_of_day" VALUES(4,'overnight',6,NULL);
REPLACE INTO "time_period" VALUES(1,1990,'e');
REPLACE INTO "time_period" VALUES(2,2000,'f');
REPLACE INTO "time_period" VALUES(3,2010,'f');
Expand All @@ -376,12 +376,4 @@ REPLACE INTO "time_period_type" VALUES('f','future');
REPLACE INTO "time_season" VALUES(1,'summer',0.25,NULL);
REPLACE INTO "time_season" VALUES(2,'autumn',0.25,NULL);
REPLACE INTO "time_season" VALUES(3,'winter',0.25,NULL);
REPLACE INTO "time_season" VALUES(4,'spring',0.25,NULL);
REPLACE INTO "time_season" VALUES(5,'summer',0.25,NULL);
REPLACE INTO "time_season" VALUES(6,'autumn',0.25,NULL);
REPLACE INTO "time_season" VALUES(7,'winter',0.25,NULL);
REPLACE INTO "time_season" VALUES(8,'spring',0.25,NULL);
REPLACE INTO "time_season" VALUES(9,'summer',0.25,NULL);
REPLACE INTO "time_season" VALUES(10,'autumn',0.25,NULL);
REPLACE INTO "time_season" VALUES(11,'winter',0.25,NULL);
REPLACE INTO "time_season" VALUES(12,'spring',0.25,NULL);
REPLACE INTO "time_season" VALUES(4,'spring',0.25,NULL);
4 changes: 2 additions & 2 deletions tests/testing_data/mediumville.sql
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,8 @@ REPLACE INTO "technology" VALUES('GeoHeater','p','residential','hydro','',0,0,0,
REPLACE INTO "technology_type" VALUES('p','production technology');
REPLACE INTO "technology_type" VALUES('pb','baseload production technology');
REPLACE INTO "technology_type" VALUES('ps','storage production technology');
REPLACE INTO "time_of_day" (sequence, tod, hours) VALUES(1,'d1',12);
REPLACE INTO "time_of_day" (sequence, tod, hours) VALUES(2,'d2',12);
REPLACE INTO "time_of_day" VALUES(1,'d1',12,NULL);
REPLACE INTO "time_of_day" VALUES(2,'d2',12,NULL);
REPLACE INTO "time_period" VALUES(1,2020,'e');
REPLACE INTO "time_period" VALUES(2,2025,'f');
REPLACE INTO "time_period" VALUES(3,2030,'f');
Expand Down
8 changes: 4 additions & 4 deletions tests/testing_data/seasonal_storage.sql
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,10 @@ REPLACE INTO "technology" VALUES('demand','p','electricity',NULL,NULL,0,0,0,0,0,
REPLACE INTO "technology_type" VALUES('p','production technology');
REPLACE INTO "technology_type" VALUES('pb','baseload production technology');
REPLACE INTO "technology_type" VALUES('ps','storage production technology');
REPLACE INTO "time_of_day" (sequence, tod, hours) VALUES(0,'a',6);
REPLACE INTO "time_of_day" (sequence, tod, hours) VALUES(1,'b',6);
REPLACE INTO "time_of_day" (sequence, tod, hours) VALUES(2,'c',6);
REPLACE INTO "time_of_day" (sequence, tod, hours) VALUES(3,'d',6);
REPLACE INTO "time_of_day" VALUES(0,'a',6,NULL);
REPLACE INTO "time_of_day" VALUES(1,'b',6,NULL);
REPLACE INTO "time_of_day" VALUES(2,'c',6,NULL);
REPLACE INTO "time_of_day" VALUES(3,'d',6,NULL);
REPLACE INTO "time_period" VALUES(0,2000,'f');
REPLACE INTO "time_period" VALUES(1,2005,'f');
REPLACE INTO "time_period_type" VALUES('e','existing vintages');
Expand Down
2 changes: 1 addition & 1 deletion tests/testing_data/simple_linked_tech.sql
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ REPLACE INTO "technology" VALUES('FAKE_SOURCE','p','supply',NULL,NULL,1,0,0,0,0,
REPLACE INTO "technology_type" VALUES('p','production technology');
REPLACE INTO "technology_type" VALUES('pb','baseload production technology');
REPLACE INTO "technology_type" VALUES('ps','storage production technology');
REPLACE INTO "time_of_day" (sequence, tod, hours) VALUES(1,'day',24);
REPLACE INTO "time_of_day" VALUES(1,'day',24,NULL);
REPLACE INTO "time_period" VALUES(0,1995,'e');
REPLACE INTO "time_period" VALUES(1,2000,'f');
REPLACE INTO "time_period" VALUES(2,2005,'f');
Expand Down
10 changes: 5 additions & 5 deletions tests/testing_data/storageville.sql
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,11 @@ REPLACE INTO "technology" VALUES('batt','ps','electric','electric','',0,0,0,0,0,
REPLACE INTO "technology_type" VALUES('p','production technology');
REPLACE INTO "technology_type" VALUES('pb','baseload production technology');
REPLACE INTO "technology_type" VALUES('ps','storage production technology');
REPLACE INTO "time_of_day" (sequence, tod, hours) VALUES(1,'d1', 4.8);
REPLACE INTO "time_of_day" (sequence, tod, hours) VALUES(2,'d2', 4.8);
REPLACE INTO "time_of_day" (sequence, tod, hours) VALUES(3,'d3', 4.8);
REPLACE INTO "time_of_day" (sequence, tod, hours) VALUES(4,'d4', 4.8);
REPLACE INTO "time_of_day" (sequence, tod, hours) VALUES(5,'d5', 4.8);
REPLACE INTO "time_of_day" VALUES(1,'d1', 4.8, NULL);
REPLACE INTO "time_of_day" VALUES(2,'d2', 4.8, NULL);
REPLACE INTO "time_of_day" VALUES(3,'d3', 4.8, NULL);
REPLACE INTO "time_of_day" VALUES(4,'d4', 4.8, NULL);
REPLACE INTO "time_of_day" VALUES(5,'d5', 4.8, NULL);
REPLACE INTO "time_period" VALUES(1,2020,'e');
REPLACE INTO "time_period" VALUES(2,2025,'f');
REPLACE INTO "time_period" VALUES(3,2030,'f');
Expand Down
2 changes: 1 addition & 1 deletion tests/testing_data/survival_curve.sql
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ REPLACE INTO "technology" VALUES('tech_future','p','energy',NULL,NULL,0,0,0,0,0,
REPLACE INTO "technology_type" VALUES('p','production technology');
REPLACE INTO "technology_type" VALUES('pb','baseload production technology');
REPLACE INTO "technology_type" VALUES('ps','storage production technology');
REPLACE INTO "time_of_day" (sequence, tod, hours) VALUES(0,'d',24);
REPLACE INTO "time_of_day" VALUES(0,'d',24,NULL);
REPLACE INTO "time_period" VALUES(-2,1994,'e');
REPLACE INTO "time_period" VALUES(-1,2010,'e');
REPLACE INTO "time_period" VALUES(0,2025,'f');
Expand Down
4 changes: 2 additions & 2 deletions tests/testing_data/test_system.sql
Original file line number Diff line number Diff line change
Expand Up @@ -441,8 +441,8 @@ REPLACE INTO "technology" VALUES('E_TRANS','p','electric','','',0,0,0,0,0,0,1,0,
REPLACE INTO "technology_type" VALUES('p','production technology');
REPLACE INTO "technology_type" VALUES('pb','baseload production technology');
REPLACE INTO "technology_type" VALUES('ps','storage production technology');
REPLACE INTO "time_of_day" (sequence, tod, hours) VALUES(1,'day',12);
REPLACE INTO "time_of_day" (sequence, tod, hours) VALUES(2,'night',12);
REPLACE INTO "time_of_day" VALUES(1,'day',12,NULL);
REPLACE INTO "time_of_day" VALUES(2,'night',12,NULL);
REPLACE INTO "time_period" VALUES(1,2015,'e');
REPLACE INTO "time_period" VALUES(2,2020,'f');
REPLACE INTO "time_period" VALUES(3,2025,'f');
Expand Down
4 changes: 2 additions & 2 deletions tests/testing_data/utopia_data.sql
Original file line number Diff line number Diff line change
Expand Up @@ -429,8 +429,8 @@ REPLACE INTO "technology" VALUES('TXG','p','transport','petroleum','',0,0,0,0,0,
REPLACE INTO "technology_type" VALUES('p','production technology');
REPLACE INTO "technology_type" VALUES('pb','baseload production technology');
REPLACE INTO "technology_type" VALUES('ps','storage production technology');
INSERT INTO "time_of_day" (sequence, tod, hours) VALUES(1,'day',16);
INSERT INTO "time_of_day" (sequence, tod, hours) VALUES(2,'night',8);
INSERT INTO "time_of_day" VALUES(1,'day',16,NULL);
INSERT INTO "time_of_day" VALUES(2,'night',8,NULL);
REPLACE INTO "time_period" VALUES(1,1960,'e');
REPLACE INTO "time_period" VALUES(2,1970,'e');
REPLACE INTO "time_period" VALUES(3,1980,'e');
Expand Down