You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have found an issue when adding consolidations to soil layers in D-Stability using the function add_soil_layer_consolidations(). The error that I get is No soil layer loads found for scenario 1 stage 0.
I think the issue originates in the function has_soil_layer() in geolib\models\dstability\internal.py on line 2312. This function expects the stage_index to be the index of the list of all stages, while the stage_index that is passed is the index of the list of stages in the scenario.
To fix the issue, I think a conversion of the stage_index is needed. I managed to get the adding of the consolidation values to work by adding the following line of code in geolib\models\dstability\internal.py on line 2316: stage_index = sum([len(scenario.Stages) for scenario in self.scenarios[:scenario_index]]) + stage_index
I am not sure to what extend this impacts other parts of geolib.
Can this be fixed in the next version? I am currently using d-geolib version 1.3.1
The text was updated successfully, but these errors were encountered:
sweco-nlwkam
changed the title
Inconsistency in use of stage_index in dstability_model.py
Inconsistency in use of stage_index in geolib\models\dstability\internal.py
Sep 14, 2023
I have found an issue when adding consolidations to soil layers in D-Stability using the function
add_soil_layer_consolidations()
. The error that I get isNo soil layer loads found for scenario 1 stage 0
.I think the issue originates in the function
has_soil_layer()
ingeolib\models\dstability\internal.py
on line 2312. This function expects thestage_index
to be the index of the list of all stages, while thestage_index
that is passed is the index of the list of stages in the scenario.To fix the issue, I think a conversion of the stage_index is needed. I managed to get the adding of the consolidation values to work by adding the following line of code in
geolib\models\dstability\internal.py
on line 2316:stage_index = sum([len(scenario.Stages) for scenario in self.scenarios[:scenario_index]]) + stage_index
I am not sure to what extend this impacts other parts of geolib.
Can this be fixed in the next version? I am currently using d-geolib version 1.3.1
The text was updated successfully, but these errors were encountered: