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

Dynamic array size in expandable bus connectors #18

Open
FWuellhorst opened this issue Aug 2, 2022 · 2 comments
Open

Dynamic array size in expandable bus connectors #18

FWuellhorst opened this issue Aug 2, 2022 · 2 comments
Assignees
Labels
persistant Possibly won't be solved

Comments

@FWuellhorst
Copy link
Contributor

FWuellhorst commented Aug 2, 2022

Describe the bug
If multiple subsystems access the arrays in the user-profile bus, e.g. TZoneSet or internalGains, size-mismatch errors occur.
I'm in contact with Dymola support on where this magic 20 is coming from.

What's weird: When I use a min-max block in the underlying submodel on the array, the errors disappear.

To Reproduce

  1. Clone and install BESMod following the README.
  2. Go into the branch 18-Dynamic-array-size-in-expandable-bus-connectors.
  3. Check and try to execute the models:
  • ModelWithErrorTSet
  • ModelWithErrorTMea
  • ModelWithErrorBoth
  • ModelNoErrorTMea
    in the package BESMod.Examples.UseCaseModelicaConferencePaper.

The only difference I can find is that TZoneSet and TZoneMea are used twice (in the ventilation.control and hydraulic.control models), not once (only hydraulic.control).

Expected behavior
No errors.

Screenshots

image
image
image

Desktop (please complete the following information):

  • Dymola 2022x
@FWuellhorst FWuellhorst self-assigned this Aug 2, 2022
@github-actions
Copy link

github-actions bot commented Aug 2, 2022

@FWuellhorst
Copy link
Contributor Author

It seems that adding a variable size realPassThrough is enough to fix the issue and help Dymola to understand, that the system is in fact not singular.

So, if you encounter such errors, use something like the following implementation:
image

It's important that Dymola knows the expected array size in each model where it is used. In this case, the number of zones nZones are used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
persistant Possibly won't be solved
Projects
None yet
Development

No branches or pull requests

1 participant