Hi all,
I've been getting an error when developing for the OpenStudio standards gem, particularly for the Outpatient building.
The Error:
I receive an error that reads:
Last severe error=Duplicate name found. name: "Basement Floor F: 1.26 Perim: 0.0 Area: 5.2". Overwriting existing object.
Context:
As you can see, I create a Construction:FfactorGroundFloor
object that lays out the parameters in the name. I do this using Ruby code that ensures I don't create a Construction:FfactorGroundFloor
that already exists in the model:
# Record combination of perimeter and area. Each unique combination requires a FFactorGroundFloorConstruction
f_floor_const_name ="Basement Floor F: #{f_factor.round(2).to_s} Perim: #{perimeter.round(2).to_s} Area: #{area.round(2).to_s}"
# Check if the floor construction has been constructed already. If so, look it up in the model
if model.getFFactorGroundFloorConstructionByName(f_floor_const_name).is_initialized
f_floor_construction = model.getFFactorGroundFloorConstructionByName(f_floor_const_name).get
else
f_floor_construction = OpenStudio::Model::FFactorGroundFloorConstruction.new(model)
f_floor_construction.setName(f_floor_const_name)
f_floor_construction.setFFactor(f_factor)
f_floor_construction.setArea(area)
f_floor_construction.setPerimeterExposed(perimeter)
end
I then go on to set the construction to the appropriate surfaces.
In this IDF I do in fact have a Construction:FfactorGroundFloor
used by multiple surfaces, but as far as I know it's not unusual for multiple surfaces to use a common construction.
Here is what I've tried to fix the issue:
Did not fix this issue:
- Forget it, allow the code to recreate identical constructions. The Construction:FfactorGroundFloor name instead gets a 1 appended to it, but I still get the same error. This is odd, as it is no longer duplicated.
Did fix the issue, but I'm unhappy with the result:
- Change the name to simply "Basement Floor" and cause one construction for every basement floor, with no specifications in the name.
Any ideas what is going on? Why does that object name cause this error?
IDF and OSM files can be found here