Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test - made a change on temoa_mga.py #41

Open
wants to merge 519 commits into
base: energysystem
Choose a base branch
from

Conversation

hadieshraghi
Copy link

This is a test to learn about pull request.

iankurgarg and others added 30 commits March 17, 2018 11:46
Fix errors in the previous constraints and add the throughput constraint.
Explanation of capital cost treatment in the objective function has been expanded and refined to match the revised objective formulation committed in Feb, 2018.
The script is a duplicate of sensitivity.py in my Github repository (https://github.com/binghui89/Tools). There are four functions that I used for the breakeven analysis:

1. sensitivity(), this function derives breakeven costs from reduced costs returned by the Pyomo suffix object. It applies to CPLEX, Gurobi and GLPK.
2. sensitivity_api(), this function derives breakeven costs from reduced costs returned by CPLEX instances, so it only applies to CPLEX.
3. bin_search(), this function performs breakeven analysis by brutal force in an iterative manner. It applies to all LP solvers.
4. cplex_search(), this function derives breakeven costs iteratively, and it only applies to CPLEX.
… of data files

Scripts related to break-even cost analysis and Monte Carlo simulation were added, along with a clean up of data files.
We decided to move files specific to the recent ES&T paper to the TemoaProject/data repo. The remaining files in the monte_carlo folder are meant to serve as the basis for a generalized implementation of the Monte Carlo code.
Previously the break-even capital cost is calculated assuming capital cost and fixed O&M cost are scaled simultaneously, now only capital cost will be reduced, fixed O&M cost will be fixed. Note to run the script for break-even analysis, the hash for the correct Temoa is: 3a80948
…me of them can contribute fractionally to the constraint. An example is renewable portfolio standards constraint when only a fraction of hydro generation (and not all of it) is considered as "renewable"
…me of them can contribute fractionally to the constraint. An example is renewable portfolio standards constraint

 when only a fraction of hydro generation (and not all of it) is considered as "renewable"
…me of them can contribute fractionally to the constraint. An example is renewable portfolio standards constraint

 when only a fraction of hydro generation (and not all of it) is considered as "renewable"
Reporting this variable is throwing an error. Will be added back in a set of forthcoming storage-related commits.
There were two copies of DB_to_Excel.py. I deleted the version in temoa_model and kept the one in data_processing. pformat_results.py updated to import the version in the data_processing directory.
aranyavenkatesh and others added 20 commits November 3, 2021 12:56
Previously, the number of myopic years were input through
the command prompt only. These set of edits allows a user
to input the number of myopic years through the config file
instead.
Added a widget that allows user to select any technology, to then
display a set of data tables relating to technology of interest.
The data tables include efficiency, existing capacity, lifetime,
and costs.
The TechInputSplitAverage constraint was previously using the indices
for TechInputSplit. This commit creates a separate set of indices for
the TechInputSplitAverage constraint.
Added the new techinputsplitaverage to the temoa_myopic file
where rows containing future years are deleted.
For the myopic solves, check if a table exists in the database before
deleting it.
During the myopic solves, delete the output_duals table.
Initialize myopic_years to zero instead of None, to cause
an error when myopic_years are not specified.
Added new table to temoa_schema.sql and temoa_schema.sqlite.
This table works similarly to TechInputSplit, but the splits
are maintained over annual operations, rather than for every
time slice.
This is needed to run the Sample_output_plots notebook
in the database_documentation folder.
The name of this variable is changed in temoa_model/config_sample,
temoa_model/temoa_config.py and temoa_model/temoa_myopic.py to more appropriately
refer to what the variable represents - the number of time periods to be included
in each step of the myopic solve.
Changes were implemented and tested by Mason Stevens at NC State.
Add sphinx-related dependencies to the environment file. Remove spelling module, which requires some manual installations. Note for future: latex package still needs to be installed manually. Tried adding miktex to the environment file but it fails.
There was a single figure in the documentation that was created on-the-fly with graphviz. The figure in question has been replaced with a static image, and the graphviz dependency within the documentation has been removed.
The RampUp and RampDown tables store data for ramp up and down constraints,
where the ramp rates are expressed as a fraction of generating capacity.
The technologies that have assigned ramp rates are entered in the tech_ramping
table.
commodity_SNG represented the union of physical and emissions commodities, which in turn served as the commodity input to the Efficiency table. This approach allowed for the CO2 emissions commodity to serve as an input to the production of synthetic natural gas (SNG). This commodity type is no longer needed and instead was replaced with LinkedEmissionsTech_Constraint.
Updates were made to Documentation.rst to reflect additions and changes to the source code, and the doc strings in temoa_rules.py were updated for clarity and to match the notation used in the documentation.
In revising the documentation, I uncovered several parameters and rules that were no longer being used, including PeriodRate, LoanLifeFrac and LoanLifeIndices, as well as ModelLoanLife_rtv, ModelLoanLife, ParamModelLoanLife_rule. These items are no longer necessary with the current version of our objective function, and I am removing them to avoid confusion.
When Temoa is used only with a .dat file and no config file,
avoid reporting the dual variables.
Through settings in the config file, the user can specify
if Duals are to be reported to the .sqlite file. The default
settings are False, i.e., they are not reported.
Some solvers do not report duals values for certain databases.
This fix addresses the case where if the reported dataset of duals is
empty, then the Output_Duals table is not written to.
During the myopic solve, processes that retire before the start of the time
period currently being solved are deleted. The logic previously coded did not
account for distinct region and tech names which resulted in a few processes
being inadvertently deleted. This was updated with a new sql query in
temoa_model/temoa_myopic.py
The solvers sometimes report small values for primary technologies
but not the linked technology, or vice versa. This causes issues
in future period solves where the capacity for one of the technologies
exists but not the other. This code looks for such instances and removes
related data from the output tables.
Allow MinActivity and MaxActivity tables to include rows with 'global'
as a region, where the activity variables are summed over all regions
in the database. These activity variables do not include those relating
to regional exchange processes.
temoa_myopic.py is modified as well, to make sure that rows containing
'global' as a region are not deleted, since they don't specfically appear
in the Efficiency table.
The solvers sometimes report small values for linked technologies
but not the primary technology, or vice versa. This causes issues
in future period solves where the capacity for one of the technologies
exists but not the other. A previous commit looks for such instances
and removes related data from the output tables. This commit adds to the
previous one where in some instances the primary tech exists but the linked
tech does not.
This commit allows the use of '-' and '+' in the regions index
of the MinActivity, MaxActivity and EmissionLimit constraints.
The use of '-' allows for technologies in the tech_exchange set
to be specified.
The use of '+' allows for constraints on the same technology across
multiple regions.
This commit modifies how duals are reported to the Output_Duals table.
Here, all the dual values as reported by the solver are reported directly.
Duals with an absolute value of less than 1e-5 are ignored.
Note that selecting this option through the config file can cause the output
database to increase in size.
So that the myopic formulation solves.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.