Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
0bdcf03
Tinkering with MC worker Queue
jeff-ws Nov 22, 2024
b8e739e
Tinkering with MC worker Queue
jeff-ws Nov 22, 2024
9f6c359
Tinkering with MC worker Queue
jeff-ws Nov 29, 2024
983b898
Tinkering with MC worker Queue
jeff-ws Nov 29, 2024
912591d
Tinkering with MC worker Queue
jeff-ws Nov 30, 2024
53e13b8
Tinkering with MC worker Queue
jeff-ws Nov 30, 2024
4a4b48b
Tinkering with MC worker Queue
jeff-ws Nov 30, 2024
e443ad7
Tinkering with MC worker Queue
jeff-ws Nov 22, 2024
69404ad
Tinkering with MC worker Queue
jeff-ws Nov 22, 2024
bd6499d
Tinkering with MC worker Queue
jeff-ws Nov 29, 2024
a9db306
Tinkering with MC worker Queue
jeff-ws Nov 29, 2024
cacbfd5
Tinkering with MC worker Queue
jeff-ws Nov 30, 2024
9580510
Tinkering with MC worker Queue
jeff-ws Nov 30, 2024
218c615
Tinkering with MC worker Queue
jeff-ws Nov 30, 2024
ead691f
Merge remote-tracking branch 'origin/main'
jeff-ws Dec 1, 2024
1d7551c
MC running with new MC Worker
jeff-ws Dec 6, 2024
f31b86b
Fixed bug in data_brick.py that was not actually returning an obj.
jeff-ws Dec 6, 2024
8ad98b0
adjust workers for TRACE
jeff-ws Dec 6, 2024
59c1284
adding some additional logging, reverting worker settings to 6 worker…
jeff-ws Dec 6, 2024
db7eeb2
adding some additional logging, reverting worker settings to 6 worker…
jeff-ws Dec 6, 2024
1ca0677
adding some additional logging, reverting worker settings to 6 worker…
jeff-ws Dec 6, 2024
dd3b60b
Clean Up work on MC
jeff-ws Dec 7, 2024
45d1321
Adding T/S log entries
jeff-ws Dec 8, 2024
7a80fb3
Increase size of work queue
jeff-ws Dec 8, 2024
f59e011
Rev 2.0 of MC complete
jeff-ws Dec 9, 2024
06dd688
Rev 2.0 of MC complete
jeff-ws Dec 17, 2024
eefe33a
Added ability to output Dual Variables to Myopic Mode
jeff-ws Apr 9, 2025
146a31b
Merge branch 'TemoaProject:main' into main
jeff-ws Apr 9, 2025
1543cf8
Tuned up migration utility
jeff-ws Jun 14, 2025
60b404c
Formatting
jeff-ws Jun 14, 2025
aafbd20
Merge branch 'TemoaProject:main' into main
jeff-ws Sep 5, 2025
f226ff8
Make v3.1 schema and minimal schema file. Add quick utility to do sc…
jeff-ws Sep 10, 2025
c9b4622
Comment cleanup
jeff-ws Sep 19, 2025
cde9d75
Modify table_writer.py to specify target fields to enable flexible wr…
jeff-ws Sep 19, 2025
7833774
Add to and Upgrade requirements
jeff-ws Sep 19, 2025
ad035bb
Add migration tool for database to move from v3.0 to v3.1 [database s…
jeff-ws Sep 23, 2025
6b6ba26
Correct bogus FK reference for season in several schemas
jeff-ws Sep 23, 2025
e62c78a
Fix mis-named field in MinNewCapacityShare table from "max" to "min..."
jeff-ws Sep 23, 2025
cdb0e8a
Re-run of pip-compile using matching python version.
jeff-ws Sep 23, 2025
8b64c91
Chase out erroneous field name in sql files to match corrected schema
jeff-ws Sep 23, 2025
15d73fd
Update table_writer.py for OutputCurtailment to pre-merge curtailment…
jeff-ws Sep 23, 2025
08586e0
Update table_writer.py for OutputCurtailment to pre-merge curtailment…
jeff-ws Sep 23, 2025
e4a1e20
Fix bugs in loader for shared capacity parameters
jeff-ws Sep 23, 2025
32628e3
Picked up a few more (seldom used?) tables in hybrid_loader.py that s…
jeff-ws Sep 23, 2025
d9e0f97
Fundamentals in place for unit checking w/ some scaffolding
jeff-ws Sep 26, 2025
8ad2a91
First cut at documentation addition for unit checking
jeff-ws Sep 27, 2025
95a1ed5
add custom units into default registry, remove MIXED, ETHOS from comm…
jeff-ws Sep 27, 2025
e21fbb3
working through most inter-table relations
jeff-ws Sep 28, 2025
6d20169
Lots of DB cleanup to standardize. Augments to the re to improve cap…
jeff-ws Sep 28, 2025
b70971b
working through capacity-related tables
jeff-ws Sep 28, 2025
ead7049
consolidation of error listing by row group in more tables
jeff-ws Oct 9, 2025
b8a3d25
additions, cleanup, and comments for tests and common elements.
jeff-ws Oct 14, 2025
708fe59
Working OK. Passing initial QA. Before splitting cost table entries…
jeff-ws Oct 15, 2025
70d5deb
Working with RATIO based expression expectation in Cost Tables
jeff-ws Oct 15, 2025
39623ec
minor comment fixes and formatting
jeff-ws Oct 16, 2025
eb37aec
augment test
jeff-ws Oct 16, 2025
6dd7577
correct the units pattern in the custom file
jeff-ws Oct 17, 2025
03d6b22
updates to screener to handle empty entries and multiple db files
jeff-ws Oct 17, 2025
a1b2378
incorporation into main body
jeff-ws Oct 17, 2025
74c12a8
kill verbose output
jeff-ws Oct 17, 2025
1d85dba
fix incorrect import packages
jeff-ws Oct 17, 2025
9fbe6d7
Update temoa/utilities/db_migration_v3_to_v3_1.py
jeff-ws Oct 17, 2025
ec89d26
Update temoa/utilities/db_migration_v3_to_v3_1.py
jeff-ws Oct 17, 2025
b494104
fix loop
jeff-ws Oct 17, 2025
e3edd95
format tweaks to screener output
jeff-ws Oct 19, 2025
7f5f79b
upgrade to pyam-iamc >= 3.1. Version 3.0 of pyam importing mangled t…
jeff-ws Oct 19, 2025
bc047f3
Consolidate tests by row in Test 4--as in others
jeff-ws Oct 19, 2025
3853c00
better fail handling in utility conversion. Added null handling twea…
jeff-ws Oct 19, 2025
88295b6
remove a little scaffolding
jeff-ws Oct 19, 2025
06d83fa
Added check of Demand table and a little cleanup of formatting
jeff-ws Oct 20, 2025
6a7f347
Documentation updates to main dox and README.md describing what the u…
jeff-ws Oct 21, 2025
0ad6378
fix typo 'unit' -> 'units' in config files
jeff-ws Oct 21, 2025
558dbef
Flip the per year expectation for FixedCost and a few other minor adj…
jeff-ws Oct 23, 2025
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
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,9 @@ is (for Utopia as an example):
```
(venv) $ sqlite3 utopia.sqlite < utopia.sql
```
- Converting legacy db's to Version 3 can be done with the included database migration tool. Users who use this
- Converting legacy db's to Version 3.0 can be done with the included database migration tool. Users who use this
tool are advised to carefully review the console outputs during conversion to ensure accuracy and check the
converted database carefully. The migration tool will build an empty new Version 3 database and move data from
converted database carefully. The migration tool will build an empty new Version 3.0 database and move data from
the old database, preserving the legacy database in place. The command can be run from the top level of the
project and needs pointers to the target database and the Version 3 schema file. A typical execution from top level
should look like:
Expand All @@ -78,6 +78,10 @@ should look like:
directory as described above using the `sqlite3` command. The "minimal" version excludes some of the group
parameters and is recommended as a starting point for entry-level models. It can be upgraded to the full set of
tables by executing the full schema SQL command on the resulting database later, which will add the missing tables.
- Users wishing to use the optional "Unit Checking" functionality described in the documentation need to build from or
transition to a version 3.1 database. A second utility is provided to assist with this process and is run
similarly to the migration utility described above. The version 3.1 utility only accepts a source database
that is already version 3.0 format.

## Config Files

Expand All @@ -91,6 +95,7 @@ and has all parameters in it. It can be copied/renamed, etc.
| Temoa Mode | The execution mode. See note below on currently supported modes |
| Input/Output DB | The source (and optionally diffent) output database. Note for myopic, MGA input must be same as output |
| Price Checking | Run the "price checker" on the built model to look for costing deficiencies and log them |
| Units Checking | Run the "units checker" on the source (and destination) databases and document anomalies with units |
| Source Tracing | Check the integrity of the commodity flow network in every region-period combination. Required for Myopic |
| Plot Commodity Network | Produce HTML (viewable in any browser) displays of the networks built (see note at bottom) |
| Solver | The exact name of the solver executable to call |
Expand Down
2 changes: 1 addition & 1 deletion data_files/example_dbs/morris_utopia.sql
Original file line number Diff line number Diff line change
Expand Up @@ -1020,7 +1020,7 @@ CREATE TABLE MinNewCapacityShare
REFERENCES Technology (tech),
group_name TEXT
REFERENCES TechGroup (group_name),
max_proportion REAL,
min_proportion REAL,
notes TEXT,
PRIMARY KEY (region, period, tech, group_name)
);
Expand Down
2 changes: 1 addition & 1 deletion data_files/example_dbs/stepped_demand.sql
Original file line number Diff line number Diff line change
Expand Up @@ -1230,7 +1230,7 @@ CREATE TABLE MinNewCapacityShare
REFERENCES Technology (tech),
group_name TEXT
REFERENCES TechGroup (group_name),
max_proportion REAL,
min_proportion REAL,
notes TEXT,
PRIMARY KEY (region, period, tech, group_name)
);
Expand Down
2 changes: 1 addition & 1 deletion data_files/example_dbs/utopia.sql
Original file line number Diff line number Diff line change
Expand Up @@ -1208,7 +1208,7 @@ CREATE TABLE MinNewCapacityShare
REFERENCES Technology (tech),
group_name TEXT
REFERENCES TechGroup (group_name),
max_proportion REAL,
min_proportion REAL,
notes TEXT,
PRIMARY KEY (region, period, tech, group_name)
);
Expand Down
4 changes: 4 additions & 0 deletions data_files/my_configs/config_sample.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ output_database = "data_files/example_dbs/utopia.sqlite"
# Strongly recommended
price_check = true

# check the units in the source/destination databases for units consistency. Errors
# are reported in log file and units_check.txt in output folder
units_check = true

# Check the network connectivity for processes in the model. Strongly
# recommended to ensure proper performance. Results are reported in log file
# This requires that source commodities be marked with 's' in Commodity table
Expand Down
4 changes: 4 additions & 0 deletions data_files/my_configs/morris_utopia.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ output_database = "data_files/example_dbs/morris_utopia.sqlite"
# Strongly recommended
price_check = true

# check the units in the source/destination databases for units consistency. Errors
# are reported in log file and units_check.txt in output folder
units_check = true

# Check the network connectivity for processes in the model. Strongly
# recommended to ensure proper performance. Results are reported in log file
# This requires that source commodities be marked with 's' in Commodity table
Expand Down
2 changes: 1 addition & 1 deletion data_files/temoa_schema_minimal_v3.sql
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ CREATE TABLE IF NOT EXISTS OutputCurtailment
period INTEGER
REFERENCES TimePeriod (period),
season TEXT
REFERENCES TimePeriod (period),
REFERENCES TimeSeason (season),
tod TEXT
REFERENCES TimeOfDay (tod),
input_comm TEXT
Expand Down
Loading