Skip to content

Commit

Permalink
fix: lateral constraint update
Browse files Browse the repository at this point in the history
variable to use or not vertical data to constrain lateral extent
  • Loading branch information
Fer071989 committed Jan 30, 2023
1 parent d202656 commit c830149
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions LoopStructural/modelling/intrusions/intrusion_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ def __init__(
self.vertical_extent_model = None
self.width_data = [True, True]
self.thickness_data = False
self.constrain_sides_with_rooffloor_data = False


self.data_for_lateral_extent_calculation = None
Expand Down Expand Up @@ -522,6 +523,7 @@ def set_data_for_lateral_thresholds(self):

# check if roof or floor data outside of conceptual model.
# if so, add as constraints to conceptual model.

vertical_data = pd.concat([self.vertical_contact_data[0], self.vertical_contact_data[1]])
vertical_data.loc[:, ["conceptual_maxside", "conceptual_minside"]] = self.lateral_extent_model(
lateral_contact_data=vertical_data,
Expand All @@ -538,7 +540,7 @@ def set_data_for_lateral_thresholds(self):
data_for_min_L_.reset_index(inplace = True)
data_for_min_L_.drop_duplicates(subset = ['X','Y','Z','coord0','coord1','coord2','l_conceptual','l_residual'], inplace = True)

if len(data_for_min_L_) >0:
if len(data_for_min_L_) >0 and self.constrain_sides_with_rooffloor_data == True:
print('adding data from roof/floor to constrain L<0')
data_for_min_L = pd.concat([data_for_min_L, data_for_min_L_])

Expand All @@ -551,7 +553,7 @@ def set_data_for_lateral_thresholds(self):
subset = ['X','Y','Z','coord0','coord1','coord2','l_conceptual','l_residual'],
inplace = True)

if len(data_for_max_L_) >0:
if len(data_for_max_L_) >0 and self.constrain_sides_with_rooffloor_data == True:
print('adding data from roof/floor to constrain L>0')
data_for_max_L = pd.concat([data_for_max_L, data_for_max_L_])

Expand Down

0 comments on commit c830149

Please sign in to comment.