Question-and-Answer Resource for the Building Energy Modeling Community
Get started with the Help page
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

How to change parameters (addParameters) in buildingspy?

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.

How to change parameters (addParameters) in buildingspy?

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.

How to change parameters (addParameters) in buildingspy?

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: correct:

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

packagePath)

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

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

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 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: 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()']})

'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: tried:

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

and

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

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.