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

Enable Replacing Components at Any Composite Level #804

Open
lrennels opened this issue Mar 30, 2021 · 0 comments
Open

Enable Replacing Components at Any Composite Level #804

lrennels opened this issue Mar 30, 2021 · 0 comments

Comments

@lrennels
Copy link
Collaborator

We want to make it easier for users to replace components in composite models, a concrete example being replace the climate component of a composite version of FUND with composite FAIR as presented below in some rough pseudocode.

In general the current problem is that anything below the top layer of a composite component is more or less immutable, which creates some problems when we want to replace/edit things etc. without rebuilding everything.

add MimiFUND # let's say that the default model pulled in by get_model() is a composite model with three top-level components `:climate`, `:emissions`, and `:damages`, but it's possible that we'd be wanting replace something deeper
add MimiFAIR
import MimiFAIR: `FAIR_climate` # we import the MimiFAIR `FAIR_climate` component which is a composite component

m = MimiFUND.get_model()
replace_comp!(m, :climate, :FAIR_climate)
# reconnect things
run(m)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants