-
Notifications
You must be signed in to change notification settings - Fork 84
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
Get flat model without constants #1809
Comments
I additionally tried it with model SimpleRoomFourElements and now think different. I think the problem is not that I overwrite the variables from the record to VAir, but that generally in RC.FourElements VAir is converted from a parameter type to the constant type after flattening. Why could that happen? What can i do to write on VAir without change to constant type. |
A final before doesn't fix either:
|
When i try a simple capacity the flattening doesn't change the type to constant.
|
I all, i made my own ThermalZones.RC.FourElements according to yours and then removed the ThermSplitter model for solarGain and internalGain. Then it flattened without changing the type to constant. Perhaps the problem is with the function splitFacVal |
now i tried it with splitFactor={{AArray[1]},{AArray[2]},{AArray[3]}} ./ sum(AArray) and removed only the ThermSplitterSolRad --> still the change from parameter to constant --> i think its only cause of the ThermSplitter model that the compiler thinks this matrix would change the number of states and not only the value so it changes it to constant and with it all the areas and parameters depending on AArray --> thats my final result. What do you think? |
so, ... i think i got the villain ... dimension must be declared as: instead of final parameter Integer dimension = sum({if A>0 then 1 else 0 for A in AArray}) |
I wouldn't wonder, it contains some matrix calculations with the dimensions depending on the size of the inputs vectors.Von meinem/meiner Galaxy gesendet
-------- Ursprüngliche Nachricht --------Von: weberscode ***@***.***> Datum: 27.10.23 15:20 (GMT+01:00) An: ibpsa/modelica-ibpsa ***@***.***> Cc: Subscribed ***@***.***> Betreff: Re: [ibpsa/modelica-ibpsa] Get flat model without constants (Issue #1809)
I all,
i made my own ThermalZones.RC.FourElements according to yours and then removed the ThermSplitter model for solarGain and internalGain. Then it flattened without changing the type to constant. Perhaps the problem is with the function splitFacVal
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
|
Did you check if it still works for all model variants? The ThermSplitter is also used in the other variants with three, two and maybe even one wall element. I don't recall where the declaration of done, in the zone model or the ThermSplitter.Anyhow, thanks for improving the model! Let me know if I can support with my five year old knowledge.Von meinem/meiner Galaxy gesendet
-------- Ursprüngliche Nachricht --------Von: weberscode ***@***.***> Datum: 27.10.23 16:13 (GMT+01:00) An: ibpsa/modelica-ibpsa ***@***.***> Cc: Subscribed ***@***.***> Betreff: Re: [ibpsa/modelica-ibpsa] Get flat model without constants (Issue #1809)
so, ... i think i got the villain ...
dimension must be declared as:
final parameter Integer dimension = size(AArray,1)
instead of
final parameter Integer dimension = sum({if A>0 then 1 else 0 for A in AArray})
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
|
Hi all,
i would like to externally optimize or vary parameters. For i export the model as fmu and optimize it. To externally call and set a model parameter this must be a parameter and not a constant within the flat model. So here is the question?
When i use the thermal zone model and set any of the following parameter
to a value of my record, then the record value and some on its dependant values change to constant during the flattening process. A i said, i need them as a parameter to be externally optimized.
How could i solve this problem?
kr Simon
The text was updated successfully, but these errors were encountered: