You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running TEAL/tests/PyomoTest.py I get an error message when adding another indicator that is not 'NPV', specifically in the "build_econ_settings" method current Line 52: 'Indicator': {'name': ['NPV','PI'], #could also add 'IRR' 'active': active}
Expected TEAL to generate the PI metric as a Pyomo Expression after all cashflows are defined since pyomoVar is set to True.
What did you see instead?
Instead, I get an error: Traceback (most recent call last): File "C:\Users\sotogj\Miniconda3\envs\raven_libraries\lib\runpy.py", line 193, in _run_module_as_main "__main__", mod_spec) File "C:\Users\sotogj\Miniconda3\envs\raven_libraries\lib\runpy.py", line 85, in _run_code exec(code, run_globals) File "c:\Users\sotogj\.vscode\extensions\ms-python.python-2022.14.0\pythonFiles\lib\python\debugpy\adapter/../..\debugpy\launcher/../..\debugpy\__main__.py", line 39, in <module> cli.main() File "c:\Users\sotogj\.vscode\extensions\ms-python.python-2022.14.0\pythonFiles\lib\python\debugpy\adapter/../..\debugpy\launcher/../..\debugpy/..\debugpy\server\cli.py", line 430, in main run() File "c:\Users\sotogj\.vscode\extensions\ms-python.python-2022.14.0\pythonFiles\lib\python\debugpy\adapter/../..\debugpy\launcher/../..\debugpy/..\debugpy\server\cli.py", line 284, in run_file runpy.run_path(target, run_name="__main__") File "c:\Users\sotogj\.vscode\extensions\ms-python.python-2022.14.0\pythonFiles\lib\python\debugpy\_vendored\pydevd\_pydevd_bundle\pydevd_runpy.py", line 322, in run_path pkg_name=pkg_name, script_name=fname) File "c:\Users\sotogj\.vscode\extensions\ms-python.python-2022.14.0\pythonFiles\lib\python\debugpy\_vendored\pydevd\_pydevd_bundle\pydevd_runpy.py", line 136, in _run_module_code mod_name, mod_spec, pkg_name, script_name) fcff = FCFF(components, cashFlows, projectpython.python-2022.14.0\pythonFiles\lib\python\debugpy\_vendored\pydevdLength, mult=mult, v=v, pyomoVar=pyomoVar) _run_code File "c:\Users\sotogj\projects\TEAL\src\main.py", line 520, in FCFF omoTest.py", line 268, in <module> fcff[i] += data[i] enerator, market], {}, pyomoVar=True) # Past version was pyomoChk File "pyomo\core\expr\numvalue.pyx", line 61.py", line 687, in run6, in pyomo.core.expr.numvalue.NumericValue.__projectLength, settings.getDiscountRate(), v=v)float__ .py", line 583, in PI TypeError: Implicit conversion of Pyomo numerijectLength, discountRate, mult=mult, v=v, returnFcff=True)c value (-1000.0*gen_size) to float is disable.py", line 545, in NPVd. Length, mult=mult, v=v, pyomoVar=pyomoVar) This error is often the result of using Pyomo .py", line 520, in FCFF components as arguments to one of the Python built-in math module functions when defining expressions. Avoid this error by using Pyomo-provided math functions or explicitly resolving the numeric value using the Pyomo value() function.
Do you have a suggested fix for the development team?
It seems the issue is that "pyomoVar" is only passed in TEAL/src/main.py to the 'NPV' indicator and not the others. So when a PyomoExpression is requested, it errors out.
Describe how to Reproduce
Steps to reproduce the behavior:
Run TEAL/tests/PyomoTest.py with an indicator other than 'NPV' and pyomoVar set to True.
Screenshots and Input Files
Please attach the input file(s) that generate this error. The simpler the input, the faster we can find the issue.
Platform (please complete the following information):
OS: Windows
Version: [e.g. 22]
Dependencies Installation: [CONDA or PIP]
For Change Control Board: Issue Review
This review should occur before any development is performed as a response to this issue.
1. Is it tagged with a type: defect or task?
2. Is it tagged with a priority: critical, normal or minor?
3. If it will impact requirements or requirements tests, is it tagged with requirements?
4. If it is a defect, can it cause wrong results for users? If so an email needs to be sent to the users.
5. Is a rationale provided? (Such as explaining why the improvement is needed or why current code is wrong.)
For Change Control Board: Issue Closure
This review should occur when the issue is imminently going to be closed.
1. If the issue is a defect, is the defect fixed?
2. If the issue is a defect, is the defect tested for in the regression test system? (If not explain why not.)
3. If the issue can impact users, has an email to the users group been written (the email should specify if the defect impacts stable or master)?
4. If the issue is a defect, does it impact the latest release branch? If yes, is there any issue tagged with release (create if needed)?
5. If the issue is being closed without a pull request, has an explanation of why it is being closed been provided?
The text was updated successfully, but these errors were encountered:
Defect Description
Describe the defect
What did you expect to see happen?
When running TEAL/tests/PyomoTest.py I get an error message when adding another indicator that is not 'NPV', specifically in the "build_econ_settings" method current Line 52:
'Indicator': {'name': ['NPV','PI'], #could also add 'IRR' 'active': active}
Expected TEAL to generate the PI metric as a Pyomo Expression after all cashflows are defined since pyomoVar is set to True.
What did you see instead?
Instead, I get an error:
Traceback (most recent call last): File "C:\Users\sotogj\Miniconda3\envs\raven_libraries\lib\runpy.py", line 193, in _run_module_as_main "__main__", mod_spec) File "C:\Users\sotogj\Miniconda3\envs\raven_libraries\lib\runpy.py", line 85, in _run_code exec(code, run_globals) File "c:\Users\sotogj\.vscode\extensions\ms-python.python-2022.14.0\pythonFiles\lib\python\debugpy\adapter/../..\debugpy\launcher/../..\debugpy\__main__.py", line 39, in <module> cli.main() File "c:\Users\sotogj\.vscode\extensions\ms-python.python-2022.14.0\pythonFiles\lib\python\debugpy\adapter/../..\debugpy\launcher/../..\debugpy/..\debugpy\server\cli.py", line 430, in main run() File "c:\Users\sotogj\.vscode\extensions\ms-python.python-2022.14.0\pythonFiles\lib\python\debugpy\adapter/../..\debugpy\launcher/../..\debugpy/..\debugpy\server\cli.py", line 284, in run_file runpy.run_path(target, run_name="__main__") File "c:\Users\sotogj\.vscode\extensions\ms-python.python-2022.14.0\pythonFiles\lib\python\debugpy\_vendored\pydevd\_pydevd_bundle\pydevd_runpy.py", line 322, in run_path pkg_name=pkg_name, script_name=fname) File "c:\Users\sotogj\.vscode\extensions\ms-python.python-2022.14.0\pythonFiles\lib\python\debugpy\_vendored\pydevd\_pydevd_bundle\pydevd_runpy.py", line 136, in _run_module_code mod_name, mod_spec, pkg_name, script_name) fcff = FCFF(components, cashFlows, projectpython.python-2022.14.0\pythonFiles\lib\python\debugpy\_vendored\pydevdLength, mult=mult, v=v, pyomoVar=pyomoVar) _run_code File "c:\Users\sotogj\projects\TEAL\src\main.py", line 520, in FCFF omoTest.py", line 268, in <module> fcff[i] += data[i] enerator, market], {}, pyomoVar=True) # Past version was pyomoChk File "pyomo\core\expr\numvalue.pyx", line 61.py", line 687, in run6, in pyomo.core.expr.numvalue.NumericValue.__projectLength, settings.getDiscountRate(), v=v)float__ .py", line 583, in PI TypeError: Implicit conversion of Pyomo numerijectLength, discountRate, mult=mult, v=v, returnFcff=True)c value (-1000.0*gen_size) to float is disable.py", line 545, in NPVd. Length, mult=mult, v=v, pyomoVar=pyomoVar) This error is often the result of using Pyomo .py", line 520, in FCFF components as arguments to one of the Python built-in math module functions when defining expressions. Avoid this error by using Pyomo-provided math functions or explicitly resolving the numeric value using the Pyomo value() function.
Do you have a suggested fix for the development team?
It seems the issue is that "pyomoVar" is only passed in TEAL/src/main.py to the 'NPV' indicator and not the others. So when a PyomoExpression is requested, it errors out.
Describe how to Reproduce
Steps to reproduce the behavior:
Screenshots and Input Files
Please attach the input file(s) that generate this error. The simpler the input, the faster we can find the issue.
Platform (please complete the following information):
For Change Control Board: Issue Review
This review should occur before any development is performed as a response to this issue.
For Change Control Board: Issue Closure
This review should occur when the issue is imminently going to be closed.
The text was updated successfully, but these errors were encountered: