7
« on: May 03, 2022, 10:32:35 PM »
Hello Adam,
I faced a problem related to the location of the components.
I checked in different prototypes, when I define the location of the components in the CMP_marginals_LET file, I do not face any problem if I put "all" or any floor number (e.g. "1", "2",...) in the "Location" column except for the ground floor. If I assign any component to the ground level (e.g. "0" or "0--5") I face two different errors depending on whether the component is drift-sensitive or acceleration-sensitive. I copied the error messages at the end of this message. I personally think this is an important issue, because usually the components of the roof level are different, and using "all" is not possible for many components.
As another example, in the Jupyter notebook example file, if you change the location of the Traction Elevator to "0" (According to FEMA documentation, for traction elevator the acceleration of the first floor which is "0" floor in PELICUN should be used), you will see the same error.
I also have a few questions related to the location of the components, I will try to explain as clearly as I can, however, if it is not that clear please let me know.
1- According to the FEMA documentation, for some components like C30.32.001a (suspended ceiling), the EDP of the above floor should be considered for calculating the damage in the component; therefore, it is meaningless to assign such components to the roof level since there is no level above that. Does Pelicun follow the same rule? If it does, what would happen if such components are assigned to the roof level (e.g. using "all" in the "Location" column)? Will Pelicun ignore the roof level automatically?
2- The drift-sensitive components should be assigned to the "story" numbers while the acceleration-sensitive components should be assigned to the "floor" number (floor number = story number +1). What does it mean if you assign "0-6'' to a drift-sensitive component in a 6-story building. Will Pelicun ignore "0" or "6"? or for example, in the Jupyter notebook example, you assigned "all" to many drift-sensitive components like Wall partitions. Does Pelicun ignore the "roof" or "0" level in such cases?
3- In a four-story building (like Jupyter notebook example), if we put "2-4" in the "Location" column for a drift-sensitive component, does Pelicun consider the drifts of the 2nd, 3rd, and 4th stories? if yes, then what does "0--4" mean (the same question)?
Again, thank you so much and I really appreciate your nice and quick support.
Pooya,
Drift-sensitive components
PAL.damage.calculate(sample_size, dmg_process=dmg_process)
File "C:\Users\pooya\anaconda3\lib\site-packages\pelicun\model.py", line 1991, in calculate
demand = self._assemble_required_demand_data(EDP_req)
File "C:\Users\pooya\anaconda3\lib\site-packages\pelicun\model.py", line 1591, in _assemble_required_demand_data
demand = demand_source[(EDP_req[0], EDP_req[1], EDP_req[2])].values
File "C:\Users\pooya\anaconda3\lib\site-packages\pandas\core\frame.py", line 3504, in __getitem__
return self._getitem_multilevel(key)
File "C:\Users\pooya\anaconda3\lib\site-packages\pandas\core\frame.py", line 3555, in _getitem_multilevel
loc = self.columns.get_loc(key)
File "C:\Users\pooya\anaconda3\lib\site-packages\pandas\core\indexes\multi.py", line 2882, in get_loc
return self._engine.get_loc(key)
File "pandas\_libs\index.pyx", line 779, in pandas._libs.index.BaseMultiIndexCodesEngine.get_loc
File "pandas\_libs\index.pyx", line 136, in pandas._libs.index.IndexEngine.get_loc
File "pandas\_libs\index.pyx", line 163, in pandas._libs.index.IndexEngine.get_loc
File "pandas\_libs\hashtable_class_helper.pxi", line 1832, in pandas._libs.hashtable.UInt64HashTable.get_item
File "pandas\_libs\hashtable_class_helper.pxi", line 1841, in pandas._libs.hashtable.UInt64HashTable.get_item
acceleration-sensitive components:
PAL.damage.calculate(sample_size, dmg_process=dmg_process)
File "C:\Users\pooya\anaconda3\lib\site-packages\pelicun\model.py", line 1994, in calculate
ds_sample = self._evaluate_damage_state(demand, capacity_sample, lsds_sample)
File "C:\Users\pooya\anaconda3\lib\site-packages\pelicun\model.py", line 1625, in _evaluate_damage_state
dmg_eval = (capacity_sample.sub(demand, axis=0) < 0)
File "C:\Users\pooya\anaconda3\lib\site-packages\pandas\core\ops\__init__.py", line 447, in f
new_data = self._dispatch_frame_op(other, op)
File "C:\Users\pooya\anaconda3\lib\site-packages\pandas\core\frame.py", line 6967, in _dispatch_frame_op
bm = self._mgr.apply(array_op, right=right)
File "C:\Users\pooya\anaconda3\lib\site-packages\pandas\core\internals\managers.py", line 302, in apply
applied = b.apply(f, **kwargs)
File "C:\Users\pooya\anaconda3\lib\site-packages\pandas\core\internals\blocks.py", line 402, in apply
result = func(self.values, **kwargs)
File "C:\Users\pooya\anaconda3\lib\site-packages\pandas\core\ops\array_ops.py", line 222, in arithmetic_op
res_values = _na_arithmetic_op(left, right, op)
File "C:\Users\pooya\anaconda3\lib\site-packages\pandas\core\ops\array_ops.py", line 163, in _na_arithmetic_op
result = func(left, right)
File "C:\Users\pooya\anaconda3\lib\site-packages\pandas\core\computation\expressions.py", line 239, in evaluate
return _evaluate(op, op_str, a, b) # type: ignore[misc]
File "C:\Users\pooya\anaconda3\lib\site-packages\pandas\core\computation\expressions.py", line 128, in _evaluate_numexpr
result = _evaluate_standard(op, op_str, a, b)
File "C:\Users\pooya\anaconda3\lib\site-packages\pandas\core\computation\expressions.py", line 69, in _evaluate_standard
return op(a, b)
TypeError: unsupported operand type(s) for -: 'float' and 'NoneType'
KeyError: 101