How to change parameters (addParameters) in buildingspy?

asked 2021-06-18 06:47:55 -0500

Theresa's avatar

updated 2021-06-18 13:37:22 -0500

I have a Modelica(Dymola)-model created with Teaser and am simulating it with buildingspy.

I want to change some parameters with the addParameters function, but can't find out how to give the correct path to the parameter, because it's obviously an array inside an array.

If I simulate the model without changing paramters, it works fine, so the path to the model must be correct:

model = 'name' + '.' + 'building' + '.' + 'building'
s = si.Simulator(model, 'dymola', outputPath, packagePath)

It also works if I change a parameter that is just a single value:

s.addParameters({'multizone.VAir': 30000})

But the parameter I want to change is within 'multizone.zoneParam', which is an array consisting of 6 zones that should look like this

{building_DataBase.building_Office(), building_DataBase.building_Floor(), building_DataBase.building_Storage(), building_DataBase.building_Meeting(), building_DataBase.buildnig_Restroom(), building_DataBase.building_Office()}

and is refering to a DataBase based on AixLib

it already doesn't work to give this as input:

s.addParameters({'multizone.zoneParam': ['building_DataBase.building_Office()', 'building_DataBase.building_Floor()', 'building_DataBase.building_Storage()', 'building_DataBase.building_Meeting()', 'building_DataBase.building_Restroom()', 'building_DataBase.building_ICT()']})

and within each of these zones there is another array with lots of parameters, I want to change e.g. 'gWin' I already tried:

s.addParameters({'multizone.zoneParam[1].gWin': 0.6})

and

s.addParameters({'multizone.zoneParam[1,12]': 0.6})

but this simply doesn't work.

Can you help me find out what the right path to this parameter would be?

I attached the modelica model.

edit retag flag offensive close merge delete

Comments

@Theresa could you try attaching the modelica model again? I don't see a link anywhere in your post.

Aaron Boranian's avatar Aaron Boranian  ( 2021-06-18 09:33:43 -0500 )edit