diff --git a/pelicun/__init__.py b/pelicun/__init__.py index f78ed32f6..85c77352b 100644 --- a/pelicun/__init__.py +++ b/pelicun/__init__.py @@ -41,7 +41,7 @@ name = "pelicun" -__version__ = '3.3.1' +__version__ = '3.3.2' __copyright__ = ("Copyright (c) 2018 Leland Stanford " "Junior University and The Regents " diff --git a/pelicun/resources/auto/Hazus_Earthquake_IM.py b/pelicun/resources/auto/Hazus_Earthquake_IM.py index 970f51fa3..90f720933 100644 --- a/pelicun/resources/auto/Hazus_Earthquake_IM.py +++ b/pelicun/resources/auto/Hazus_Earthquake_IM.py @@ -408,6 +408,11 @@ def auto_populate(AIM): "MapApproach": "Automatic", } }, + "Options": { + "NonDirectionalMultipliers": { + "ALL": 1.0 + }, + } } elif assetType == "TransportationNetwork": @@ -441,6 +446,11 @@ def auto_populate(AIM): "MapApproach": "Automatic", } }, + "Options": { + "NonDirectionalMultipliers": { + "ALL": 1.0 + }, + } } elif inf_type == "HwyTunnel": @@ -471,6 +481,11 @@ def auto_populate(AIM): "MapApproach": "Automatic", } }, + "Options": { + "NonDirectionalMultipliers": { + "ALL": 1.0 + }, + } } elif inf_type == "Roadway": # get the road class @@ -499,6 +514,11 @@ def auto_populate(AIM): "MapApproach": "Automatic", } }, + "Options": { + "NonDirectionalMultipliers": { + "ALL": 1.0 + }, + } } else: print("subtype not supported in HWY") diff --git a/pelicun/resources/auto/Hazus_Earthquake_Story.py b/pelicun/resources/auto/Hazus_Earthquake_Story.py index 0b2bd34eb..76fba65d7 100644 --- a/pelicun/resources/auto/Hazus_Earthquake_Story.py +++ b/pelicun/resources/auto/Hazus_Earthquake_Story.py @@ -264,6 +264,11 @@ def auto_populate(AIM): "Damage": {"DamageProcess": "Hazus Earthquake"}, "Demands": {}, "Losses": {"Repair": repair_config}, + "Options": { + "NonDirectionalMultipliers": { + "ALL": 1.0 + }, + } } else: diff --git a/pelicun/uq.py b/pelicun/uq.py index 67b51a66b..587d193ce 100644 --- a/pelicun/uq.py +++ b/pelicun/uq.py @@ -1245,9 +1245,9 @@ def __init__( """ super().__init__( - name, - f_map, - anchor, + name=name, + f_map=f_map, + anchor=anchor, ) @abstractmethod @@ -1281,9 +1281,7 @@ class SampleSizeRandomVariable(BaseRandomVariable): @abstractmethod def __init__( self, - name, - theta, - truncation_limits=np.array((np.nan, np.nan)), + name, f_map=None, anchor=None, ): @@ -1293,15 +1291,7 @@ def __init__( Parameters ---------- name: string - A unique string that identifies the random variable. - theta: 2-element float ndarray - Set of parameters that define the Cumulative Distribution - Function (CDF) of the variable: Mean, coefficient of - variation. - truncation_limits: float ndarray, optional - Defines the np.array((a, b)) truncation limits for the - distribution. Use np.nan to assign no limit in one direction, - like so: np.array((a, np.nan)), or np.array((np.nan, b)). + A unique string that identifies the random variable. f_map: function, optional A user-defined function that is applied on the realizations before returning a sample. @@ -1313,9 +1303,9 @@ def __init__( """ super().__init__( - name, - f_map, - anchor, + name=name, + f_map=f_map, + anchor=anchor, ) @abstractmethod @@ -1349,9 +1339,11 @@ def __init__( anchor=None, ): super().__init__( - name, - f_map, - anchor, + name=name, + theta=theta, + truncation_limits=truncation_limits, + f_map=f_map, + anchor=anchor, ) self.distribution = 'normal' self.theta = np.atleast_1d(theta) @@ -1469,9 +1461,11 @@ def __init__( anchor=None, ): super().__init__( - name, - f_map, - anchor, + name=name, + theta=theta, + truncation_limits=truncation_limits, + f_map=f_map, + anchor=anchor, ) self.distribution = 'lognormal' self.theta = np.atleast_1d(theta) @@ -1583,9 +1577,11 @@ def __init__( anchor=None, ): super().__init__( - name, - f_map, - anchor, + name=name, + theta=theta, + truncation_limits=truncation_limits, + f_map=f_map, + anchor=anchor, ) self.distribution = 'uniform' self.theta = np.atleast_1d(theta) @@ -1670,9 +1666,11 @@ def __init__( anchor=None, ): super().__init__( - name, - f_map, - anchor, + name=name, + theta=theta, + truncation_limits=truncation_limits, + f_map=f_map, + anchor=anchor, ) self.distribution = 'multilinear_CDF' @@ -1791,9 +1789,11 @@ def __init__( anchor=None, ): super().__init__( - name, - f_map, - anchor, + name=name, + theta=raw_samples, + truncation_limits=truncation_limits, + f_map=f_map, + anchor=anchor, ) self.distribution = 'empirical' if not np.all(np.isnan(truncation_limits)): @@ -1871,9 +1871,9 @@ def __init__( """ super().__init__( - name, - f_map, - anchor, + name=name, + f_map=f_map, + anchor=anchor, ) self.distribution = 'coupled_empirical' if not np.all(np.isnan(truncation_limits)): @@ -1957,9 +1957,9 @@ def __init__( """ super().__init__( - name, - f_map, - anchor, + name=name, + f_map=f_map, + anchor=anchor, ) self.distribution = 'deterministic' if not np.all(np.isnan(truncation_limits)): @@ -2004,9 +2004,11 @@ def __init__( anchor=None, ): super().__init__( - name, - f_map, - anchor, + name=name, + theta=theta, + truncation_limits=truncation_limits, + f_map=f_map, + anchor=anchor, ) if not np.all(np.isnan(truncation_limits)): raise NotImplementedError( diff --git a/setup.py b/setup.py index 516d89dba..88b3001d3 100644 --- a/setup.py +++ b/setup.py @@ -45,7 +45,7 @@ def read(*filenames, **kwargs): 'numpy>=1.22.0, <2.0', 'scipy>=1.7.0, <2.0', 'pandas>=1.4.0, <3.0', - 'tables>=3.7.0', + #'tables>=3.7.0', ], classifiers=[ 'Programming Language :: Python',