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

Provide modelparams in Load/Filter component that set device values #130

Open
Webbah opened this issue Feb 17, 2021 · 2 comments
Open

Provide modelparams in Load/Filter component that set device values #130

Webbah opened this issue Feb 17, 2021 · 2 comments
Assignees
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@Webbah
Copy link
Collaborator

Webbah commented Feb 17, 2021

# TODO: perhaps provide modelparams that set resistance value

Possible to shift all device parameters to net.yaml?

Till now: L,C,R... parameters are defined in file and given to model_params in env maks/register.

Idea: Use net.yaml as bundeld config with all(!!) (initial) env-parameters.

modelparams = {r_load.resistor1.R: net['l_load'].R} still needed or solved internally?

How to implement loadsteps in that case?

modelparams = {r_load.resistor1.R: partial(rand_load.load_step, gain=net['l_load'].R)}?

@Webbah Webbah added enhancement New feature or request help wanted Extra attention is needed labels Feb 17, 2021
@Webbah Webbah self-assigned this Feb 17, 2021
@Webbah
Copy link
Collaborator Author

Webbah commented Feb 17, 2021

params = {**values, **self.net.params(delayed_action)}

shift params from {values,...} to {...,self.net.params(delayed_action)}

TAKE CARE:
What if from net and model_params have the same key:

env.make( model_params={'r_load.resistor1.R': 10} )

and in net -> Load(Component-class): 'r_load.resistor1.R': 20

is r_load.resistor1.R 10 or 20?

toDo: Check in modelica.py 309 (link above) which overwrites what

@Webbah
Copy link
Collaborator Author

Webbah commented Feb 17, 2021

Here:

# TODO: perhaps provide modelparams that set resistance value

use coponent.id('r_load') + '.' name from net ('resistor1.R : 10') instead if model_params (see above)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant