Deltares / ra2ce

RA2CE helps to quantify resilience of critical infrastructure networks, prioritize interventions and adaptation measures and select the most appropriate action perspective to increase resilience considering future conditions.
https://deltares.github.io/ra2ce/
Other
11 stars 2 forks source link

Lane interpolator creates a decimal value that crashes RA2CE #554

Closed LiekeMeijer closed 3 months ago

LiekeMeijer commented 3 months ago

Ra2ce version checks

Reproducible example

example_damages_OSdamage_return_period notebook developed for launch

Current behaviour

default_value = np.mean(
    list(_val for _val in _lanes_dict.values() if not np.isnan(_val))
)

Due to np.mean we get a decimal value and RA2CE cannot handle this. Should be a whole value (1.0, 2.0, 3.0)

Desired behaviour

I want the np.mean to be a whole value only 1.0, 2.0, 3.0 etc. not a decimal value like 2.3333335. Therefore we need to make sure it is an integer or float value

Additional context

No response