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

Changes to set_param! #524

davidanthoff opened this issue Jun 11, 2019 · 2 comments


Copy link

@davidanthoff davidanthoff commented Jun 11, 2019

The core functions are:

set_param!(m, :compA, :p1, :ext_p2_name, 34.)
update_param!(m, :ext_p2_name, 45.)

And the shortcuts are:

set_param!(m, :p1, 23.)

This function would look at all the components in the model, find all the unbound parameters named p1, create an external parameter called p1, set its value to 23, and create connections from all the external unbound parameters that are named p1 to the external parameter p1. If there is already a p1 in the external parameter list, it errors.

set_param!(m, :compA, :p1, 34.)

This function creates a new external parameter called p1 (if that already exists, it errors), sets its value to 34., and then connects compA/p1 to this external parameter p1.


This comment has been minimized.

Copy link
Collaborator Author

@davidanthoff davidanthoff commented Jun 11, 2019

Maybe also need:

set_param!(m, [:compA, :compC, :compD], :p1, 23)
set_param!(m, [:compA=>:p1, :compC=>:p3], :p_ext_3, 34.)
connect_param!(m, :compA, :p1, :p_ext_3)

This comment has been minimized.

Copy link
Collaborator Author

@davidanthoff davidanthoff commented Jun 11, 2019

set_param! is not a good name for all of this. So we'll come up with new better names for the new functions we creating. We'll leave set_param! around as is with the old behavior, except, that we make

set_param!(m, :compA, :p1, 34.)
set_param!(m, :compB, :p1, 12.)


Rollout is: we add the new fancy functions with better names first, tag a release. Then we migrate models over to that. Then we start to throw errors in a future Mimi release for the buggy set_param! corner case.

@lrennels lrennels self-assigned this Sep 12, 2019
@lrennels lrennels added this to the 0.9.4 milestone Sep 12, 2019
@lrennels lrennels modified the milestones: 0.9.4, v0.9.5 Sep 27, 2019
@ckingdon95 ckingdon95 modified the milestones: v0.9.5, v1.0.0 Oct 4, 2019
@davidanthoff davidanthoff assigned rjplevin and unassigned rjplevin and lrennels Oct 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
4 participants
You can’t perform that action at this time.