REopt_API
REopt_API copied to clipboard
Add proforma to API v3
Please check if the PR fulfills these requirements
- [ ] CHANGELOG.md is updated
- [ ] Tests for the changes have been added (for bug fixes / features)
- [ ] Docs have been added / updated (for bug fixes / features)
What kind of change does this PR introduce?
(Bug fix, feature, docs update, ...)
What is the current behavior?
(You can also link to an open issue here)
What is the new behavior (if this is a feature change)?
Does this PR introduce a breaking change?
(What changes might users need to make in their application due to this PR?)
Other information:
Summary of some initial testing:
- 3/3 testing results jsons (attached below) produced errors in the code diesel_prime.json pv_bess_primegen.json web_tool_sample_site.json
- It doesn't look like there's any accounting for Third-Party ownership? Is that just TBD?
- In the old proforma (in most but not all places) fractions/percentages are reported as the whole number value (e.g. 8.3 instead of 0.083), which matters mostly because some of these fractions are then used in equations (e.g., the IRR equation). Since your values are all fractions, the equations are wrong. I think outputting them as fractions, modifying the formatting where needed, and changing the equations to not divide by 100 is probably the best path forward.
- It does seem like the old code formatted things as "Numbers" or "Percentages" whereas this one all appears to have the "General" number format, or "Scientific" in some cases.
@adfarth @Bill-Becker the branch now has proforma code integrated into it (i need to clean up the code a bit more). You can run a scenario, then supply its run_uuid to the new v3 proforma endpoint (GET), which returns an excel file of proforma in response.
Summary of some initial testing:
- 3/3 testing results jsons (attached below) produced errors in the code diesel_prime.json pv_bess_primegen.json web_tool_sample_site.json
- It doesn't look like there's any accounting for Third-Party ownership? Is that just TBD?
- In the old proforma (in most but not all places) fractions/percentages are reported as the whole number value (e.g. 8.3 instead of 0.083), which matters mostly because some of these fractions are then used in equations (e.g., the IRR equation). Since your values are all fractions, the equations are wrong. I think outputting them as fractions, modifying the formatting where needed, and changing the equations to not divide by 100 is probably the best path forward.
- It does seem like the old code formatted things as "Numbers" or "Percentages" whereas this one all appears to have the "General" number format, or "Scientific" in some cases.
@rathod-b looks like the fractions vs percent is still an issue, where the values are fractions but they are being handled as percents in the equations which divide them by 100.
Also, and I mostly expected this, but I ran a CHP case, and the boiler and CHP fuel costs are not being handled (zeros). I think this is an update that needs to come from the REopt.jl proforma script(s).