tsnet.network package¶
Submodules¶
tsnet.network.control module¶
This file to define Fragility Curves
-
class
tsnet.network.control.FragilityCurve[source]¶ Bases:
objectFragility Curve class.
-
add_state(name, priority=0, distribution={})[source]¶ Add a damage state distribution
Parameters: - name (string) – Name of the damage state
- priority (int) – Damage state priority
- distribution (dict, key = string, value = scipy.stats statistical function) – ‘Default’ can be used to specificy all location
-
states()[source]¶ A generator to iterate over all states, in order of priority :returns: :rtype: state_name, state
-
-
class
tsnet.network.control.State(name, priority=0.0, distribution={})[source]¶ Bases:
objectParameters: - name (string) – Name of the damage state
- priority (int) –
- distribution (dict) –
-
tsnet.network.control.plot_fragility_curve(FC, fill=True, key='Default', title='Fragility curve', xmin=0, xmax=250, npoints=100, xlabel='x', ylabel='Prob. of exceedance', figsize=[10, 6])[source]¶ Plot fragility curve.
Parameters: - FC (FragilityCurve object) – Fragility curve
- fill (bool (optional)) – If true, fill area under the curve (default = True)
- key (string (optional)) – Fragility curve state distribution key (default = ‘Default’)
- title (string (optional)) – Plot title
- xmin (float (optional)) – X axis minimum (default = 0)
- xmax (float (optional)) – X axis maximum (default = 1)
- npoints (int (optional)) – Number of points (default = 100)
- xlabel (string (optional)) – X axis label (default = ‘x’)
- ylabel (string (optional)) – Y axis label (default = ‘Probability of exceedance’)
- figsize (list (optional)) – Figure size (default = [10,5])
tsnet.network.discretize module¶
This file to for correction factor
tsnet.network.model module¶
This file to define Fragility Curves
-
tsnet.network.model.plot_fragility_curve(FC, fill=True, key='Default', title='', xmin=0, xmax=250, npoints=100, xlabel='x', ylabel='Probability of exceedance', figsize=[10, 6])[source]¶ Plot fragility curve.
Parameters: - FC (FragilityCurve object) – Fragility curve
- fill (bool (optional)) – If true, fill area under the curve (default = True)
- key (string (optional)) – Fragility curve state distribution key (default = ‘Default’)
- title (string (optional)) – Plot title
- xmin (float (optional)) – X axis minimum (default = 0)
- xmax (float (optional)) – X axis maximum (default = 1)
- npoints (int (optional)) – Number of points (default = 100)
- xlabel (string (optional)) – X axis label (default = ‘x’)
- ylabel (string (optional)) – Y axis label (default = ‘Probability of exceedance’)
- figsize (list (optional)) – Figure size (default = [10,5])
tsnet.network.topology module¶
Module contents¶
The tsnet.network package contains methods to define 1. a water network geometry, 2. network topology, 3. network control, and 4 .spatial and temporal discretization.