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

Add Hyperplane Tree #20

Merged
merged 40 commits into from
Dec 11, 2024
Merged

Add Hyperplane Tree #20

merged 40 commits into from
Dec 11, 2024

Conversation

emsunshine
Copy link
Collaborator

@emsunshine emsunshine commented Nov 6, 2024

This PR introduces Hyperplane Trees, a powerful tool for building piecewise linear surrogate models from data. This was initially a fork of Marco Cerliani's Linear-Tree, but it has since grown to include a new implementation of the training algorithm in pytorch, as well as feature engineering tools for linear and quadratic combinations. For more details about this code, please see the Readme for the appropriate module.

This code is the main work of the S2A Surrogates team for Year 2 of the project. We are pushing this into the main branch now as we plan to submit this work for publication in the coming days.

emsunshine and others added 30 commits August 6, 2024 16:18
* Change terminal storage amounts to input parameters

Move terminal storage amounts (days) for compressed and liquid hydrogen to dictionary of input parameters for the "calcs" function. Update "input_params" Excel file.

* Update s2a_systems_functions.py

Remove unused parameter.

* Update s2a_systems_functions.py

Set energy, cost, and emissions for CO2 recycling and downstream gas separation (precooling for PSA) to zero if no CO2 is used or produced for a given LOHC.

* Update s2a_systems_functions.py

Remove list() from argument to 2D interpolation function so that return value is array of number (instead of array of list).

* Fix electrolyzer fixed costs and energy

Use terminal LOHC mass flowrate (instead of molar flowrate) as the target flowrate for scaling LOHC electrolyzer area and energy. Fix both code and input Excel file. (Note: Previously mixed up molar and mass flowrates. Formic acid results were not impacted because of a similar mismatch in input Excel file.)

---------

Co-authored-by: Mengyao Yuan <[email protected]>
Co-authored-by: Mengyao Yuan <[email protected]>
* Change terminal storage amounts to input parameters

Move terminal storage amounts (days) for compressed and liquid hydrogen to dictionary of input parameters for the "calcs" function. Update "input_params" Excel file.

* Update s2a_systems_functions.py

Remove unused parameter.

* Update s2a_systems_functions.py

Set energy, cost, and emissions for CO2 recycling and downstream gas separation (precooling for PSA) to zero if no CO2 is used or produced for a given LOHC.

* Update s2a_systems_functions.py

Remove list() from argument to 2D interpolation function so that return value is array of number (instead of array of list).

* Fix electrolyzer fixed costs and energy

Use terminal LOHC mass flowrate (instead of molar flowrate) as the target flowrate for scaling LOHC electrolyzer area and energy. Fix both code and input Excel file. (Note: Previously mixed up molar and mass flowrates. Formic acid results were not impacted because of a similar mismatch in input Excel file.)

---------

Co-authored-by: Mengyao Yuan <[email protected]>
Co-authored-by: Mengyao Yuan <[email protected]>
@emsunshine emsunshine marked this pull request as ready for review December 11, 2024 15:33
@emsunshine emsunshine changed the title Add hyperplanetree Add Hyperplane Tree Dec 11, 2024
@emsunshine emsunshine merged commit 4728e87 into main Dec 11, 2024
4 checks passed
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.

1 participant