Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Adjusted file source for config file in temoa_myopic.py Removed hard-coding of the source of the config file from the temoa_myopic.py module and changed to the location from the temoa_options. This allows this module to work properly in both the `tests` module and the `temoa_model` module without code changes per run. * Basic Test of Myopic Mode Updated and Running (passing) The full test for myopic mode now runs and re-uses the utopia database in the testing_outputs folder (not great, but a good placeholder for now). Bug still exists in main myopic code that forces input and output db to be one-in-the-same. Also (for now) the name of the config file for myopic usage must be exactly "config_sample" because internally constructed variants of that such as "config_sample_myopic" are tested for *by name* in several code locations. No other names for myopic mode config files are functional (yet) * Incorporated pricing_check.py as a BuildAction Added build action to run checks on pricing in the database. pricing_check.py uses sets and values that are loaded into the model to look for inconsistencies/missing data. The 3 main tests are documented in the file * Adding More Logging Adding logging entries for several key milestones during model build. * Adding Capacity Analyzer to Utilities Adding a short utility script to the utilities to analyze the cumulative capacity curve vs. small-to-large capacity producers as a means to compare small vs. big producers in the DB. * Starting on temoa_sequencer.py The Sequencer will control the overall activities for the scenario and will farm out individual runs as reqd. Other minor edits included, and removal of most Python 2 refs. Also added utility to capture set SIZES for a large model US_9R_8D for continuity comparison * Working on Sequencer Non-working commit. Partial work on sequencer. Picking apart the elements of temoa_run.py * Working on pkg upgrade to python and pyomo WIP commit. Passing tests for small data. Lots of warnings from pyomo constructions. Errors out when building US_9R_8D becuase of use of mutable parameters and equality checks, which are now verboten. * Working on pkg upgrade to python and pyomo WIP commit. Building US_9R_8D now. Mutable parameter problem fixed by adding new parameter and building it from the "mutable" ones. Added validators.py to start building out set/parameter validation tools and tests for same. Starting work on removing the RegionalGlobalIndices and replacing the uses with validators. * Unwinding some effort to get rid of RegionalGlobalIndices Unwound some changes that were intended to remove the need to make the massive permutation set. Approach did not work. Tests pass in this config. * Added RegionalGlobalIndices to dat file maker dat_file_maker.py now scans necessary tables to gather all regional-groups that might be in RegionalGlobalIndices. The result is further error-checked by validators.py. Updated validators.py to enable linked regions to be part of groups (as they were before). Verified the deltas in set construction and updated testing sets. * Cleaned up argument parsing in main.py Added some run options to make some tests and execution easier. Added tests for same. Refactored tests and temoa_sequencer.py to accommodate. * WIP: Changing config file to .toml non-functioning commit. Preserving work to T/S why db_2_dat is printing screen output with print() statements that was not observed before. * WIP: Changing config file to .toml non-functioning commit. Saved work for T/S pformat_results.py anomaly. * toml transition complete config files in .toml format working in main and in tests. Refactored some tests to parameterize the tests better. * Upgrade to Pyomo 6.7 fixed bug in dat_file_maker.py that mistakenly keyed on myopic properties to modify input db. All tests pass. * Refactored CreateCapacityFactors Removed the updating of CapacityFactorProcess, which was being pulled from CapacityFactorTech where it was None to get a default value. Now the constraint where employed just pulls the default as needed. Prevents unneeded model bloat. capture_set_values_for_cache.py updated to new set structure. * Silent Mode Tuned Corrected issues where silent mode was still outputing the segement times. Cleaned up dead code. Minor reformatting * Minor Tweaks Some cleanup and formatting. All tests pass. * Cleanup of temoa_initialize.py Housekeeping. Specified some exceptions, formatting, and TODO's. * Ruff format temoa_rules.py Ruff formatted the file to clear up many small problems. Appears OK and more readable. * Remove old db schema Removing the old schema and sqlite instantiation from the repo and adding the new table schema * Reformatting some headers and cleanup Reformatted headers in some files to include license info where it was absent. Used Ruff formatter on a few more files. Captured set sizes for comparison w/ legacy. * Updated temoa_initialize.py to sort RegionalIndices Adding the sort() to the creation of the indices evades pyomo's warning about initializing from unordered containers. * Housekeeping Removed some old debug files. Moved several items to a "for removal folder" for review. * Fixed test_main.py Added tmp_path inclusion to tests to prevent creation of new folder in output_files whenever the test is run.
- Loading branch information