Using Parallel Computing in fmdtools
This notebook will discuss how to use parallel programming in fmdtools, including: - how to set up a model for parallelism - syntax for using parallelism in simulation functions - considerations for optimizing computational performance in a model
Copyright © 2024, United States Government, as represented by the Administrator of the National Aeronautics and Space Administration. All rights reserved.
The “"Fault Model Design tools - fmdtools version 2"” software is licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
[1]:
from ex_pump import *
from fmdtools.sim.sample import FaultDomain, FaultSample
import fmdtools.sim.propagate as propagate
import fmdtools.analyze as an
This notebook uses the pump example (see ex_pump.py
) to illustrate the use of parallelism in fmdtools. This is fairly simple model, and thus it should be noted that there may be considerations with more complex models which may not be adequately covered here.
[2]:
mdl = Pump()
[3]:
result, mdlhist = propagate.nominal(mdl, desired_result='graph')
[4]:
fig, ax = result.graph.draw()
[5]:
fig, ax = mdlhist.plot_line('flows.ee_1.s.current', 'flows.wat_2.s.flowrate')
Model Checks
Before attempting to leverage parallelism in model execution, it can be helpful to check whether a model is compatible with python parallel computing libraries. In order for a model to be parallelized, it must be compatible with pickling–python’s method of data serialization. This is used in parallel programming methods to copy the model from the main process thread to the seperate processes of the pool.
fmdtools has two methods to check whether a model can be pickled, check_pickleability
and check_model_pickleability
. The main difference between these is that check_pickleability
works for all objects (e.g. functions and flows), while check_model_pickleability
gives more information for an overall model structure
[6]:
from fmdtools.define.object.base import check_pickleability
from fmdtools.define.architecture.base import check_model_pickleability
[7]:
unpickleable_attributes = check_pickleability(mdl)
The object is pickleable
[8]:
check_model_pickleability(mdl)
FLOWS
ee_1
The object is pickleable
sig_1
The object is pickleable
wat_1
The object is pickleable
wat_2
The object is pickleable
FUNCTIONS
import_ee
ee_out
The object is pickleable
import_water
wat_out
The object is pickleable
import_signal
sig_out
The object is pickleable
move_water
ee_in
sig_in
wat_in
wat_out
The object is pickleable
export_water
wat_in
The object is pickleable
MODEL
The object is pickleable
As you can see, this model is pickleable. However, this may not be the case for all structures if they rely on unpickleable data structures, one common one being iterators like .values().
Using Parallelism in Simulation
Parallelism generally requires using some external parallel processing toolkit. The syntax used by fmdtools methods is compatible with: - multiprocessing, python’s default parallel computing library - multiprocess, a fork of multiprocessing developed by The UQ Foundation - pathos, a broader parallel computing package developed by The UQ Foundation
And any other package that emulates multiprocessing.Pool
[9]:
import multiprocessing as mp
import multiprocess as ms
Parallelism can speed up simulation time when there is a large number of independent simulations to run. The prefered methods for using parallelism are to use a NominalApproach
or SampleApproach
with the methods: - propagate.singlefaults (for all single-fault scenarios in a static model with no approach) - propagate.approach (for sampling a set of faults) - propagate.nominal_approach (for simulating the model nominally over a set of parameters) - propagate.nested_approach (for sampling a
set of faults over a set of model parameters)
These methods can be run in parallel by sending them a pool
object from one of these modules as the optional pool
argument. Further details on setting up and running an approach are provided in docs/Approach Use-Cases.ipynb
[10]:
pool = mp.Pool(4)
fd = FaultDomain(mdl)
fd.add_all()
fs = FaultSample(fd)
fs.add_fault_phases()
endclasses, mdlhists = propagate.fault_sample(mdl, fs, pool=pool)
#an.tabulate.simplefmea(endclasses)
SCENARIOS COMPLETE: 100%|██████████| 24/24 [00:02<00:00, 9.49it/s]
[11]:
pool
[11]:
<multiprocessing.pool.Pool state=TERMINATE pool_size=4>
Sometimes, it helps to “warm up” the pool. See, for example, how much longer per-second iterations take for the above compared to below:
[12]:
pool = mp.Pool(4)
endclasses, mdlhists = propagate.single_faults(mdl, pool=pool)
#an.tabulate.simplefmea(endclasses)
SCENARIOS COMPLETE: 100%|██████████| 8/8 [00:02<00:00, 3.50it/s]
It can also be helpful to verify that the results of parallel simulation and normal serial execution are the same:
[13]:
pool = mp.Pool(4)
endclasses_par, mdlhists = propagate.single_faults(mdl, pool=pool, close_pool=False)
#tab_par = an.tabulate.simplefmea(endclasses_par)
endclasses, mdlhists = propagate.single_faults(mdl)
#tab = an.tabulate.simplefmea(endclasses)
#tab - tab_par
SCENARIOS COMPLETE: 100%|██████████| 8/8 [00:02<00:00, 3.47it/s]
SCENARIOS COMPLETE: 100%|██████████| 8/8 [00:00<00:00, 17.86it/s]
[14]:
# pool = mp.Pool(4)
endclasses_par, mdlhists = propagate.fault_sample(mdl, fs, pool=pool)
#tab_par = an.tabulate.simplefmea(endclasses_par)
endclasses, mdlhists = propagate.fault_sample(mdl, fs)
#tab = an.tabulate.simplefmea(endclasses)
#tab - tab_par
pool
SCENARIOS COMPLETE: 100%|██████████| 24/24 [00:00<00:00, 57.05it/s]
SCENARIOS COMPLETE: 100%|██████████| 24/24 [00:01<00:00, 17.13it/s]
[14]:
<multiprocessing.pool.Pool state=TERMINATE pool_size=4>
While fmdtools built-in methods are the easiest way to leverage parallelism, it can also be used with custom arguments/methods to meet the needs of simulation. However, (on Windows) these methods need to be defined in an external module with an “if name==’main’:” statement, otherwise execution will hang from spawning new processes. This has to do with how multiprocessing works in windows.
To show how parellism can be leveraged manually for a desired use-case, below the model is run over the blockage fault mode at time t=1 with a different model parameter (delayed failure behavior), as defined in the parallelism_methods.py
module in this folder.
[15]:
from parallelism_methods import delay_test
[16]:
results = delay_test()
results
[16]:
[endclass.rate: 1e-05
endclass.cost: 20125.000000000007
endclass.expected_cost: 20125.000000000007,
endclass.rate: 1e-05
endclass.cost: 20102.500000000007
endclass.expected_cost: 20102.500000000007,
endclass.rate: 1e-05
endclass.cost: 20080.000000000007
endclass.expected_cost: 20080.000000000007,
endclass.rate: 1e-05
endclass.cost: 20057.500000000007
endclass.expected_cost: 20057.500000000007,
endclass.rate: 1e-05
endclass.cost: 20035.000000000007
endclass.expected_cost: 20035.000000000007,
endclass.rate: 1e-05
endclass.cost: 15023.750000000005
endclass.expected_cost: 15023.750000000005,
endclass.rate: 1e-05
endclass.cost: 15023.750000000005
endclass.expected_cost: 15023.750000000005,
endclass.rate: 1e-05
endclass.cost: 15023.750000000005
endclass.expected_cost: 15023.750000000005,
endclass.rate: 1e-05
endclass.cost: 15023.750000000005
endclass.expected_cost: 15023.750000000005,
endclass.rate: 1e-05
endclass.cost: 15023.750000000005
endclass.expected_cost: 15023.750000000005]
In this method, the model is run many times over a given fault with different delay parameters. It should be noted that this approach is not especially efficient, since the nominal scenario is simulated at each call of propagate.one_fault()
. It is thus preferred to use the appropriate fault/parameter sampling approaches and propagate methods, since these methods only run the nominal simulation once for fault scenarios and can also use staged execution (copying the model at fault time for
fault scenarios) to reduce the cost of each simulation.
Performance Comparison
Parallelism is often used in computation to speed up up a set of independent simulations. Conventionally, one might say it leads to a reduced computational cost of \(t/n\), where t was the original time of the set of processes, and n is the number of cores.
However, this computational performance increase is dependent on the implementation. In Python, there is some overhead from from communicating data structures in and out of parallel threads which can become a significant consideration when the data structures are large. Additionally, different Pools can execute more or less efficiently. Below these are each compared.
[17]:
import matplotlib.pyplot as plt
from parallelism_methods import compare_pools, instantiate_pools, terminate_pools
[18]:
cores=4
pools = instantiate_pools(cores)
Below is the baseline comparison, where the the following parameters characterize the sampling approach: - single faults: only the single-fault scenarios are considered - 3 points per phase: an evenly-spaced quadrature is sampled at each phase of operation (start, on, end) for the model - staged: the model is copied at each point in time where faults is injected during the model time to save computation - track: the entire model history is returned for each simulation
This is typical for a small model like this where the per-model expense is low.
[19]:
mdl=Pump(track='all')
fs = FaultSample(fd)
fs.add_fault_phases(args = (3,))
pools = instantiate_pools(5)
_ = compare_pools(mdl, fs, pools, staged=True, verbose=False)
[20]:
exectimes = compare_pools(mdl, fs, pools, staged=True, verbose=False)
exectimes_baseline = exectimes
[21]:
fig = plt.figure(figsize=(9, 3),)
plt.bar(range(len(exectimes)), list(exectimes.values()), align='center')
plt.xticks(range(len(exectimes)), list(exectimes.keys()))
plt.title("Baseline Performance - Some faults, Staged, Normal Simulation, Full Model History")
plt.ylabel("Computational Time (s)")
plt.grid(axis='y')
As shown, in this situation, both the multiprocessing and threadpool pools give computational performance increases.
Comparison: No Histories
In the below comparison, the same simulation approach is run, except without tracking a history of model states through the simulation.
[22]:
mdl=Pump(track='none')
exectimes = compare_pools(mdl, fs, pools, staged=True, verbose=False)
[23]:
fig = plt.figure(figsize=(9, 3),)
width = 0.8
plt.bar(range(len(exectimes)), list(exectimes.values()), align='center', color="blue", label="comparison")
plt.bar(range(len(exectimes_baseline)), list(exectimes_baseline.values()), align='center', color="gray", alpha=0.5, label="baseline")
plt.xticks(range(len(exectimes)), list(exectimes.keys()))
plt.title("Computational Performance - Many Faults, Staged, Normal Simulation, No Model History")
plt.ylabel("Computational Time (s)")
plt.grid(axis='y')
plt.legend()
[23]:
<matplotlib.legend.Legend at 0x22ca9e48b10>
As shown, in this situation, the overall simulation expense decreases, even in the serial execution case.
Additionally, the case for using a parallel processing pool increases somewhat. This is because passing the model history back to the main process is nearly comparable in time to simulation itself.
As a result, removing it saves a large amount of computational time when using parallel processing.
Comparison: Many Faults
In the below comparison, many faults are injected in the system to increase the number of scenarios (ostensibly making the case better for parallelism)
[24]:
fs_many = FaultSample(fd)
fs_many.add_fault_phases(args = (7,))
mdl=Pump(track='all')
exectimes = compare_pools(mdl, fs_many, pools, staged=True, verbose=False)
[25]:
fig = plt.figure(figsize=(9, 3),)
width = 0.8
plt.bar(range(len(exectimes)), list(exectimes.values()), align='center', color="blue", label="comparison")
plt.bar(range(len(exectimes_baseline)), list(exectimes_baseline.values()), align='center', color="gray", alpha=0.8, label="baseline")
plt.xticks(range(len(exectimes)), list(exectimes.keys()))
plt.title("Computational Performance - Many Faults, Staged, Normal Simulation, Full Model History")
plt.ylabel("Computational Time (s)")
plt.grid(axis='y')
plt.legend()
[25]:
<matplotlib.legend.Legend at 0x22caa21cf10>
As shown, increasing the number of joint-fault scenarios increases computational costs significantly–as would be expected.
In this situation, multiprocessing performs comparatively better, but only slightly–instead of taking 1/4 the time, it only takes about 1/2 the time.
Comparison: Long simulation
It may be of interest to simulate how the comparative performance changes for longer simulations. In this comparison, the simulation time is extended tenfold.
[26]:
mdl=Pump(sp=dict(times=(0,20, 500)), track='all')
exectimes = compare_pools(mdl, fs, pools, staged=True, verbose=False)
[27]:
fig = plt.figure(figsize=(9, 3),)
width = 0.8
plt.bar(range(len(exectimes)), list(exectimes.values()), align='center', color="blue", label="comparison")
plt.bar(range(len(exectimes_baseline)), list(exectimes_baseline.values()), align='center', color="gray", alpha=0.8, label="baseline")
plt.xticks(range(len(exectimes)), list(exectimes.keys()))
plt.title("Computational Performance - Normal Faults, Staged, Long Simulation, Full Model History")
plt.ylabel("Computational Time (s)")
plt.grid(axis='y')
plt.legend()
[27]:
<matplotlib.legend.Legend at 0x22caa252310>
As shown, the simulation time does increase significantly–about tenfold. In terms of comparative performance, pools other than multiprocessing now become competitive, though multiprocessing is still the fastest overall.
This shows the main case for using parallesism–speeding up long simulations. Short simulations unfortunately require a significant amount of overhead due to copying in and out of the individual thread and we thus see less of a case for them there.
Comparison: Long Simulation No Tracking
Finally, it may be interesting to see how performance is affected in long simulations when there is no tracking. This is because in these simulations, there should be very little overhead from creating the respective data structures, even when there is a long simulation. This comparison is shown below.
[28]:
mdl=Pump(sp=dict(times=(0,20, 500)), track='none')
exectimes = compare_pools(mdl, fs, pools, staged=True, verbose=False)
[29]:
fig = plt.figure(figsize=(9, 3),)
width = 0.8
plt.bar(range(len(exectimes)), list(exectimes.values()), align='center', color="blue", label="comparison")
plt.bar(range(len(exectimes_baseline)), list(exectimes_baseline.values()), align='center', color="gray", alpha=0.8, label="baseline")
plt.xticks(range(len(exectimes)), list(exectimes.keys()))
plt.title("Computational Performance - Normal Faults, Staged, Long Simulation, No Model History")
plt.ylabel("Computational Time (s)")
plt.grid(axis='y')
plt.legend()
[29]:
<matplotlib.legend.Legend at 0x22ca7df0450>
As shown, removing the tracking makes the long simulations much take less time than the short simulation!
Comparison: Long Simulation Only Necessary Tracking
In practice, it can be necessary to track some states over time. Here we perform the same comparison using the ‘valstates’ option, which only tracks states which have been defined in the model to be necessary to track (using ‘valparams’)
[30]:
mdl=Pump(sp=dict(times=(0,20, 500))) # see default track for Pump
exectimes = compare_pools(mdl, fs, pools, staged=True, verbose=False)
[31]:
fig = plt.figure(figsize=(9, 3),)
width = 0.8
plt.bar(range(len(exectimes)), list(exectimes.values()), align='center', color="blue", label="comparison")
plt.bar(range(len(exectimes_baseline)), list(exectimes_baseline.values()), align='center', color="gray", alpha=0.8, label="baseline")
plt.xticks(range(len(exectimes)), list(exectimes.keys()))
plt.title("Computational Performance - Normal Faults, Staged, Long Simulation, Only Necessary History")
plt.ylabel("Computational Time (s)")
plt.grid(axis='y')
plt.legend()
[31]:
<matplotlib.legend.Legend at 0x22caa7f7050>
As shown, only tracking a few variables results in similar computational time no tracking.
This is because a major computational performance limitation in this model is not necessarily the model simulation itself, but the generation, update, and passing of the history. So it is often best to only track necessary parameters when possible, rather than the entire model history.
Comparison: Lower Tracking Time Resolution
Finally, the number of recorded timesteps can be lowered to lower computational costs while still returning all relevant variables.
[32]:
mdl=Pump(sp=dict(times=(0,20, 500), track_times=("interval", 5)), track='all')
exectimes = compare_pools(mdl, fs, pools, staged=True, verbose=False)
[33]:
fig = plt.figure(figsize=(9, 3),)
width = 0.8
plt.bar(range(len(exectimes)), list(exectimes.values()), align='center', color="blue", label="comparison")
plt.bar(range(len(exectimes_baseline)), list(exectimes_baseline.values()), align='center', color="gray", alpha=0.8, label="baseline")
plt.xticks(range(len(exectimes)), list(exectimes.keys()))
plt.title("Computational Performance - Many Faults, Staged, Normal Simulation, Lower Time Resolution")
plt.ylabel("Computational Time (s)")
plt.grid(axis='y')
plt.legend()
[33]:
<matplotlib.legend.Legend at 0x22caa3ef910>
As shown, while lowering time resolution could theoretically lower computational time, it does not significantly change much in this example.
[34]:
terminate_pools(pools)
Comparison Conclusions:
Parallelism can the improve computational performance of a given resilience simulation approach. However, this improvement is dependent on the parameters of the simulation. Generally, the official python multiprocessing
module seems consistently give the best performance improvement over a single-process execution, although this can change depending on the underlying model and modelling approach. There are additionally reasons you might choose other pools– multiprocess
pools may enable
more data structures in the model because they extend what can be communicated in and out of threads.
In general, one of the major considerations for optimization compuational time is not just the simulation of the model, but the size of the returned data structures. Minimizing the size of the returned data structures can reduce computational time both by reducing the time of an individual simulation and by reducing the parallelism overhead from copying these data structures in and out of parallel threads. However, it is important to recognize that for resilience assessment, one often needs a history of model states (or, at least, states of interest) to properly quantify the dynamic costs (i.e., \(\int C_f(t) dt\)). Indeed, in this model, only repair costs were able to be used in the comparison of non-tracked states, because the other dynamic costs required a history of their corresponding flows. Changing the number and size of tracked model states can influence the computational time, but only to a point–while one would expect lowering time-fidelity to have a significant effect, it does not because the overhead is less to do with filling the underlying data structures as it has to do with instantiating and returning them–a far more effective method is to only return the functions/flows which are needed by the model.
Further Computational Cost Reduction via Profiling
While parallelism and staged execution are helpful and relatively easy-to-implement methods of computational cost reduction, it can be helpful (especially for more complex models) to see what aspects of the model are taking the most computational time.
While staged execution was not explored here, it can make a difference when faults are to be injected near the end of the simulation by making it unnecessary to simulate up to the fault time. However, it is less helpful when model instantiation/copy time is a significant fraction of simulation time.
Python’s builtin cProfile
package can ge used to see the relative computational times of different functions/processes.
[35]:
import cProfile
[36]:
mdl=Pump(sp=dict(track='all'))
prof = cProfile.run('propagate.nominal(mdl)', sort='tottime')
144930 function calls (140910 primitive calls) in 0.086 seconds
Ordered by: internal time
ncalls tottime percall cumtime percall filename:lineno(function)
3834 0.014 0.000 0.035 0.000 base.py:482(get_roles_as_dict)
4990 0.007 0.000 0.008 0.000 base.py:457(<listcomp>)
3834/2032 0.005 0.000 0.030 0.000 base.py:632(<listcomp>)
4990 0.005 0.000 0.015 0.000 base.py:454(get_roles)
3834 0.004 0.000 0.046 0.000 base.py:616(find_mutables)
3834/2032 0.004 0.000 0.060 0.000 base.py:621(return_mutables)
3834 0.003 0.000 0.006 0.000 base.py:618(<listcomp>)
8824 0.003 0.000 0.003 0.000 base.py:445(get_default_roletypes)
56 0.003 0.000 0.072 0.001 function.py:784(prop_static)
3834 0.002 0.000 0.003 0.000 base.py:500(<dictcomp>)
16084 0.002 0.000 0.002 0.000 {built-in method builtins.getattr}
3834 0.002 0.000 0.002 0.000 base.py:493(<listcomp>)
3834 0.002 0.000 0.002 0.000 base.py:487(<listcomp>)
7212 0.002 0.000 0.002 0.000 inspect.py:300(ismethod)
1124 0.002 0.000 0.002 0.000 time.py:110(return_mutables)
562 0.002 0.000 0.009 0.000 function.py:160(__call__)
50 0.002 0.000 0.002 0.000 base.py:250(<listcomp>)
3834 0.002 0.000 0.002 0.000 base.py:461(get_flex_role_objs)
72 0.001 0.000 0.001 0.000 {built-in method builtins.dir}
10070 0.001 0.000 0.001 0.000 {built-in method builtins.hasattr}
560/224 0.001 0.000 0.001 0.000 base.py:36(get_var)
10640 0.001 0.000 0.001 0.000 {built-in method builtins.isinstance}
56 0.001 0.000 0.003 0.000 history.py:274(log)
3162 0.001 0.000 0.001 0.000 base.py:409(return_mutables)
1218 0.001 0.000 0.001 0.000 copy.py:66(copy)
8748 0.001 0.000 0.001 0.000 {method 'startswith' of 'str' objects}
900 0.001 0.000 0.001 0.000 mode.py:458(has_fault)
1124 0.001 0.000 0.002 0.000 mode.py:284(return_mutables)
22 0.001 0.000 0.001 0.000 base.py:381(<listcomp>)
113 0.001 0.000 0.002 0.000 ex_pump.py:422(static_behavior)
562 0.000 0.000 0.002 0.000 function.py:138(prop_arch_behaviors)
40 0.000 0.000 0.005 0.000 base.py:260(init_roles)
4986 0.000 0.000 0.000 0.000 {method 'values' of 'dict' objects}
562 0.000 0.000 0.002 0.000 function.py:153(prop_arch_faults_up)
259/231 0.000 0.000 0.001 0.000 copy.py:128(deepcopy)
226 0.000 0.000 0.001 0.000 base.py:267(set_field)
113 0.000 0.000 0.002 0.000 base.py:230(assign)
3162 0.000 0.000 0.000 0.000 {built-in method recordclass._dataobject.astuple}
1350 0.000 0.000 0.000 0.000 time.py:111(<genexpr>)
22 0.000 0.000 0.001 0.000 inspect.py:2331(_signature_from_function)
113 0.000 0.000 0.000 0.000 base.py:169(get_field_dict)
1 0.000 0.000 0.076 0.076 propagate.py:1044(prop_one_scen)
300 0.000 0.000 0.000 0.000 __init__.py:180(add)
113 0.000 0.000 0.000 0.000 ex_pump.py:237(static_behavior)
116 0.000 0.000 0.001 0.000 <frozen _collections_abc>:717(__ior__)
56 0.000 0.000 0.073 0.001 function.py:747(propagate)
2219 0.000 0.000 0.000 0.000 {method 'get' of 'dict' objects}
18 0.000 0.000 0.002 0.000 parameter.py:61(__init__)
44/22 0.000 0.000 0.001 0.000 inspect.py:2435(_signature_from_callable)
90 0.000 0.000 0.000 0.000 inspect.py:2669(__init__)
44 0.000 0.000 0.000 0.000 inspect.py:2955(__init__)
18 0.000 0.000 0.000 0.000 base.py:125(set_arg_type)
112 0.000 0.000 0.000 0.000 ex_pump.py:269(static_behavior)
1257 0.000 0.000 0.000 0.000 {method 'copy' of 'set' objects}
18 0.000 0.000 0.000 0.000 parameter.py:135(check_immutable)
56 0.000 0.000 0.000 0.000 __init__.py:353(union)
112 0.000 0.000 0.000 0.000 ex_pump.py:316(static_behavior)
42/32 0.000 0.000 0.000 0.000 result.py:492(flatten)
18 0.000 0.000 0.008 0.000 base.py:127(add_flex_role_obj)
900 0.000 0.000 0.000 0.000 {method 'intersection' of 'set' objects}
1828/1818 0.000 0.000 0.000 0.000 {built-in method builtins.len}
33 0.000 0.000 0.000 0.000 {method 'round' of 'numpy.ndarray' objects}
909 0.000 0.000 0.000 0.000 {built-in method builtins.any}
10 0.000 0.000 0.006 0.001 base.py:391(__init__)
18 0.000 0.000 0.000 0.000 inspect.py:3215(__str__)
10 0.000 0.000 0.000 0.000 mode.py:287(init_faultmodes)
14 0.000 0.000 0.000 0.000 base.py:88(find_any_phase_overlap)
56 0.000 0.000 0.003 0.000 base.py:224(log_hist)
280 0.000 0.000 0.000 0.000 history.py:53(is_known_mutable)
313 0.000 0.000 0.000 0.000 <frozen abc>:117(__instancecheck__)
30 0.000 0.000 0.001 0.000 base.py:576(create_hist)
113 0.000 0.000 0.000 0.000 base.py:217(<dictcomp>)
118 0.000 0.000 0.001 0.000 __init__.py:65(__init__)
12 0.000 0.000 0.000 0.000 time.py:117(set_timestep)
118 0.000 0.000 0.000 0.000 parameter.py:107(check_lim)
26 0.000 0.000 0.000 0.000 base.py:98(get_true_fields)
113 0.000 0.000 0.000 0.000 ex_pump.py:389(set_faults)
18 0.000 0.000 0.000 0.000 parameter.py:156(check_type)
112 0.000 0.000 0.000 0.000 ex_pump.py:295(static_behavior)
22/20 0.000 0.000 0.006 0.000 base.py:151(__init__)
22 0.000 0.000 0.000 0.000 inspect.py:2037(_signature_bound_method)
313 0.000 0.000 0.000 0.000 {built-in method _abc._abc_instancecheck}
32/30 0.000 0.000 0.005 0.000 base.py:229(init_roletypes)
224 0.000 0.000 0.000 0.000 __init__.py:304(__iter__)
344 0.000 0.000 0.000 0.000 {method 'split' of 'str' objects}
56 0.000 0.000 0.000 0.000 function.py:693(set_vars)
33 0.000 0.000 0.000 0.000 base.py:102(get_timerange)
78 0.000 0.000 0.000 0.000 result.py:337(__setattr__)
12 0.000 0.000 0.005 0.000 base.py:193(__init__)
466 0.000 0.000 0.000 0.000 {method 'join' of 'str' objects}
56 0.000 0.000 0.000 0.000 inspect.py:2756(__str__)
50 0.000 0.000 0.003 0.000 base.py:249(find_roletype_initiators)
293 0.000 0.000 0.000 0.000 {method 'update' of 'set' objects}
64 0.000 0.000 0.000 0.000 common.py:41(get_sub_include)
336 0.000 0.000 0.000 0.000 {built-in method builtins.setattr}
113 0.000 0.000 0.000 0.000 ex_pump.py:220(set_faults)
10 0.000 0.000 0.000 0.000 mode.py:218(__init__)
14 0.000 0.000 0.002 0.000 base.py:77(__init__)
90 0.000 0.000 0.000 0.000 enum.py:688(__call__)
226 0.000 0.000 0.000 0.000 {built-in method builtins.min}
105 0.000 0.000 0.000 0.000 result.py:318(items)
78 0.000 0.000 0.000 0.000 __init__.py:1111(__init__)
26 0.000 0.000 0.000 0.000 base.py:105(<listcomp>)
496 0.000 0.000 0.000 0.000 {method 'append' of 'list' objects}
168 0.000 0.000 0.000 0.000 __init__.py:74(__len__)
112 0.000 0.000 0.000 0.000 inspect.py:3002(<genexpr>)
18 0.000 0.000 0.007 0.000 base.py:895(init_obj)
113 0.000 0.000 0.000 0.000 ex_pump.py:413(indicate_over_pressure)
6 0.000 0.000 0.000 0.000 result.py:368(all_with)
10 0.000 0.000 0.007 0.001 base.py:215(add_sim)
18 0.000 0.000 0.001 0.000 parameter.py:179(check_pickle)
56 0.000 0.000 0.000 0.000 __init__.py:130(copy)
1 0.000 0.000 0.086 0.086 {built-in method builtins.exec}
10 0.000 0.000 0.007 0.001 function.py:534(add_fxn)
22 0.000 0.000 0.000 0.000 inspect.py:167(get_annotations)
26 0.000 0.000 0.000 0.000 numerictypes.py:357(issubdtype)
118 0.000 0.000 0.000 0.000 base.py:154(set_arg_as_type)
33 0.000 0.000 0.000 0.000 {built-in method numpy.arange}
28 0.000 0.000 0.000 0.000 fromnumeric.py:865(sort)
22 0.000 0.000 0.000 0.000 base.py:204(init_track)
265 0.000 0.000 0.000 0.000 {method 'items' of 'dict' objects}
22 0.000 0.000 0.001 0.000 base.py:379(init_indicators)
56 0.000 0.000 0.000 0.000 ex_pump.py:517(indicate_on)
22 0.000 0.000 0.000 0.000 inspect.py:735(unwrap)
42 0.000 0.000 0.000 0.000 result.py:157(check_include_errors)
56 0.000 0.000 0.000 0.000 ex_pump.py:498(indicate_finished)
12 0.000 0.000 0.000 0.000 time.py:92(__init__)
245 0.000 0.000 0.000 0.000 copy.py:182(_deepcopy_atomic)
31 0.000 0.000 0.000 0.000 base.py:117(get_histrange)
26 0.000 0.000 0.000 0.000 common.py:87(is_numeric)
33 0.000 0.000 0.000 0.000 fromnumeric.py:3269(round)
313 0.000 0.000 0.000 0.000 {built-in method builtins.id}
10 0.000 0.000 0.006 0.001 function.py:76(__init__)
33 0.000 0.000 0.000 0.000 fromnumeric.py:53(_wrapfunc)
2 0.000 0.000 0.000 0.000 graph.py:968(add_edges_from)
56 0.000 0.000 0.000 0.000 base.py:148(get_hist_ind)
8 0.000 0.000 0.001 0.000 base.py:175(add_flow)
56 0.000 0.000 0.000 0.000 propagate.py:1016(check_end_condition)
1 0.000 0.000 0.000 0.000 ex_pump.py:521(find_classification)
22 0.000 0.000 0.001 0.000 inspect.py:3007(from_callable)
22 0.000 0.000 0.000 0.000 inspect.py:3023(replace)
8 0.000 0.000 0.000 0.000 history.py:204(init_att)
246 0.000 0.000 0.000 0.000 {built-in method builtins.iter}
4 0.000 0.000 0.001 0.000 parameter.py:175(copy_with_vals)
52 0.000 0.000 0.000 0.000 numerictypes.py:283(issubclass_)
224 0.000 0.000 0.000 0.000 inspect.py:2734(kind)
28 0.000 0.000 0.000 0.000 {built-in method numpy.asanyarray}
63 0.000 0.000 0.000 0.000 __init__.py:1138(__contains__)
10 0.000 0.000 0.001 0.000 base.py:426(create_arch_kwargs)
90 0.000 0.000 0.000 0.000 enum.py:1095(__new__)
8 0.000 0.000 0.000 0.000 result.py:327(__getattr__)
12 0.000 0.000 0.000 0.000 base.py:210(init_hist)
10 0.000 0.000 0.000 0.000 base.py:468(check_flows)
50 0.000 0.000 0.000 0.000 base.py:51(check_role)
4 0.000 0.000 0.000 0.000 graph.py:566(add_nodes_from)
22 0.000 0.000 0.001 0.000 inspect.py:3261(signature)
2 0.000 0.000 0.009 0.005 base.py:84(__init__)
52 0.000 0.000 0.000 0.000 __init__.py:1118(__len__)
1 0.000 0.000 0.086 0.086 propagate.py:496(nom_helper)
10/4 0.000 0.000 0.000 0.000 copy.py:227(_deepcopy_dict)
158 0.000 0.000 0.000 0.000 inspect.py:2722(name)
14 0.000 0.000 0.000 0.000 base.py:93(<listcomp>)
26 0.000 0.000 0.000 0.000 {built-in method numpy.array}
2 0.000 0.000 0.008 0.004 ex_pump.py:470(init_architecture)
6 0.000 0.000 0.000 0.000 base.py:413(init_indicator_hist)
1 0.000 0.000 0.000 0.000 {method 'reduce' of 'numpy.ufunc' objects}
2 0.000 0.000 0.000 0.000 function.py:588(build)
12 0.000 0.000 0.000 0.000 function.py:829(<listcomp>)
55 0.000 0.000 0.000 0.000 __init__.py:1128(__setitem__)
128 0.000 0.000 0.000 0.000 {built-in method builtins.issubclass}
28 0.000 0.000 0.000 0.000 {method 'copy' of 'numpy.ndarray' objects}
113 0.000 0.000 0.000 0.000 {method 'clear' of 'set' objects}
10 0.000 0.000 0.000 0.000 function.py:121(update_seed)
2 0.000 0.000 0.001 0.000 base.py:262(new_params)
10 0.000 0.000 0.000 0.000 base.py:488(<listcomp>)
14 0.000 0.000 0.000 0.000 base.py:90(<dictcomp>)
10 0.000 0.000 0.000 0.000 function.py:97(return_faultmodes)
2 0.000 0.000 0.000 0.000 function.py:600(construct_graph)
28 0.000 0.000 0.000 0.000 {method 'sort' of 'numpy.ndarray' objects}
1 0.000 0.000 0.000 0.000 propagate.py:1144(get_result)
113 0.000 0.000 0.000 0.000 {method 'copy' of 'list' objects}
2 0.000 0.000 0.000 0.000 base.py:245(build)
38 0.000 0.000 0.000 0.000 {method 'format' of 'str' objects}
14 0.000 0.000 0.000 0.000 {built-in method recordclass._dataobject.asdict}
32 0.000 0.000 0.000 0.000 base.py:198(check_slots)
112 0.000 0.000 0.000 0.000 {method 'index' of 'list' objects}
1 0.000 0.000 0.086 0.086 propagate.py:206(nominal)
2 0.000 0.000 0.000 0.000 function.py:596(<listcomp>)
20 0.000 0.000 0.000 0.000 graph.py:1318(neighbors)
44 0.000 0.000 0.000 0.000 inspect.py:378(isfunction)
4 0.000 0.000 0.000 0.000 base.py:361(create_hist)
90 0.000 0.000 0.000 0.000 {method '__contains__' of 'frozenset' objects}
10 0.000 0.000 0.000 0.000 base.py:406(<dictcomp>)
14 0.000 0.000 0.000 0.000 copy.py:243(_keep_alive)
2 0.000 0.000 0.000 0.000 {method '__reduce_ex__' of 'object' objects}
90 0.000 0.000 0.000 0.000 {method 'isidentifier' of 'str' objects}
1 0.000 0.000 0.000 0.000 history.py:340(cut)
2 0.000 0.000 0.000 0.000 function.py:639(return_faultmodes)
2 0.000 0.000 0.000 0.000 functools.py:981(__get__)
2 0.000 0.000 0.009 0.005 function.py:506(__init__)
2 0.000 0.000 0.010 0.005 base.py:296(new)
1 0.000 0.000 0.086 0.086 <string>:1(<module>)
10 0.000 0.000 0.000 0.000 __init__.py:201(update)
20 0.000 0.000 0.000 0.000 reportviews.py:529(__iter__)
42 0.000 0.000 0.000 0.000 result.py:165(check_include_error)
8 0.000 0.000 0.000 0.000 base.py:92(create_hist)
8 0.000 0.000 0.000 0.000 function.py:597(<listcomp>)
14 0.000 0.000 0.000 0.000 base.py:92(<listcomp>)
2 0.000 0.000 0.000 0.000 graph.py:332(__init__)
10 0.000 0.000 0.000 0.000 base.py:445(update_contained_modes)
12 0.000 0.000 0.000 0.000 base.py:206(<dictcomp>)
1 0.000 0.000 0.000 0.000 function.py:612(calc_repaircost)
10 0.000 0.000 0.000 0.000 base.py:433(<dictcomp>)
10 0.000 0.000 0.000 0.000 base.py:267(get_flows)
4 0.000 0.000 0.000 0.000 base.py:348(init_hist_att)
40 0.000 0.000 0.000 0.000 __init__.py:165(__contains__)
60 0.000 0.000 0.000 0.000 {method 'keys' of 'dict' objects}
4 0.000 0.000 0.000 0.000 base.py:260(<dictcomp>)
2 0.000 0.000 0.000 0.000 copyreg.py:113(_slotnames)
10 0.000 0.000 0.000 0.000 base.py:271(<dictcomp>)
2 0.000 0.000 0.000 0.000 function.py:591(<listcomp>)
10 0.000 0.000 0.000 0.000 base.py:483(<listcomp>)
18 0.000 0.000 0.000 0.000 base.py:253(get_full_name)
40 0.000 0.000 0.000 0.000 {method 'values' of 'mappingproxy' objects}
2 0.000 0.000 0.000 0.000 copy.py:259(_reconstruct)
56 0.000 0.000 0.000 0.000 {built-in method from_iterable}
14 0.000 0.000 0.000 0.000 base.py:413(asdict)
1 0.000 0.000 0.000 0.000 fromnumeric.py:71(_wrapreduction)
2 0.000 0.000 0.000 0.000 isolate.py:42(isolates)
66 0.000 0.000 0.000 0.000 {built-in method builtins.callable}
8 0.000 0.000 0.000 0.000 result.py:138(get_dict_attr)
10 0.000 0.000 0.000 0.000 base.py:508(is_dynamic)
33 0.000 0.000 0.000 0.000 fromnumeric.py:3265(_round_dispatcher)
2 0.000 0.000 0.000 0.000 {built-in method builtins.sum}
2 0.000 0.000 0.000 0.000 function.py:593(<listcomp>)
2 0.000 0.000 0.000 0.000 isolate.py:85(<genexpr>)
2 0.000 0.000 0.000 0.000 <frozen _collections_abc>:941(update)
10 0.000 0.000 0.000 0.000 base.py:502(is_static)
4 0.000 0.000 0.000 0.000 state.py:345(init_hist_att)
18 0.000 0.000 0.000 0.000 inspect.py:292(isclass)
52 0.000 0.000 0.000 0.000 {method 'update' of 'dict' objects}
44 0.000 0.000 0.000 0.000 inspect.py:3015(parameters)
48 0.000 0.000 0.000 0.000 copy.py:107(_copy_immutable)
2 0.000 0.000 0.000 0.000 <class 'networkx.utils.decorators.argmap'> compilation 4:1(argmap_isolates_1)
2 0.000 0.000 0.000 0.000 reportviews.py:419(__init__)
2 0.000 0.000 0.000 0.000 base.py:106(init_flexible_roles)
2 0.000 0.000 0.000 0.000 timer.py:61(__init__)
28 0.000 0.000 0.000 0.000 fromnumeric.py:861(_sort_dispatcher)
10 0.000 0.000 0.000 0.000 {built-in method builtins.max}
8 0.000 0.000 0.000 0.000 {built-in method numpy.empty}
6 0.000 0.000 0.000 0.000 base.py:597(<listcomp>)
2 0.000 0.000 0.000 0.000 backends.py:627(__call__)
4 0.000 0.000 0.000 0.000 base.py:69(get_track)
2 0.000 0.000 0.000 0.000 copy.py:201(_deepcopy_list)
36 0.000 0.000 0.000 0.000 {method 'copy' of 'dict' objects}
2 0.000 0.000 0.000 0.000 graph.py:1484(degree)
16 0.000 0.000 0.000 0.000 base.py:65(check_role)
1 0.000 0.000 0.000 0.000 fromnumeric.py:2836(min)
7 0.000 0.000 0.000 0.000 propagate.py:120(<genexpr>)
1 0.000 0.000 0.000 0.000 scenario.py:137(__init__)
2 0.000 0.000 0.000 0.000 base.py:393(<dictcomp>)
7 0.000 0.000 0.000 0.000 __init__.py:1121(__getitem__)
6 0.000 0.000 0.000 0.000 misc.py:595(_clear_cache)
12 0.000 0.000 0.000 0.000 {built-in method fromkeys}
18 0.000 0.000 0.000 0.000 inspect.py:3019(return_annotation)
2 0.000 0.000 0.000 0.000 base.py:384(get_indicators)
2 0.000 0.000 0.000 0.000 graph.py:59(__set__)
20 0.000 0.000 0.000 0.000 {built-in method builtins.repr}
22 0.000 0.000 0.000 0.000 {built-in method sys.getrecursionlimit}
1 0.000 0.000 0.000 0.000 base.py:128(get_shift)
1 0.000 0.000 0.000 0.000 base.py:218(init_time_hist)
4 0.000 0.000 0.000 0.000 result.py:315(keys)
10 0.000 0.000 0.000 0.000 base.py:230(update_seed)
10 0.000 0.000 0.000 0.000 function.py:109(<listcomp>)
1 0.000 0.000 0.000 0.000 propagate.py:240(save_helper)
10 0.000 0.000 0.000 0.000 base.py:422(init_block)
2 0.000 0.000 0.000 0.000 function.py:608(<listcomp>)
2 0.000 0.000 0.000 0.000 __init__.py:1134(__iter__)
1 0.000 0.000 0.000 0.000 propagate.py:118(unpack_sim_kwargs)
1 0.000 0.000 0.000 0.000 propagate.py:872(check_overwrite)
4 0.000 0.000 0.000 0.000 copy.py:264(<genexpr>)
12 0.000 0.000 0.000 0.000 inspect.py:2726(default)
1 0.000 0.000 0.000 0.000 fromnumeric.py:72(<dictcomp>)
2 0.000 0.000 0.000 0.000 base.py:282(update_seed)
4 0.000 0.000 0.000 0.000 {method 'endswith' of 'str' objects}
1 0.000 0.000 0.000 0.000 propagate.py:1160(<listcomp>)
2 0.000 0.000 0.000 0.000 reportviews.py:426(__call__)
2 0.000 0.000 0.000 0.000 graph.py:37(__set__)
2 0.000 0.000 0.000 0.000 parameter.py:104(keys)
2 0.000 0.000 0.000 0.000 {method 'get' of 'mappingproxy' objects}
1 0.000 0.000 0.000 0.000 propagate.py:1183(<listcomp>)
2 0.000 0.000 0.000 0.000 {method '__exit__' of '_thread.RLock' objects}
1 0.000 0.000 0.000 0.000 scenario.py:139(<dictcomp>)
1 0.000 0.000 0.000 0.000 {method 'disable' of '_lsprof.Profiler' objects}
1 0.000 0.000 0.000 0.000 function.py:634(<listcomp>)
1 0.000 0.000 0.000 0.000 fromnumeric.py:2831(_min_dispatcher)
1 0.000 0.000 0.000 0.000 {method 'pop' of 'dict' objects}
[37]:
prof = cProfile.run('propagate.fault_sample(mdl, fs)', sort='tottime')
SCENARIOS COMPLETE: 100%|██████████| 72/72 [00:05<00:00, 12.23it/s]
9994001 function calls (9702625 primitive calls) in 5.988 seconds
Ordered by: internal time
ncalls tottime percall cumtime percall filename:lineno(function)
280116 1.015 0.000 2.587 0.000 base.py:482(get_roles_as_dict)
363550 0.498 0.000 0.580 0.000 base.py:457(<listcomp>)
363550 0.373 0.000 1.090 0.000 base.py:454(get_roles)
280116/148462 0.361 0.000 2.202 0.000 base.py:632(<listcomp>)
280116 0.323 0.000 3.358 0.000 base.py:616(find_mutables)
280116 0.260 0.000 0.428 0.000 base.py:618(<listcomp>)
280116/148462 0.256 0.000 4.370 0.000 base.py:621(return_mutables)
643666 0.237 0.000 0.237 0.000 base.py:445(get_default_roletypes)
4088 0.204 0.000 5.264 0.001 function.py:784(prop_static)
280116 0.168 0.000 0.209 0.000 base.py:500(<dictcomp>)
1147714 0.136 0.000 0.136 0.000 {built-in method builtins.getattr}
280116 0.126 0.000 0.126 0.000 base.py:493(<listcomp>)
280116 0.124 0.000 0.124 0.000 base.py:487(<listcomp>)
526902 0.123 0.000 0.168 0.000 inspect.py:300(ismethod)
82106 0.122 0.000 0.147 0.000 time.py:110(return_mutables)
41125 0.116 0.000 0.646 0.000 function.py:160(__call__)
280116 0.111 0.000 0.111 0.000 base.py:461(get_flex_role_objs)
728139 0.094 0.000 0.094 0.000 {built-in method builtins.hasattr}
40880/16352 0.077 0.000 0.106 0.000 base.py:36(get_var)
4088 0.071 0.000 0.216 0.000 history.py:274(log)
744062 0.070 0.000 0.081 0.000 {built-in method builtins.isinstance}
231036 0.056 0.000 0.080 0.000 base.py:409(return_mutables)
1850 0.053 0.000 0.070 0.000 base.py:250(<listcomp>)
85584 0.051 0.000 0.067 0.000 copy.py:66(copy)
2664 0.049 0.000 0.049 0.000 {built-in method builtins.dir}
82106 0.047 0.000 0.112 0.000 mode.py:284(return_mutables)
63225 0.045 0.000 0.061 0.000 mode.py:458(has_fault)
8258 0.037 0.000 0.177 0.000 ex_pump.py:422(static_behavior)
315 0.028 0.000 0.028 0.000 {method 'acquire' of '_thread.lock' objects}
41125 0.027 0.000 0.120 0.000 function.py:138(prop_arch_behaviors)
363414 0.026 0.000 0.026 0.000 {method 'values' of 'dict' objects}
41125 0.026 0.000 0.116 0.000 function.py:153(prop_arch_faults_up)
332316 0.026 0.000 0.026 0.000 {method 'startswith' of 'str' objects}
16516 0.026 0.000 0.061 0.000 base.py:267(set_field)
17776/16740 0.025 0.000 0.034 0.000 copy.py:128(deepcopy)
231036 0.023 0.000 0.023 0.000 {built-in method recordclass._dataobject.astuple}
8258 0.023 0.000 0.112 0.000 base.py:230(assign)
814 0.021 0.000 0.027 0.000 base.py:381(<listcomp>)
98622 0.018 0.000 0.018 0.000 time.py:111(<genexpr>)
8258 0.017 0.000 0.028 0.000 base.py:169(get_field_dict)
73 0.017 0.000 5.573 0.076 propagate.py:1044(prop_one_scen)
21252 0.015 0.000 0.018 0.000 __init__.py:180(add)
8255 0.015 0.000 0.033 0.000 ex_pump.py:237(static_behavior)
8324 0.014 0.000 0.037 0.000 <frozen _collections_abc>:717(__ior__)
4088 0.014 0.000 5.309 0.001 function.py:747(propagate)
1480 0.014 0.000 0.185 0.000 base.py:260(init_roles)
139356 0.012 0.000 0.012 0.000 {method 'get' of 'dict' objects}
91104 0.010 0.000 0.010 0.000 {method 'copy' of 'set' objects}
8185 0.010 0.000 0.025 0.000 ex_pump.py:269(static_behavior)
4088 0.010 0.000 0.023 0.000 __init__.py:353(union)
8170 0.009 0.000 0.017 0.000 ex_pump.py:316(static_behavior)
814 0.009 0.000 0.026 0.000 inspect.py:2331(_signature_from_function)
63225 0.009 0.000 0.009 0.000 {method 'intersection' of 'set' objects}
63522 0.008 0.000 0.008 0.000 {built-in method builtins.any}
112309/111578 0.007 0.000 0.008 0.000 {built-in method builtins.len}
1776/1187 0.007 0.000 0.019 0.000 result.py:492(flatten)
666 0.007 0.000 0.074 0.000 parameter.py:61(__init__)
1628/814 0.007 0.000 0.042 0.000 inspect.py:2435(_signature_from_callable)
20440 0.007 0.000 0.007 0.000 history.py:53(is_known_mutable)
4088 0.007 0.000 0.224 0.000 base.py:224(log_hist)
22580 0.006 0.000 0.011 0.000 <frozen abc>:117(__instancecheck__)
8258 0.006 0.000 0.008 0.000 base.py:217(<dictcomp>)
8258 0.006 0.000 0.009 0.000 ex_pump.py:389(set_faults)
1628 0.006 0.000 0.008 0.000 inspect.py:2955(__init__)
8398 0.006 0.000 0.043 0.000 __init__.py:65(__init__)
3330 0.006 0.000 0.009 0.000 inspect.py:2669(__init__)
666 0.005 0.000 0.007 0.000 base.py:125(set_arg_type)
8185 0.005 0.000 0.014 0.000 ex_pump.py:295(static_behavior)
666 0.005 0.000 0.007 0.000 parameter.py:135(check_immutable)
1329 0.005 0.000 0.005 0.000 {method 'round' of 'numpy.ndarray' objects}
666 0.005 0.000 0.284 0.000 base.py:127(add_flex_role_obj)
25112 0.004 0.000 0.004 0.000 {method 'split' of 'str' objects}
4088 0.004 0.000 0.005 0.000 function.py:693(set_vars)
22580 0.004 0.000 0.004 0.000 {built-in method _abc._abc_instancecheck}
16352 0.004 0.000 0.006 0.000 __init__.py:304(__iter__)
370 0.004 0.000 0.223 0.001 base.py:391(__init__)
21482 0.004 0.000 0.004 0.000 {method 'update' of 'set' objects}
518 0.004 0.000 0.010 0.000 base.py:88(find_any_phase_overlap)
666 0.004 0.000 0.007 0.000 inspect.py:3215(__str__)
33370 0.004 0.000 0.004 0.000 {method 'join' of 'str' objects}
370 0.004 0.000 0.008 0.000 mode.py:287(init_faultmodes)
8255 0.004 0.000 0.004 0.000 ex_pump.py:220(set_faults)
1110 0.003 0.000 0.028 0.000 base.py:576(create_hist)
15111 0.003 0.000 0.003 0.000 {built-in method builtins.min}
444 0.003 0.000 0.003 0.000 time.py:117(set_timestep)
12264 0.003 0.000 0.004 0.000 __init__.py:74(__len__)
4366 0.003 0.000 0.005 0.000 parameter.py:107(check_lim)
438 0.003 0.000 0.005 0.000 result.py:368(all_with)
962 0.003 0.000 0.007 0.000 base.py:98(get_true_fields)
6377 0.003 0.000 0.004 0.000 result.py:318(items)
8258 0.003 0.000 0.003 0.000 ex_pump.py:413(indicate_over_pressure)
814 0.003 0.000 0.008 0.000 inspect.py:2037(_signature_bound_method)
666 0.003 0.000 0.003 0.000 parameter.py:156(check_type)
20586 0.003 0.000 0.003 0.000 {built-in method builtins.setattr}
4088 0.003 0.000 0.032 0.000 __init__.py:130(copy)
814/740 0.003 0.000 0.210 0.000 base.py:151(__init__)
1184/1110 0.002 0.000 0.188 0.000 base.py:229(init_roletypes)
1329 0.002 0.000 0.011 0.000 base.py:102(get_timerange)
28504 0.002 0.000 0.002 0.000 {method 'append' of 'list' objects}
1850 0.002 0.000 0.106 0.000 base.py:249(find_roletype_initiators)
4088 0.002 0.000 0.002 0.000 ex_pump.py:517(indicate_on)
2587 0.002 0.000 0.002 0.000 common.py:41(get_sub_include)
3251 0.002 0.000 0.002 0.000 result.py:337(__setattr__)
2072 0.002 0.000 0.003 0.000 inspect.py:2756(__str__)
4088 0.002 0.000 0.002 0.000 ex_pump.py:498(indicate_finished)
444 0.002 0.000 0.187 0.000 base.py:193(__init__)
3251 0.002 0.000 0.004 0.000 __init__.py:1111(__init__)
1779 0.002 0.000 0.004 0.000 numerictypes.py:357(issubdtype)
17256 0.002 0.000 0.002 0.000 copy.py:182(_deepcopy_atomic)
16486 0.002 0.000 0.002 0.000 {method 'items' of 'dict' objects}
4088 0.002 0.000 0.002 0.000 base.py:148(get_hist_ind)
518 0.002 0.000 0.066 0.000 base.py:77(__init__)
3330 0.002 0.000 0.003 0.000 enum.py:688(__call__)
19782 0.002 0.000 0.002 0.000 {built-in method builtins.id}
1329 0.002 0.000 0.002 0.000 {built-in method numpy.arange}
4088 0.002 0.000 0.002 0.000 propagate.py:1016(check_end_condition)
17658 0.002 0.000 0.002 0.000 {built-in method builtins.iter}
370 0.002 0.000 0.013 0.000 mode.py:218(__init__)
4599 0.002 0.000 0.002 0.000 __init__.py:1138(__contains__)
73 0.002 0.000 0.013 0.000 ex_pump.py:521(find_classification)
1770 0.002 0.000 0.006 0.000 common.py:87(is_numeric)
119 0.002 0.000 0.002 0.000 socket.py:621(send)
1036 0.002 0.000 0.002 0.000 {method 'sort' of 'numpy.ndarray' objects}
4144 0.002 0.000 0.002 0.000 inspect.py:3002(<genexpr>)
666 0.002 0.000 0.253 0.000 base.py:895(init_obj)
666 0.001 0.000 0.045 0.000 parameter.py:179(check_pickle)
370 0.001 0.000 0.237 0.001 base.py:215(add_sim)
1 0.001 0.001 5.893 5.893 propagate.py:772(scenlist_helper)
584 0.001 0.000 0.007 0.000 result.py:327(__getattr__)
962 0.001 0.000 0.004 0.000 base.py:105(<listcomp>)
3558 0.001 0.000 0.002 0.000 numerictypes.py:283(issubclass_)
370 0.001 0.000 0.239 0.001 function.py:534(add_fxn)
73 0.001 0.000 0.001 0.000 {method 'reduce' of 'numpy.ufunc' objects}
814 0.001 0.000 0.002 0.000 inspect.py:167(get_annotations)
864 0.001 0.000 0.002 0.000 function.py:829(<listcomp>)
814 0.001 0.000 0.044 0.000 base.py:379(init_indicators)
1036 0.001 0.000 0.005 0.000 fromnumeric.py:865(sort)
8258 0.001 0.000 0.001 0.000 {method 'clear' of 'set' objects}
4366 0.001 0.000 0.001 0.000 base.py:154(set_arg_as_type)
1776 0.001 0.000 0.001 0.000 result.py:157(check_include_errors)
814 0.001 0.000 0.001 0.000 base.py:204(init_track)
148 0.001 0.000 0.024 0.000 parameter.py:175(copy_with_vals)
1036 0.001 0.000 0.001 0.000 {method 'copy' of 'numpy.ndarray' objects}
814 0.001 0.000 0.001 0.000 inspect.py:735(unwrap)
38 0.001 0.000 0.002 0.000 std.py:464(format_meter)
1329 0.001 0.000 0.007 0.000 fromnumeric.py:3269(round)
73 0.001 0.000 0.016 0.000 propagate.py:1144(get_result)
3531 0.001 0.000 0.001 0.000 __init__.py:1128(__setitem__)
444 0.001 0.000 0.008 0.000 time.py:92(__init__)
1329 0.001 0.000 0.006 0.000 fromnumeric.py:53(_wrapfunc)
8258 0.001 0.000 0.001 0.000 {method 'copy' of 'list' objects}
1183 0.001 0.000 0.011 0.000 base.py:117(get_histrange)
1770 0.001 0.000 0.001 0.000 {built-in method numpy.array}
370 0.001 0.000 0.224 0.001 function.py:76(__init__)
814 0.001 0.000 0.043 0.000 inspect.py:3007(from_callable)
1036 0.001 0.000 0.001 0.000 {built-in method numpy.asanyarray}
74 0.001 0.000 0.001 0.000 graph.py:968(add_edges_from)
8176 0.001 0.000 0.001 0.000 {method 'index' of 'list' objects}
296 0.001 0.000 0.002 0.000 history.py:204(init_att)
814 0.001 0.000 0.005 0.000 inspect.py:3023(replace)
8288 0.001 0.000 0.001 0.000 inspect.py:2734(kind)
2357 0.001 0.000 0.001 0.000 __init__.py:1118(__len__)
7187 0.001 0.000 0.001 0.000 {built-in method builtins.issubclass}
444 0.001 0.000 0.015 0.000 base.py:210(init_hist)
370 0.001 0.000 0.002 0.000 base.py:468(check_flows)
3330 0.001 0.000 0.001 0.000 enum.py:1095(__new__)
814 0.001 0.000 0.044 0.000 inspect.py:3261(signature)
1850 0.001 0.000 0.001 0.000 base.py:51(check_role)
372/150 0.001 0.000 0.004 0.000 copy.py:227(_deepcopy_dict)
184 0.001 0.000 0.002 0.000 {built-in method builtins.sum}
1482 0.001 0.000 0.001 0.000 {method 'format' of 'str' objects}
74 0.001 0.000 0.337 0.005 base.py:84(__init__)
370 0.001 0.000 0.001 0.000 function.py:97(return_faultmodes)
222 0.001 0.000 0.002 0.000 base.py:413(init_indicator_hist)
74 0.001 0.000 0.001 0.000 history.py:340(cut)
148 0.001 0.000 0.001 0.000 graph.py:566(add_nodes_from)
370 0.001 0.000 0.023 0.000 base.py:426(create_arch_kwargs)
5846 0.001 0.000 0.001 0.000 inspect.py:2722(name)
74 0.001 0.000 0.290 0.004 ex_pump.py:470(init_architecture)
518 0.001 0.000 0.001 0.000 base.py:93(<listcomp>)
74 0.001 0.000 0.030 0.000 base.py:262(new_params)
2571 0.001 0.000 0.001 0.000 utils.py:375(<genexpr>)
74 0.001 0.000 0.013 0.000 function.py:588(build)
1160 0.001 0.000 0.001 0.000 graph.py:1318(neighbors)
74 0.001 0.000 0.005 0.000 function.py:600(construct_graph)
518 0.001 0.000 0.001 0.000 {built-in method recordclass._dataobject.asdict}
518 0.001 0.000 0.001 0.000 base.py:90(<dictcomp>)
370 0.001 0.000 0.002 0.000 function.py:121(update_seed)
4381 0.001 0.000 0.001 0.000 {method 'keys' of 'dict' objects}
370 0.001 0.000 0.001 0.000 base.py:488(<listcomp>)
4088 0.001 0.000 0.001 0.000 {built-in method from_iterable}
73 0.001 0.000 0.004 0.000 function.py:612(calc_repaircost)
296 0.000 0.000 0.051 0.000 base.py:175(add_flow)
1184 0.000 0.000 0.001 0.000 base.py:198(check_slots)
1628 0.000 0.000 0.001 0.000 inspect.py:378(isfunction)
584 0.000 0.000 0.000 0.000 result.py:138(get_dict_attr)
520 0.000 0.000 0.001 0.000 copy.py:243(_keep_alive)
148 0.000 0.000 0.002 0.000 base.py:361(create_hist)
36 0.000 0.000 0.036 0.001 std.py:1198(update)
2320 0.000 0.000 0.000 0.000 __init__.py:165(__contains__)
74 0.000 0.000 0.001 0.000 function.py:596(<listcomp>)
146 0.000 0.000 0.001 0.000 <frozen _collections_abc>:941(update)
74 0.000 0.000 0.001 0.000 function.py:639(return_faultmodes)
72 0.000 0.000 5.495 0.076 propagate.py:821(exec_scen)
3330 0.000 0.000 0.000 0.000 {method '__contains__' of 'frozenset' objects}
74 0.000 0.000 0.005 0.000 base.py:245(build)
73 0.000 0.000 0.002 0.000 fromnumeric.py:71(_wrapreduction)
370 0.000 0.000 0.000 0.000 base.py:406(<dictcomp>)
119 0.000 0.000 0.002 0.000 iostream.py:258(schedule)
1776 0.000 0.000 0.000 0.000 result.py:165(check_include_error)
3330 0.000 0.000 0.000 0.000 {method 'isidentifier' of 'str' objects}
74 0.000 0.000 0.368 0.005 base.py:296(new)
74 0.000 0.000 0.338 0.005 function.py:506(__init__)
40 0.000 0.000 0.030 0.001 iostream.py:561(flush)
296 0.000 0.000 0.017 0.000 base.py:92(create_hist)
296 0.000 0.000 0.000 0.000 function.py:597(<listcomp>)
518 0.000 0.000 0.000 0.000 base.py:92(<listcomp>)
370 0.000 0.000 0.001 0.000 base.py:445(update_contained_modes)
740 0.000 0.000 0.000 0.000 reportviews.py:529(__iter__)
370 0.000 0.000 0.001 0.000 base.py:267(get_flows)
217 0.000 0.000 0.000 0.000 std.py:231(__call__)
148 0.000 0.000 0.001 0.000 base.py:348(init_hist_att)
370 0.000 0.000 0.001 0.000 __init__.py:201(update)
40 0.000 0.000 0.029 0.001 threading.py:611(wait)
370 0.000 0.000 0.000 0.000 base.py:433(<dictcomp>)
74 0.000 0.000 0.001 0.000 functools.py:981(__get__)
74 0.000 0.000 0.001 0.000 {method '__reduce_ex__' of 'object' objects}
444 0.000 0.000 0.000 0.000 base.py:206(<dictcomp>)
1480 0.000 0.000 0.000 0.000 {method 'values' of 'mappingproxy' objects}
40 0.000 0.000 0.002 0.000 iostream.py:624(write)
656 0.000 0.000 0.000 0.000 __init__.py:1121(__getitem__)
75 0.000 0.000 0.000 0.000 std.py:400(format_interval)
74 0.000 0.000 0.000 0.000 graph.py:332(__init__)
73 0.000 0.000 0.037 0.001 std.py:1160(__iter__)
74 0.000 0.000 0.001 0.000 isolate.py:42(isolates)
370 0.000 0.000 0.000 0.000 base.py:271(<dictcomp>)
74 0.000 0.000 0.001 0.000 function.py:591(<listcomp>)
74 0.000 0.000 0.001 0.000 copy.py:259(_reconstruct)
148 0.000 0.000 0.000 0.000 base.py:260(<dictcomp>)
370 0.000 0.000 0.000 0.000 base.py:483(<listcomp>)
1329 0.000 0.000 0.000 0.000 fromnumeric.py:3265(_round_dispatcher)
666 0.000 0.000 0.000 0.000 base.py:253(get_full_name)
79 0.000 0.000 0.000 0.000 {built-in method _thread.allocate_lock}
39 0.000 0.000 0.028 0.001 threading.py:295(wait)
148 0.000 0.000 0.001 0.000 state.py:345(init_hist_att)
74 0.000 0.000 0.001 0.000 function.py:593(<listcomp>)
518 0.000 0.000 0.001 0.000 base.py:413(asdict)
78 0.000 0.000 0.032 0.000 utils.py:194(inner)
666 0.000 0.000 0.000 0.000 inspect.py:292(isclass)
40 0.000 0.000 0.000 0.000 threading.py:243(__init__)
73 0.000 0.000 0.002 0.000 fromnumeric.py:2836(min)
76 0.000 0.000 0.000 0.000 utils.py:273(_is_ascii)
296 0.000 0.000 0.000 0.000 {built-in method numpy.empty}
159 0.000 0.000 0.000 0.000 threading.py:1192(is_alive)
2533 0.000 0.000 0.000 0.000 {built-in method unicodedata.east_asian_width}
2442 0.000 0.000 0.000 0.000 {built-in method builtins.callable}
74 0.000 0.000 0.001 0.000 isolate.py:85(<genexpr>)
74 0.000 0.000 0.000 0.000 copyreg.py:113(_slotnames)
38 0.000 0.000 0.000 0.000 std.py:1446(format_dict)
1963 0.000 0.000 0.000 0.000 {method 'update' of 'dict' objects}
1628 0.000 0.000 0.000 0.000 inspect.py:3015(parameters)
370 0.000 0.000 0.000 0.000 base.py:502(is_static)
511 0.000 0.000 0.000 0.000 propagate.py:120(<genexpr>)
370 0.000 0.000 0.000 0.000 base.py:508(is_dynamic)
74 0.000 0.000 0.001 0.000 <class 'networkx.utils.decorators.argmap'> compilation 4:1(argmap_isolates_1)
38 0.000 0.000 0.003 0.000 std.py:1150(__str__)
1776 0.000 0.000 0.000 0.000 copy.py:107(_copy_immutable)
37 0.000 0.000 0.036 0.001 std.py:1325(refresh)
293 0.000 0.000 0.000 0.000 result.py:315(keys)
1036 0.000 0.000 0.000 0.000 fromnumeric.py:861(_sort_dispatcher)
38 0.000 0.000 0.036 0.001 std.py:1464(display)
41 0.000 0.000 0.000 0.000 {method 'acquire' of '_multiprocessing.SemLock' objects}
74 0.000 0.000 0.000 0.000 reportviews.py:419(__init__)
74 0.000 0.000 0.000 0.000 base.py:106(init_flexible_roles)
73 0.000 0.000 0.001 0.000 base.py:128(get_shift)
222 0.000 0.000 0.000 0.000 base.py:597(<listcomp>)
73 0.000 0.000 0.000 0.000 function.py:634(<listcomp>)
517 0.000 0.000 0.000 0.000 {built-in method fromkeys}
148 0.000 0.000 0.000 0.000 base.py:69(get_track)
408 0.000 0.000 0.000 0.000 {built-in method builtins.max}
38 0.000 0.000 0.033 0.001 std.py:457(print_status)
74 0.000 0.000 0.001 0.000 backends.py:627(__call__)
74 0.000 0.000 0.000 0.000 propagate.py:240(save_helper)
74 0.000 0.000 0.000 0.000 graph.py:1484(degree)
41 0.000 0.000 0.000 0.000 std.py:102(acquire)
38 0.000 0.000 0.000 0.000 std.py:186(__format__)
74 0.000 0.000 0.004 0.000 timer.py:61(__init__)
73 0.000 0.000 0.001 0.000 base.py:218(init_time_hist)
592 0.000 0.000 0.000 0.000 base.py:65(check_role)
195 0.000 0.000 0.000 0.000 time.py:104(__getattr__)
41 0.000 0.000 0.000 0.000 std.py:106(release)
38 0.000 0.000 0.032 0.001 std.py:451(fp_write)
159 0.000 0.000 0.000 0.000 threading.py:1125(_wait_for_tstate_lock)
40 0.000 0.000 0.002 0.000 iostream.py:546(_schedule_flush)
74 0.000 0.000 0.000 0.000 copy.py:201(_deepcopy_list)
814 0.000 0.000 0.000 0.000 {built-in method sys.getrecursionlimit}
370 0.000 0.000 0.000 0.000 function.py:109(<listcomp>)
1332 0.000 0.000 0.000 0.000 {method 'copy' of 'dict' objects}
222 0.000 0.000 0.000 0.000 misc.py:595(_clear_cache)
74 0.000 0.000 0.000 0.000 base.py:393(<dictcomp>)
74 0.000 0.000 0.000 0.000 graph.py:59(__set__)
146 0.000 0.000 0.000 0.000 __init__.py:1134(__iter__)
666 0.000 0.000 0.000 0.000 inspect.py:3019(return_annotation)
119 0.000 0.000 0.000 0.000 iostream.py:137(_event_pipe)
40 0.000 0.000 0.000 0.000 threading.py:562(__init__)
1 0.000 0.000 5.988 5.988 <string>:1(<module>)
90 0.000 0.000 0.000 0.000 mode.py:498(add_fault)
740 0.000 0.000 0.000 0.000 {built-in method builtins.repr}
74 0.000 0.000 0.000 0.000 base.py:384(get_indicators)
73 0.000 0.000 0.000 0.000 propagate.py:118(unpack_sim_kwargs)
73 0.000 0.000 0.000 0.000 fromnumeric.py:72(<dictcomp>)
38 0.000 0.000 0.000 0.000 std.py:153(__init__)
37 0.000 0.000 0.000 0.000 {built-in method now}
292 0.000 0.000 0.000 0.000 {method 'endswith' of 'str' objects}
72 0.000 0.000 0.000 0.000 mode.py:411(update_modestates)
38 0.000 0.000 0.001 0.000 utils.py:378(disp_len)
370 0.000 0.000 0.000 0.000 base.py:230(update_seed)
144 0.000 0.000 0.000 0.000 scenario.py:48(get)
38 0.000 0.000 0.000 0.000 {method 'sub' of 're.Pattern' objects}
60 0.000 0.000 0.000 0.000 timer.py:83(inc)
41 0.000 0.000 0.000 0.000 {method 'release' of '_multiprocessing.SemLock' objects}
40 0.000 0.000 0.000 0.000 iostream.py:519(_is_master_process)
370 0.000 0.000 0.000 0.000 base.py:422(init_block)
1 0.000 0.000 5.988 5.988 propagate.py:583(fault_sample)
148 0.000 0.000 0.001 0.000 copy.py:264(<genexpr>)
74 0.000 0.000 0.001 0.000 function.py:608(<listcomp>)
73 0.000 0.000 0.000 0.000 propagate.py:1160(<listcomp>)
40 0.000 0.000 0.000 0.000 threading.py:1453(current_thread)
444 0.000 0.000 0.000 0.000 inspect.py:2726(default)
39 0.000 0.000 0.000 0.000 threading.py:283(_acquire_restore)
38 0.000 0.000 0.001 0.000 utils.py:374(_text_width)
74 0.000 0.000 0.000 0.000 base.py:282(update_seed)
1 0.000 0.000 5.988 5.988 {built-in method builtins.exec}
798 0.000 0.000 0.000 0.000 {built-in method builtins.ord}
188 0.000 0.000 0.000 0.000 {built-in method builtins.divmod}
40 0.000 0.000 0.000 0.000 threading.py:274(__exit__)
160 0.000 0.000 0.000 0.000 threading.py:575(is_set)
74 0.000 0.000 0.000 0.000 graph.py:37(__set__)
77 0.000 0.000 0.000 0.000 {method 'pop' of 'dict' objects}
74 0.000 0.000 0.000 0.000 {method 'get' of 'mappingproxy' objects}
80 0.000 0.000 0.000 0.000 threading.py:1168(ident)
1 0.000 0.000 0.002 0.002 std.py:952(__init__)
147 0.000 0.000 0.000 0.000 {built-in method time.time}
74 0.000 0.000 0.000 0.000 reportviews.py:426(__call__)
73 0.000 0.000 0.000 0.000 propagate.py:1183(<listcomp>)
1 0.000 0.000 0.000 0.000 __init__.py:48(create_string_buffer)
1 0.000 0.000 0.000 0.000 utils.py:297(_screen_shape_windows)
40 0.000 0.000 0.000 0.000 {built-in method nt.getpid}
38 0.000 0.000 0.000 0.000 utils.py:108(__init__)
41 0.000 0.000 0.000 0.000 {method 'acquire' of '_thread.RLock' objects}
158 0.000 0.000 0.000 0.000 {method 'append' of 'collections.deque' objects}
114 0.000 0.000 0.000 0.000 {method '__exit__' of '_thread.RLock' objects}
40 0.000 0.000 0.000 0.000 {method 'write' of '_io.StringIO' objects}
39 0.000 0.000 0.000 0.000 threading.py:286(_is_owned)
40 0.000 0.000 0.000 0.000 threading.py:271(__enter__)
74 0.000 0.000 0.000 0.000 parameter.py:104(keys)
39 0.000 0.000 0.000 0.000 threading.py:280(_release_save)
38 0.000 0.000 0.000 0.000 utils.py:112(__format__)
38 0.000 0.000 0.000 0.000 std.py:167(colour)
1 0.000 0.000 0.089 0.089 propagate.py:496(nom_helper)
40 0.000 0.000 0.000 0.000 {built-in method builtins.abs}
73 0.000 0.000 0.000 0.000 fromnumeric.py:2831(_min_dispatcher)
40 0.000 0.000 0.000 0.000 {built-in method _thread.get_ident}
2 0.000 0.000 0.001 0.001 std.py:1265(close)
1 0.000 0.000 0.000 0.000 result.py:550(get_memory)
1 0.000 0.000 0.001 0.001 std.py:438(status_printer)
1 0.000 0.000 0.000 0.000 std.py:686(_decr_instances)
38 0.000 0.000 0.000 0.000 std.py:163(colour)
1 0.000 0.000 0.000 0.000 std.py:663(__new__)
41 0.000 0.000 0.000 0.000 {method 'release' of '_thread.RLock' objects}
3 0.000 0.000 0.000 0.000 _weakrefset.py:63(__iter__)
1 0.000 0.000 0.000 0.000 propagate.py:701(process_nominal)
40 0.000 0.000 0.000 0.000 {method '__enter__' of '_thread.lock' objects}
40 0.000 0.000 0.000 0.000 {method '__exit__' of '_thread.lock' objects}
1 0.000 0.000 0.000 0.000 propagate.py:168(<dictcomp>)
2 0.000 0.000 0.000 0.000 _weakrefset.py:53(_commit_removals)
39 0.000 0.000 0.000 0.000 {method 'release' of '_thread.lock' objects}
1 0.000 0.000 0.000 0.000 std.py:679(_get_free_pos)
2 0.000 0.000 0.000 0.000 std.py:1286(fp_write)
1 0.000 0.000 0.000 0.000 utils.py:213(__init__)
2 0.000 0.000 0.000 0.000 _weakrefset.py:27(__exit__)
1 0.000 0.000 0.000 0.000 propagate.py:166(pack_run_kwargs)
4 0.000 0.000 0.000 0.000 std.py:110(__enter__)
3 0.000 0.000 0.000 0.000 {method 'remove' of 'set' objects}
1 0.000 0.000 0.000 0.000 functools.py:393(__get__)
1 0.000 0.000 0.000 0.000 {built-in method fromtimestamp}
4 0.000 0.000 0.000 0.000 std.py:113(__exit__)
1 0.000 0.000 0.000 0.000 _weakrefset.py:85(add)
1 0.000 0.000 0.000 0.000 sample.py:804(times)
1 0.000 0.000 0.000 0.000 _weakrefset.py:110(remove)
2 0.000 0.000 0.000 0.000 _weakrefset.py:21(__enter__)
5 0.000 0.000 0.000 0.000 propagate.py:201(<genexpr>)
2 0.000 0.000 0.000 0.000 utils.py:187(disable_on_exception)
1 0.000 0.000 0.000 0.000 utils.py:266(_supports_unicode)
1 0.000 0.000 0.000 0.000 scenario.py:137(__init__)
1 0.000 0.000 0.000 0.000 utils.py:125(__eq__)
1 0.000 0.000 0.000 0.000 <frozen importlib._bootstrap>:1207(_handle_fromlist)
1 0.000 0.000 0.000 0.000 sample.py:808(scenarios)
4 0.000 0.000 0.000 0.000 utils.py:222(__eq__)
3 0.000 0.000 0.000 0.000 utils.py:152(wrapper_setattr)
3 0.000 0.000 0.000 0.000 std.py:226(__init__)
2 0.000 0.000 0.000 0.000 std.py:1153(_comparable)
2 0.000 0.000 0.000 0.000 _weakrefset.py:17(__init__)
1 0.000 0.000 0.000 0.000 {method 'encode' of 'str' objects}
1 0.000 0.000 0.000 0.000 _monitor.py:94(report)
3 0.000 0.000 0.000 0.000 {method 'add' of 'set' objects}
1 0.000 0.000 0.000 0.000 utils.py:252(_is_utf)
1 0.000 0.000 0.000 0.000 std.py:682(<setcomp>)
1 0.000 0.000 0.000 0.000 propagate.py:872(check_overwrite)
2 0.000 0.000 0.000 0.000 {method 'pop' of 'list' objects}
1 0.000 0.000 0.000 0.000 propagate.py:199(unpack_mult_kwargs)
1 0.000 0.000 0.000 0.000 utils.py:156(__init__)
2 0.000 0.000 0.000 0.000 std.py:1157(__hash__)
1 0.000 0.000 0.000 0.000 std.py:1147(__del__)
1 0.000 0.000 0.000 0.000 propagate.py:808(close_pool)
1 0.000 0.000 0.000 0.000 utils.py:282(_screen_shape_wrapper)
2 0.000 0.000 0.000 0.000 {built-in method _weakref.proxy}
1 0.000 0.000 0.000 0.000 utils.py:139(__getattr__)
1 0.000 0.000 0.000 0.000 std.py:760(get_lock)
1 0.000 0.000 0.000 0.000 {method 'difference' of 'set' objects}
1 0.000 0.000 0.000 0.000 {built-in method __new__ of type object at 0x00007FFAEE30C4C0}
1 0.000 0.000 0.000 0.000 {method 'disable' of '_lsprof.Profiler' objects}
1 0.000 0.000 0.000 0.000 {built-in method sys.audit}
1 0.000 0.000 0.000 0.000 std.py:1301(<lambda>)
1 0.000 0.000 0.000 0.000 scenario.py:139(<dictcomp>)
[38]:
prof = cProfile.run('propagate.fault_sample(mdl, fs)', sort='cumtime')
SCENARIOS COMPLETE: 100%|██████████| 72/72 [00:05<00:00, 12.27it/s]
9994012 function calls (9702636 primitive calls) in 5.956 seconds
Ordered by: cumulative time
ncalls tottime percall cumtime percall filename:lineno(function)
1 0.000 0.000 5.956 5.956 {built-in method builtins.exec}
1 0.000 0.000 5.956 5.956 <string>:1(<module>)
1 0.000 0.000 5.956 5.956 propagate.py:583(fault_sample)
1 0.001 0.001 5.864 5.864 propagate.py:772(scenlist_helper)
73 0.017 0.000 5.553 0.076 propagate.py:1044(prop_one_scen)
72 0.000 0.000 5.476 0.076 propagate.py:821(exec_scen)
4088 0.014 0.000 5.294 0.001 function.py:747(propagate)
4088 0.201 0.000 5.250 0.001 function.py:784(prop_static)
280116/148462 0.257 0.000 4.367 0.000 base.py:621(return_mutables)
280116 0.323 0.000 3.359 0.000 base.py:616(find_mutables)
280116 1.022 0.000 2.591 0.000 base.py:482(get_roles_as_dict)
280116/148462 0.360 0.000 2.198 0.000 base.py:632(<listcomp>)
363550 0.369 0.000 1.087 0.000 base.py:454(get_roles)
41125 0.114 0.000 0.639 0.000 function.py:160(__call__)
363550 0.498 0.000 0.579 0.000 base.py:457(<listcomp>)
280116 0.258 0.000 0.425 0.000 base.py:618(<listcomp>)
74 0.000 0.000 0.360 0.005 base.py:296(new)
74 0.000 0.000 0.332 0.004 function.py:506(__init__)
74 0.001 0.000 0.332 0.004 base.py:84(__init__)
74 0.001 0.000 0.285 0.004 ex_pump.py:470(init_architecture)
666 0.005 0.000 0.280 0.000 base.py:127(add_flex_role_obj)
666 0.001 0.000 0.249 0.000 base.py:895(init_obj)
643666 0.237 0.000 0.237 0.000 base.py:445(get_default_roletypes)
370 0.001 0.000 0.235 0.001 function.py:534(add_fxn)
370 0.001 0.000 0.233 0.001 base.py:215(add_sim)
370 0.001 0.000 0.220 0.001 function.py:76(__init__)
4088 0.006 0.000 0.220 0.000 base.py:224(log_hist)
370 0.004 0.000 0.219 0.001 base.py:391(__init__)
4088 0.069 0.000 0.211 0.000 history.py:274(log)
280116 0.168 0.000 0.210 0.000 base.py:500(<dictcomp>)
814/740 0.003 0.000 0.207 0.000 base.py:151(__init__)
1184/1110 0.002 0.000 0.184 0.000 base.py:229(init_roletypes)
444 0.002 0.000 0.184 0.000 base.py:193(__init__)
1480 0.013 0.000 0.182 0.000 base.py:260(init_roles)
8258 0.037 0.000 0.174 0.000 ex_pump.py:422(static_behavior)
526902 0.123 0.000 0.167 0.000 inspect.py:300(ismethod)
82106 0.121 0.000 0.146 0.000 time.py:110(return_mutables)
1147714 0.135 0.000 0.135 0.000 {built-in method builtins.getattr}
280116 0.125 0.000 0.125 0.000 base.py:493(<listcomp>)
280116 0.124 0.000 0.124 0.000 base.py:487(<listcomp>)
41125 0.027 0.000 0.119 0.000 function.py:138(prop_arch_behaviors)
41125 0.025 0.000 0.116 0.000 function.py:153(prop_arch_faults_up)
82106 0.046 0.000 0.111 0.000 mode.py:284(return_mutables)
280116 0.111 0.000 0.111 0.000 base.py:461(get_flex_role_objs)
8258 0.023 0.000 0.111 0.000 base.py:230(assign)
1850 0.002 0.000 0.104 0.000 base.py:249(find_roletype_initiators)
40880/16352 0.075 0.000 0.103 0.000 base.py:36(get_var)
728139 0.093 0.000 0.093 0.000 {built-in method builtins.hasattr}
1 0.000 0.000 0.087 0.087 propagate.py:496(nom_helper)
744062 0.069 0.000 0.080 0.000 {built-in method builtins.isinstance}
231036 0.055 0.000 0.079 0.000 base.py:409(return_mutables)
666 0.007 0.000 0.072 0.000 parameter.py:61(__init__)
1850 0.053 0.000 0.069 0.000 base.py:250(<listcomp>)
85584 0.050 0.000 0.067 0.000 copy.py:66(copy)
518 0.002 0.000 0.065 0.000 base.py:77(__init__)
63225 0.045 0.000 0.060 0.000 mode.py:458(has_fault)
16516 0.025 0.000 0.060 0.000 base.py:267(set_field)
296 0.000 0.000 0.050 0.000 base.py:175(add_flow)
2664 0.048 0.000 0.048 0.000 {built-in method builtins.dir}
814 0.001 0.000 0.044 0.000 base.py:379(init_indicators)
666 0.001 0.000 0.044 0.000 parameter.py:179(check_pickle)
814 0.001 0.000 0.042 0.000 inspect.py:3261(signature)
8398 0.006 0.000 0.042 0.000 __init__.py:65(__init__)
814 0.001 0.000 0.042 0.000 inspect.py:3007(from_callable)
1628/814 0.006 0.000 0.041 0.000 inspect.py:2435(_signature_from_callable)
8324 0.014 0.000 0.036 0.000 <frozen _collections_abc>:717(__ior__)
73 0.000 0.000 0.034 0.000 std.py:1160(__iter__)
17776/16740 0.024 0.000 0.033 0.000 copy.py:128(deepcopy)
8255 0.015 0.000 0.033 0.000 ex_pump.py:237(static_behavior)
38 0.000 0.000 0.032 0.001 std.py:1464(display)
37 0.000 0.000 0.032 0.001 std.py:1325(refresh)
36 0.000 0.000 0.032 0.001 std.py:1198(update)
4088 0.003 0.000 0.032 0.000 __init__.py:130(copy)
38 0.000 0.000 0.029 0.001 std.py:457(print_status)
78 0.000 0.000 0.029 0.000 utils.py:194(inner)
38 0.000 0.000 0.028 0.001 std.py:451(fp_write)
74 0.001 0.000 0.028 0.000 base.py:262(new_params)
1110 0.003 0.000 0.027 0.000 base.py:576(create_hist)
8258 0.017 0.000 0.027 0.000 base.py:169(get_field_dict)
814 0.020 0.000 0.027 0.000 base.py:381(<listcomp>)
40 0.000 0.000 0.027 0.001 iostream.py:561(flush)
363414 0.027 0.000 0.027 0.000 {method 'values' of 'dict' objects}
40 0.000 0.000 0.025 0.001 threading.py:611(wait)
332316 0.025 0.000 0.025 0.000 {method 'startswith' of 'str' objects}
814 0.009 0.000 0.025 0.000 inspect.py:2331(_signature_from_function)
40 0.000 0.000 0.025 0.001 threading.py:295(wait)
319 0.025 0.000 0.025 0.000 {method 'acquire' of '_thread.lock' objects}
8185 0.009 0.000 0.024 0.000 ex_pump.py:269(static_behavior)
231036 0.023 0.000 0.023 0.000 {built-in method recordclass._dataobject.astuple}
148 0.001 0.000 0.023 0.000 parameter.py:175(copy_with_vals)
4088 0.009 0.000 0.023 0.000 __init__.py:353(union)
370 0.001 0.000 0.022 0.000 base.py:426(create_arch_kwargs)
98622 0.018 0.000 0.018 0.000 time.py:111(<genexpr>)
1776/1187 0.006 0.000 0.018 0.000 result.py:492(flatten)
21252 0.015 0.000 0.018 0.000 __init__.py:180(add)
8170 0.009 0.000 0.017 0.000 ex_pump.py:316(static_behavior)
296 0.000 0.000 0.016 0.000 base.py:92(create_hist)
73 0.001 0.000 0.015 0.000 propagate.py:1144(get_result)
444 0.001 0.000 0.015 0.000 base.py:210(init_hist)
8185 0.005 0.000 0.013 0.000 ex_pump.py:295(static_behavior)
73 0.002 0.000 0.013 0.000 ex_pump.py:521(find_classification)
74 0.001 0.000 0.012 0.000 function.py:588(build)
370 0.002 0.000 0.012 0.000 mode.py:218(__init__)
139356 0.012 0.000 0.012 0.000 {method 'get' of 'dict' objects}
1329 0.002 0.000 0.011 0.000 base.py:102(get_timerange)
1183 0.001 0.000 0.011 0.000 base.py:117(get_histrange)
22580 0.006 0.000 0.011 0.000 <frozen abc>:117(__instancecheck__)
91104 0.010 0.000 0.010 0.000 {method 'copy' of 'set' objects}
518 0.004 0.000 0.010 0.000 base.py:88(find_any_phase_overlap)
3330 0.006 0.000 0.009 0.000 inspect.py:2669(__init__)
8258 0.006 0.000 0.009 0.000 ex_pump.py:389(set_faults)
63225 0.009 0.000 0.009 0.000 {method 'intersection' of 'set' objects}
1628 0.006 0.000 0.008 0.000 inspect.py:2955(__init__)
370 0.004 0.000 0.008 0.000 mode.py:287(init_faultmodes)
444 0.001 0.000 0.008 0.000 time.py:92(__init__)
814 0.002 0.000 0.008 0.000 inspect.py:2037(_signature_bound_method)
8258 0.006 0.000 0.008 0.000 base.py:217(<dictcomp>)
112309/111578 0.007 0.000 0.007 0.000 {built-in method builtins.len}
666 0.004 0.000 0.007 0.000 inspect.py:3215(__str__)
63522 0.007 0.000 0.007 0.000 {built-in method builtins.any}
962 0.003 0.000 0.007 0.000 base.py:98(get_true_fields)
584 0.001 0.000 0.007 0.000 result.py:327(__getattr__)
666 0.005 0.000 0.007 0.000 base.py:125(set_arg_type)
1329 0.001 0.000 0.007 0.000 fromnumeric.py:3269(round)
20440 0.007 0.000 0.007 0.000 history.py:53(is_known_mutable)
666 0.005 0.000 0.007 0.000 parameter.py:135(check_immutable)
1770 0.002 0.000 0.006 0.000 common.py:87(is_numeric)
1329 0.001 0.000 0.006 0.000 fromnumeric.py:53(_wrapfunc)
16352 0.004 0.000 0.006 0.000 __init__.py:304(__iter__)
438 0.003 0.000 0.005 0.000 result.py:368(all_with)
814 0.001 0.000 0.005 0.000 inspect.py:3023(replace)
1036 0.001 0.000 0.005 0.000 fromnumeric.py:865(sort)
4088 0.004 0.000 0.005 0.000 function.py:693(set_vars)
74 0.001 0.000 0.005 0.000 function.py:600(construct_graph)
4366 0.003 0.000 0.005 0.000 parameter.py:107(check_lim)
1329 0.005 0.000 0.005 0.000 {method 'round' of 'numpy.ndarray' objects}
74 0.000 0.000 0.005 0.000 base.py:245(build)
25112 0.004 0.000 0.004 0.000 {method 'split' of 'str' objects}
3251 0.002 0.000 0.004 0.000 __init__.py:1111(__init__)
22580 0.004 0.000 0.004 0.000 {built-in method _abc._abc_instancecheck}
962 0.001 0.000 0.004 0.000 base.py:105(<listcomp>)
74 0.000 0.000 0.004 0.000 timer.py:61(__init__)
21482 0.004 0.000 0.004 0.000 {method 'update' of 'set' objects}
372/150 0.001 0.000 0.004 0.000 copy.py:227(_deepcopy_dict)
73 0.000 0.000 0.004 0.000 function.py:612(calc_repaircost)
1779 0.002 0.000 0.004 0.000 numerictypes.py:357(issubdtype)
33370 0.004 0.000 0.004 0.000 {method 'join' of 'str' objects}
12264 0.003 0.000 0.004 0.000 __init__.py:74(__len__)
8255 0.003 0.000 0.003 0.000 ex_pump.py:220(set_faults)
6377 0.003 0.000 0.003 0.000 result.py:318(items)
15111 0.003 0.000 0.003 0.000 {built-in method builtins.min}
666 0.003 0.000 0.003 0.000 parameter.py:156(check_type)
444 0.003 0.000 0.003 0.000 time.py:117(set_timestep)
8258 0.003 0.000 0.003 0.000 ex_pump.py:413(indicate_over_pressure)
20586 0.003 0.000 0.003 0.000 {built-in method builtins.setattr}
38 0.000 0.000 0.003 0.000 std.py:1150(__str__)
3330 0.002 0.000 0.003 0.000 enum.py:688(__call__)
40 0.000 0.000 0.002 0.000 iostream.py:624(write)
2072 0.002 0.000 0.002 0.000 inspect.py:2756(__str__)
119 0.000 0.000 0.002 0.000 iostream.py:258(schedule)
28504 0.002 0.000 0.002 0.000 {method 'append' of 'list' objects}
222 0.001 0.000 0.002 0.000 base.py:413(init_indicator_hist)
2587 0.002 0.000 0.002 0.000 common.py:41(get_sub_include)
4144 0.002 0.000 0.002 0.000 inspect.py:3002(<genexpr>)
1329 0.002 0.000 0.002 0.000 {built-in method numpy.arange}
40 0.000 0.000 0.002 0.000 iostream.py:546(_schedule_flush)
38 0.001 0.000 0.002 0.000 std.py:464(format_meter)
1 0.000 0.000 0.002 0.002 std.py:952(__init__)
4088 0.002 0.000 0.002 0.000 ex_pump.py:517(indicate_on)
17256 0.002 0.000 0.002 0.000 copy.py:182(_deepcopy_atomic)
3251 0.002 0.000 0.002 0.000 result.py:337(__setattr__)
148 0.000 0.000 0.002 0.000 base.py:361(create_hist)
4088 0.002 0.000 0.002 0.000 ex_pump.py:498(indicate_finished)
73 0.000 0.000 0.002 0.000 fromnumeric.py:2836(min)
3558 0.001 0.000 0.002 0.000 numerictypes.py:283(issubclass_)
4088 0.002 0.000 0.002 0.000 base.py:148(get_hist_ind)
19782 0.002 0.000 0.002 0.000 {built-in method builtins.id}
119 0.002 0.000 0.002 0.000 socket.py:621(send)
4088 0.002 0.000 0.002 0.000 propagate.py:1016(check_end_condition)
16486 0.002 0.000 0.002 0.000 {method 'items' of 'dict' objects}
1036 0.002 0.000 0.002 0.000 {method 'sort' of 'numpy.ndarray' objects}
814 0.001 0.000 0.002 0.000 inspect.py:167(get_annotations)
370 0.001 0.000 0.002 0.000 base.py:468(check_flows)
296 0.001 0.000 0.002 0.000 history.py:204(init_att)
73 0.000 0.000 0.002 0.000 fromnumeric.py:71(_wrapreduction)
4599 0.002 0.000 0.002 0.000 __init__.py:1138(__contains__)
17658 0.002 0.000 0.002 0.000 {built-in method builtins.iter}
864 0.001 0.000 0.002 0.000 function.py:829(<listcomp>)
370 0.001 0.000 0.001 0.000 function.py:121(update_seed)
184 0.001 0.000 0.001 0.000 {built-in method builtins.sum}
1776 0.001 0.000 0.001 0.000 result.py:157(check_include_errors)
814 0.001 0.000 0.001 0.000 inspect.py:735(unwrap)
74 0.000 0.000 0.001 0.000 function.py:639(return_faultmodes)
370 0.000 0.000 0.001 0.000 base.py:445(update_contained_modes)
148 0.000 0.000 0.001 0.000 state.py:345(init_hist_att)
38 0.000 0.000 0.001 0.000 utils.py:378(disp_len)
2 0.000 0.000 0.001 0.001 std.py:1265(close)
74 0.000 0.000 0.001 0.000 <class 'networkx.utils.decorators.argmap'> compilation 4:1(argmap_isolates_1)
814 0.001 0.000 0.001 0.000 base.py:204(init_track)
73 0.001 0.000 0.001 0.000 {method 'reduce' of 'numpy.ufunc' objects}
38 0.000 0.000 0.001 0.000 utils.py:374(_text_width)
4366 0.001 0.000 0.001 0.000 base.py:154(set_arg_as_type)
8258 0.001 0.000 0.001 0.000 {method 'clear' of 'set' objects}
74 0.001 0.000 0.001 0.000 graph.py:968(add_edges_from)
1036 0.001 0.000 0.001 0.000 {method 'copy' of 'numpy.ndarray' objects}
1 0.000 0.000 0.001 0.001 std.py:438(status_printer)
74 0.000 0.000 0.001 0.000 backends.py:627(__call__)
148 0.000 0.000 0.001 0.000 base.py:348(init_hist_att)
74 0.001 0.000 0.001 0.000 history.py:340(cut)
3531 0.001 0.000 0.001 0.000 __init__.py:1128(__setitem__)
74 0.000 0.000 0.001 0.000 function.py:596(<listcomp>)
2357 0.001 0.000 0.001 0.000 __init__.py:1118(__len__)
8258 0.001 0.000 0.001 0.000 {method 'copy' of 'list' objects}
370 0.001 0.000 0.001 0.000 function.py:97(return_faultmodes)
1770 0.001 0.000 0.001 0.000 {built-in method numpy.array}
8176 0.001 0.000 0.001 0.000 {method 'index' of 'list' objects}
1036 0.001 0.000 0.001 0.000 {built-in method numpy.asanyarray}
1482 0.001 0.000 0.001 0.000 {method 'format' of 'str' objects}
74 0.000 0.000 0.001 0.000 isolate.py:42(isolates)
8288 0.001 0.000 0.001 0.000 inspect.py:2734(kind)
73 0.000 0.000 0.001 0.000 base.py:128(get_shift)
148 0.001 0.000 0.001 0.000 graph.py:566(add_nodes_from)
2571 0.001 0.000 0.001 0.000 utils.py:375(<genexpr>)
146 0.000 0.000 0.001 0.000 <frozen _collections_abc>:941(update)
518 0.000 0.000 0.001 0.000 base.py:413(asdict)
7187 0.001 0.000 0.001 0.000 {built-in method builtins.issubclass}
370 0.000 0.000 0.001 0.000 __init__.py:201(update)
1850 0.001 0.000 0.001 0.000 base.py:51(check_role)
518 0.001 0.000 0.001 0.000 base.py:93(<listcomp>)
3330 0.001 0.000 0.001 0.000 enum.py:1095(__new__)
74 0.000 0.000 0.001 0.000 copy.py:259(_reconstruct)
1160 0.001 0.000 0.001 0.000 graph.py:1318(neighbors)
5846 0.001 0.000 0.001 0.000 inspect.py:2722(name)
73 0.000 0.000 0.001 0.000 base.py:218(init_time_hist)
74 0.000 0.000 0.001 0.000 function.py:608(<listcomp>)
370 0.001 0.000 0.001 0.000 base.py:488(<listcomp>)
74 0.000 0.000 0.001 0.000 functools.py:981(__get__)
74 0.000 0.000 0.001 0.000 function.py:593(<listcomp>)
1184 0.000 0.000 0.001 0.000 base.py:198(check_slots)
74 0.000 0.000 0.001 0.000 {method '__reduce_ex__' of 'object' objects}
518 0.001 0.000 0.001 0.000 {built-in method recordclass._dataobject.asdict}
370 0.000 0.000 0.001 0.000 base.py:267(get_flows)
518 0.001 0.000 0.001 0.000 base.py:90(<dictcomp>)
2 0.000 0.000 0.001 0.000 std.py:1286(fp_write)
74 0.000 0.000 0.001 0.000 isolate.py:85(<genexpr>)
1628 0.000 0.000 0.001 0.000 inspect.py:378(isfunction)
4381 0.001 0.000 0.001 0.000 {method 'keys' of 'dict' objects}
40 0.000 0.000 0.001 0.000 threading.py:562(__init__)
4088 0.000 0.000 0.000 0.000 {built-in method from_iterable}
148 0.000 0.000 0.000 0.000 copy.py:264(<genexpr>)
74 0.000 0.000 0.000 0.000 function.py:591(<listcomp>)
520 0.000 0.000 0.000 0.000 copy.py:243(_keep_alive)
584 0.000 0.000 0.000 0.000 result.py:138(get_dict_attr)
370 0.000 0.000 0.000 0.000 base.py:406(<dictcomp>)
74 0.000 0.000 0.000 0.000 graph.py:332(__init__)
2320 0.000 0.000 0.000 0.000 __init__.py:165(__contains__)
370 0.000 0.000 0.000 0.000 base.py:433(<dictcomp>)
296 0.000 0.000 0.000 0.000 function.py:597(<listcomp>)
159 0.000 0.000 0.000 0.000 threading.py:1192(is_alive)
3330 0.000 0.000 0.000 0.000 {method '__contains__' of 'frozenset' objects}
1776 0.000 0.000 0.000 0.000 result.py:165(check_include_error)
3330 0.000 0.000 0.000 0.000 {method 'isidentifier' of 'str' objects}
370 0.000 0.000 0.000 0.000 base.py:508(is_dynamic)
740 0.000 0.000 0.000 0.000 reportviews.py:529(__iter__)
217 0.000 0.000 0.000 0.000 std.py:231(__call__)
518 0.000 0.000 0.000 0.000 base.py:92(<listcomp>)
41 0.000 0.000 0.000 0.000 std.py:102(acquire)
370 0.000 0.000 0.000 0.000 base.py:483(<listcomp>)
444 0.000 0.000 0.000 0.000 base.py:206(<dictcomp>)
74 0.000 0.000 0.000 0.000 graph.py:1484(degree)
1480 0.000 0.000 0.000 0.000 {method 'values' of 'mappingproxy' objects}
74 0.000 0.000 0.000 0.000 copyreg.py:113(_slotnames)
75 0.000 0.000 0.000 0.000 std.py:400(format_interval)
656 0.000 0.000 0.000 0.000 __init__.py:1121(__getitem__)
38 0.000 0.000 0.000 0.000 std.py:1446(format_dict)
80 0.000 0.000 0.000 0.000 {built-in method _thread.allocate_lock}
370 0.000 0.000 0.000 0.000 base.py:502(is_static)
76 0.000 0.000 0.000 0.000 utils.py:273(_is_ascii)
370 0.000 0.000 0.000 0.000 base.py:271(<dictcomp>)
666 0.000 0.000 0.000 0.000 inspect.py:292(isclass)
148 0.000 0.000 0.000 0.000 base.py:260(<dictcomp>)
666 0.000 0.000 0.000 0.000 base.py:253(get_full_name)
1329 0.000 0.000 0.000 0.000 fromnumeric.py:3265(_round_dispatcher)
74 0.000 0.000 0.000 0.000 base.py:384(get_indicators)
74 0.000 0.000 0.000 0.000 copy.py:201(_deepcopy_list)
40 0.000 0.000 0.000 0.000 threading.py:243(__init__)
511 0.000 0.000 0.000 0.000 propagate.py:120(<genexpr>)
2533 0.000 0.000 0.000 0.000 {built-in method unicodedata.east_asian_width}
2442 0.000 0.000 0.000 0.000 {built-in method builtins.callable}
1628 0.000 0.000 0.000 0.000 inspect.py:3015(parameters)
296 0.000 0.000 0.000 0.000 {built-in method numpy.empty}
293 0.000 0.000 0.000 0.000 result.py:315(keys)
1963 0.000 0.000 0.000 0.000 {method 'update' of 'dict' objects}
41 0.000 0.000 0.000 0.000 std.py:106(release)
1776 0.000 0.000 0.000 0.000 copy.py:107(_copy_immutable)
74 0.000 0.000 0.000 0.000 base.py:106(init_flexible_roles)
74 0.000 0.000 0.000 0.000 reportviews.py:419(__init__)
1036 0.000 0.000 0.000 0.000 fromnumeric.py:861(_sort_dispatcher)
159 0.000 0.000 0.000 0.000 threading.py:1125(_wait_for_tstate_lock)
41 0.000 0.000 0.000 0.000 {method 'acquire' of '_multiprocessing.SemLock' objects}
148 0.000 0.000 0.000 0.000 base.py:69(get_track)
74 0.000 0.000 0.000 0.000 propagate.py:240(save_helper)
73 0.000 0.000 0.000 0.000 function.py:634(<listcomp>)
74 0.000 0.000 0.000 0.000 base.py:393(<dictcomp>)
38 0.000 0.000 0.000 0.000 std.py:186(__format__)
517 0.000 0.000 0.000 0.000 {built-in method fromkeys}
408 0.000 0.000 0.000 0.000 {built-in method builtins.max}
222 0.000 0.000 0.000 0.000 base.py:597(<listcomp>)
144 0.000 0.000 0.000 0.000 scenario.py:48(get)
222 0.000 0.000 0.000 0.000 misc.py:595(_clear_cache)
592 0.000 0.000 0.000 0.000 base.py:65(check_role)
146 0.000 0.000 0.000 0.000 __init__.py:1134(__iter__)
1332 0.000 0.000 0.000 0.000 {method 'copy' of 'dict' objects}
74 0.000 0.000 0.000 0.000 graph.py:59(__set__)
370 0.000 0.000 0.000 0.000 function.py:109(<listcomp>)
814 0.000 0.000 0.000 0.000 {built-in method sys.getrecursionlimit}
90 0.000 0.000 0.000 0.000 mode.py:498(add_fault)
38 0.000 0.000 0.000 0.000 std.py:153(__init__)
119 0.000 0.000 0.000 0.000 iostream.py:137(_event_pipe)
666 0.000 0.000 0.000 0.000 inspect.py:3019(return_annotation)
73 0.000 0.000 0.000 0.000 propagate.py:118(unpack_sim_kwargs)
740 0.000 0.000 0.000 0.000 {built-in method builtins.repr}
73 0.000 0.000 0.000 0.000 fromnumeric.py:72(<dictcomp>)
1 0.000 0.000 0.000 0.000 utils.py:297(_screen_shape_windows)
37 0.000 0.000 0.000 0.000 {built-in method now}
292 0.000 0.000 0.000 0.000 {method 'endswith' of 'str' objects}
74 0.000 0.000 0.000 0.000 base.py:282(update_seed)
40 0.000 0.000 0.000 0.000 iostream.py:519(_is_master_process)
72 0.000 0.000 0.000 0.000 mode.py:411(update_modestates)
370 0.000 0.000 0.000 0.000 base.py:230(update_seed)
40 0.000 0.000 0.000 0.000 threading.py:283(_acquire_restore)
195 0.000 0.000 0.000 0.000 time.py:104(__getattr__)
1 0.000 0.000 0.000 0.000 result.py:550(get_memory)
40 0.000 0.000 0.000 0.000 threading.py:1453(current_thread)
38 0.000 0.000 0.000 0.000 {method 'sub' of 're.Pattern' objects}
41 0.000 0.000 0.000 0.000 {method 'release' of '_multiprocessing.SemLock' objects}
370 0.000 0.000 0.000 0.000 base.py:422(init_block)
60 0.000 0.000 0.000 0.000 timer.py:83(inc)
40 0.000 0.000 0.000 0.000 threading.py:274(__exit__)
73 0.000 0.000 0.000 0.000 propagate.py:1160(<listcomp>)
1 0.000 0.000 0.000 0.000 std.py:663(__new__)
1 0.000 0.000 0.000 0.000 std.py:686(_decr_instances)
444 0.000 0.000 0.000 0.000 inspect.py:2726(default)
1 0.000 0.000 0.000 0.000 propagate.py:701(process_nominal)
798 0.000 0.000 0.000 0.000 {built-in method builtins.ord}
40 0.000 0.000 0.000 0.000 threading.py:271(__enter__)
188 0.000 0.000 0.000 0.000 {built-in method builtins.divmod}
159 0.000 0.000 0.000 0.000 {method 'append' of 'collections.deque' objects}
160 0.000 0.000 0.000 0.000 threading.py:575(is_set)
74 0.000 0.000 0.000 0.000 graph.py:37(__set__)
80 0.000 0.000 0.000 0.000 threading.py:1168(ident)
1 0.000 0.000 0.000 0.000 propagate.py:166(pack_run_kwargs)
40 0.000 0.000 0.000 0.000 threading.py:286(_is_owned)
1 0.000 0.000 0.000 0.000 __init__.py:48(create_string_buffer)
77 0.000 0.000 0.000 0.000 {method 'pop' of 'dict' objects}
74 0.000 0.000 0.000 0.000 {method 'get' of 'mappingproxy' objects}
147 0.000 0.000 0.000 0.000 {built-in method time.time}
38 0.000 0.000 0.000 0.000 utils.py:108(__init__)
73 0.000 0.000 0.000 0.000 propagate.py:1183(<listcomp>)
1 0.000 0.000 0.000 0.000 propagate.py:168(<dictcomp>)
4 0.000 0.000 0.000 0.000 std.py:110(__enter__)
74 0.000 0.000 0.000 0.000 reportviews.py:426(__call__)
41 0.000 0.000 0.000 0.000 {method 'acquire' of '_thread.RLock' objects}
114 0.000 0.000 0.000 0.000 {method '__exit__' of '_thread.RLock' objects}
40 0.000 0.000 0.000 0.000 threading.py:280(_release_save)
3 0.000 0.000 0.000 0.000 _weakrefset.py:63(__iter__)
40 0.000 0.000 0.000 0.000 {method 'write' of '_io.StringIO' objects}
40 0.000 0.000 0.000 0.000 {built-in method nt.getpid}
38 0.000 0.000 0.000 0.000 utils.py:112(__format__)
74 0.000 0.000 0.000 0.000 parameter.py:104(keys)
1 0.000 0.000 0.000 0.000 std.py:679(_get_free_pos)
38 0.000 0.000 0.000 0.000 std.py:167(colour)
4 0.000 0.000 0.000 0.000 std.py:113(__exit__)
40 0.000 0.000 0.000 0.000 {built-in method builtins.abs}
73 0.000 0.000 0.000 0.000 fromnumeric.py:2831(_min_dispatcher)
40 0.000 0.000 0.000 0.000 {built-in method _thread.get_ident}
1 0.000 0.000 0.000 0.000 utils.py:266(_supports_unicode)
1 0.000 0.000 0.000 0.000 utils.py:213(__init__)
1 0.000 0.000 0.000 0.000 std.py:682(<setcomp>)
1 0.000 0.000 0.000 0.000 _weakrefset.py:110(remove)
41 0.000 0.000 0.000 0.000 {method 'release' of '_thread.RLock' objects}
38 0.000 0.000 0.000 0.000 std.py:163(colour)
2 0.000 0.000 0.000 0.000 _weakrefset.py:27(__exit__)
40 0.000 0.000 0.000 0.000 {method '__exit__' of '_thread.lock' objects}
3 0.000 0.000 0.000 0.000 {method 'remove' of 'set' objects}
40 0.000 0.000 0.000 0.000 {method '__enter__' of '_thread.lock' objects}
40 0.000 0.000 0.000 0.000 {method 'release' of '_thread.lock' objects}
1 0.000 0.000 0.000 0.000 utils.py:139(__getattr__)
2 0.000 0.000 0.000 0.000 _weakrefset.py:53(_commit_removals)
1 0.000 0.000 0.000 0.000 _weakrefset.py:85(add)
1 0.000 0.000 0.000 0.000 utils.py:125(__eq__)
1 0.000 0.000 0.000 0.000 functools.py:393(__get__)
1 0.000 0.000 0.000 0.000 utils.py:252(_is_utf)
4 0.000 0.000 0.000 0.000 utils.py:222(__eq__)
1 0.000 0.000 0.000 0.000 {built-in method fromtimestamp}
2 0.000 0.000 0.000 0.000 _weakrefset.py:21(__enter__)
5 0.000 0.000 0.000 0.000 propagate.py:201(<genexpr>)
2 0.000 0.000 0.000 0.000 utils.py:187(disable_on_exception)
1 0.000 0.000 0.000 0.000 sample.py:804(times)
3 0.000 0.000 0.000 0.000 {method 'add' of 'set' objects}
2 0.000 0.000 0.000 0.000 std.py:1153(_comparable)
1 0.000 0.000 0.000 0.000 scenario.py:137(__init__)
1 0.000 0.000 0.000 0.000 <frozen importlib._bootstrap>:1207(_handle_fromlist)
1 0.000 0.000 0.000 0.000 utils.py:156(__init__)
2 0.000 0.000 0.000 0.000 std.py:1157(__hash__)
1 0.000 0.000 0.000 0.000 sample.py:808(scenarios)
1 0.000 0.000 0.000 0.000 {method 'encode' of 'str' objects}
1 0.000 0.000 0.000 0.000 _monitor.py:94(report)
3 0.000 0.000 0.000 0.000 utils.py:152(wrapper_setattr)
2 0.000 0.000 0.000 0.000 _weakrefset.py:17(__init__)
3 0.000 0.000 0.000 0.000 std.py:226(__init__)
1 0.000 0.000 0.000 0.000 std.py:1147(__del__)
1 0.000 0.000 0.000 0.000 propagate.py:872(check_overwrite)
1 0.000 0.000 0.000 0.000 propagate.py:199(unpack_mult_kwargs)
1 0.000 0.000 0.000 0.000 std.py:760(get_lock)
1 0.000 0.000 0.000 0.000 propagate.py:808(close_pool)
2 0.000 0.000 0.000 0.000 {method 'pop' of 'list' objects}
1 0.000 0.000 0.000 0.000 {method 'difference' of 'set' objects}
1 0.000 0.000 0.000 0.000 utils.py:282(_screen_shape_wrapper)
1 0.000 0.000 0.000 0.000 {method 'disable' of '_lsprof.Profiler' objects}
2 0.000 0.000 0.000 0.000 {built-in method _weakref.proxy}
1 0.000 0.000 0.000 0.000 {built-in method sys.audit}
1 0.000 0.000 0.000 0.000 {built-in method __new__ of type object at 0x00007FFAEE30C4C0}
1 0.000 0.000 0.000 0.000 std.py:1301(<lambda>)
1 0.000 0.000 0.000 0.000 scenario.py:139(<dictcomp>)
[39]:
prof = cProfile.run('Pump()', sort='tottime')
8047 function calls (8030 primitive calls) in 0.005 seconds
Ordered by: internal time
ncalls tottime percall cumtime percall filename:lineno(function)
25 0.001 0.000 0.001 0.000 base.py:250(<listcomp>)
36 0.001 0.000 0.001 0.000 {built-in method builtins.dir}
4254 0.000 0.000 0.000 0.000 {method 'startswith' of 'str' objects}
11 0.000 0.000 0.000 0.000 base.py:381(<listcomp>)
20 0.000 0.000 0.003 0.000 base.py:260(init_roles)
10 0.000 0.000 0.000 0.000 inspect.py:2331(_signature_from_function)
20/10 0.000 0.000 0.001 0.000 inspect.py:2435(_signature_from_callable)
8 0.000 0.000 0.000 0.000 parameter.py:135(check_immutable)
42 0.000 0.000 0.000 0.000 inspect.py:2669(__init__)
8 0.000 0.000 0.001 0.000 parameter.py:61(__init__)
15 0.000 0.000 0.000 0.000 {method 'round' of 'numpy.ndarray' objects}
20 0.000 0.000 0.000 0.000 inspect.py:2955(__init__)
21/16 0.000 0.000 0.000 0.000 result.py:492(flatten)
9 0.000 0.000 0.004 0.000 base.py:127(add_flex_role_obj)
8 0.000 0.000 0.000 0.000 base.py:125(set_arg_type)
5 0.000 0.000 0.003 0.001 base.py:391(__init__)
15 0.000 0.000 0.000 0.000 base.py:576(create_hist)
332 0.000 0.000 0.000 0.000 {built-in method builtins.getattr}
5 0.000 0.000 0.000 0.000 mode.py:287(init_faultmodes)
6 0.000 0.000 0.000 0.000 base.py:88(find_any_phase_overlap)
8 0.000 0.000 0.000 0.000 inspect.py:3215(__str__)
440 0.000 0.000 0.000 0.000 {built-in method builtins.isinstance}
11/10 0.000 0.000 0.003 0.000 base.py:151(__init__)
6 0.000 0.000 0.000 0.000 time.py:117(set_timestep)
13 0.000 0.000 0.000 0.000 base.py:98(get_true_fields)
16/15 0.000 0.000 0.003 0.000 base.py:229(init_roletypes)
8 0.000 0.000 0.000 0.000 parameter.py:156(check_type)
1 0.000 0.000 0.005 0.005 {built-in method builtins.exec}
10 0.000 0.000 0.000 0.000 inspect.py:2037(_signature_bound_method)
32 0.000 0.000 0.000 0.000 common.py:41(get_sub_include)
47 0.000 0.000 0.000 0.000 copy.py:66(copy)
45 0.000 0.000 0.000 0.000 parameter.py:107(check_lim)
15 0.000 0.000 0.000 0.000 base.py:102(get_timerange)
25 0.000 0.000 0.001 0.000 base.py:249(find_roletype_initiators)
6 0.000 0.000 0.003 0.000 base.py:193(__init__)
100 0.000 0.000 0.000 0.000 {built-in method builtins.hasattr}
26 0.000 0.000 0.000 0.000 inspect.py:2756(__str__)
42 0.000 0.000 0.000 0.000 enum.py:688(__call__)
5 0.000 0.000 0.000 0.000 mode.py:218(__init__)
9 0.000 0.000 0.003 0.000 base.py:895(init_obj)
16 0.000 0.000 0.000 0.000 base.py:454(get_roles)
34 0.000 0.000 0.000 0.000 result.py:337(__setattr__)
16 0.000 0.000 0.000 0.000 base.py:457(<listcomp>)
262 0.000 0.000 0.000 0.000 {method 'get' of 'dict' objects}
13 0.000 0.000 0.000 0.000 base.py:105(<listcomp>)
34 0.000 0.000 0.000 0.000 __init__.py:1111(__init__)
5 0.000 0.000 0.003 0.001 base.py:215(add_sim)
52 0.000 0.000 0.000 0.000 inspect.py:3002(<genexpr>)
6 0.000 0.000 0.001 0.000 base.py:77(__init__)
55 0.000 0.000 0.000 0.000 {built-in method builtins.setattr}
8 0.000 0.000 0.001 0.000 parameter.py:179(check_pickle)
13 0.000 0.000 0.000 0.000 numerictypes.py:357(issubdtype)
285 0.000 0.000 0.000 0.000 {built-in method builtins.len}
11 0.000 0.000 0.001 0.000 base.py:379(init_indicators)
10 0.000 0.000 0.000 0.000 inspect.py:735(unwrap)
5 0.000 0.000 0.003 0.001 function.py:534(add_fxn)
10 0.000 0.000 0.000 0.000 inspect.py:167(get_annotations)
15 0.000 0.000 0.000 0.000 {built-in method numpy.arange}
12 0.000 0.000 0.000 0.000 {built-in method numpy.asanyarray}
13 0.000 0.000 0.000 0.000 common.py:87(is_numeric)
4 0.000 0.000 0.000 0.000 history.py:204(init_att)
12 0.000 0.000 0.000 0.000 fromnumeric.py:865(sort)
6 0.000 0.000 0.000 0.000 time.py:92(__init__)
3 0.000 0.000 0.000 0.000 base.py:413(init_indicator_hist)
21 0.000 0.000 0.000 0.000 result.py:157(check_include_errors)
15 0.000 0.000 0.000 0.000 base.py:117(get_histrange)
11 0.000 0.000 0.000 0.000 base.py:204(init_track)
5 0.000 0.000 0.003 0.001 function.py:76(__init__)
15 0.000 0.000 0.000 0.000 fromnumeric.py:53(_wrapfunc)
15 0.000 0.000 0.000 0.000 fromnumeric.py:3269(round)
26 0.000 0.000 0.000 0.000 numerictypes.py:283(issubclass_)
1 0.000 0.000 0.000 0.000 graph.py:968(add_edges_from)
97 0.000 0.000 0.000 0.000 {method 'append' of 'list' objects}
1 0.000 0.000 0.005 0.005 base.py:84(__init__)
10 0.000 0.000 0.001 0.000 inspect.py:3007(from_callable)
10 0.000 0.000 0.000 0.000 inspect.py:3023(replace)
1 0.000 0.000 0.005 0.005 <string>:1(<module>)
45 0.000 0.000 0.000 0.000 base.py:154(set_arg_as_type)
6 0.000 0.000 0.000 0.000 base.py:210(init_hist)
25 0.000 0.000 0.000 0.000 base.py:51(check_role)
10 0.000 0.000 0.001 0.000 inspect.py:3261(signature)
5 0.000 0.000 0.000 0.000 base.py:468(check_flows)
13 0.000 0.000 0.000 0.000 {built-in method numpy.array}
42 0.000 0.000 0.000 0.000 enum.py:1095(__new__)
12 0.000 0.000 0.000 0.000 {method 'copy' of 'numpy.ndarray' objects}
1 0.000 0.000 0.004 0.004 ex_pump.py:470(init_architecture)
104 0.000 0.000 0.000 0.000 inspect.py:2734(kind)
2 0.000 0.000 0.000 0.000 graph.py:566(add_nodes_from)
5 0.000 0.000 0.000 0.000 base.py:426(create_arch_kwargs)
10 0.000 0.000 0.000 0.000 __init__.py:180(add)
21 0.000 0.000 0.000 0.000 result.py:318(items)
64 0.000 0.000 0.000 0.000 {built-in method builtins.issubclass}
1 0.000 0.000 0.000 0.000 function.py:600(construct_graph)
1 0.000 0.000 0.005 0.005 function.py:506(__init__)
16 0.000 0.000 0.000 0.000 base.py:445(get_default_roletypes)
12 0.000 0.000 0.000 0.000 {method 'sort' of 'numpy.ndarray' objects}
74 0.000 0.000 0.000 0.000 inspect.py:2722(name)
5 0.000 0.000 0.000 0.000 function.py:121(update_seed)
1 0.000 0.000 0.000 0.000 function.py:588(build)
18 0.000 0.000 0.000 0.000 {method 'format' of 'str' objects}
5 0.000 0.000 0.000 0.000 base.py:488(<listcomp>)
4 0.000 0.000 0.001 0.000 base.py:175(add_flow)
21 0.000 0.000 0.000 0.000 __init__.py:1118(__len__)
6 0.000 0.000 0.000 0.000 base.py:93(<listcomp>)
16 0.000 0.000 0.000 0.000 base.py:198(check_slots)
1 0.000 0.000 0.000 0.000 function.py:596(<listcomp>)
2 0.000 0.000 0.000 0.000 base.py:361(create_hist)
6 0.000 0.000 0.000 0.000 base.py:90(<dictcomp>)
20 0.000 0.000 0.000 0.000 inspect.py:378(isfunction)
17 0.000 0.000 0.000 0.000 __init__.py:1128(__setitem__)
4 0.000 0.000 0.000 0.000 base.py:92(create_hist)
13 0.000 0.000 0.000 0.000 {built-in method _abc._abc_instancecheck}
42 0.000 0.000 0.000 0.000 {method '__contains__' of 'frozenset' objects}
1 0.000 0.000 0.000 0.000 graph.py:332(__init__)
5 0.000 0.000 0.000 0.000 {built-in method recordclass._dataobject.asdict}
1 0.000 0.000 0.000 0.000 base.py:245(build)
4 0.000 0.000 0.000 0.000 function.py:597(<listcomp>)
5 0.000 0.000 0.000 0.000 base.py:406(<dictcomp>)
42 0.000 0.000 0.000 0.000 {method 'isidentifier' of 'str' objects}
36 0.000 0.000 0.000 0.000 {method 'items' of 'dict' objects}
5 0.000 0.000 0.000 0.000 __init__.py:201(update)
21 0.000 0.000 0.000 0.000 result.py:165(check_include_error)
13 0.000 0.000 0.000 0.000 <frozen abc>:117(__instancecheck__)
2 0.000 0.000 0.000 0.000 base.py:348(init_hist_att)
1 0.000 0.000 0.000 0.000 function.py:591(<listcomp>)
5 0.000 0.000 0.000 0.000 base.py:267(get_flows)
1 0.000 0.000 0.000 0.000 functools.py:981(__get__)
5 0.000 0.000 0.000 0.000 base.py:433(<dictcomp>)
5 0.000 0.000 0.000 0.000 base.py:445(update_contained_modes)
6 0.000 0.000 0.000 0.000 base.py:206(<dictcomp>)
3 0.000 0.000 0.000 0.000 __init__.py:65(__init__)
10 0.000 0.000 0.000 0.000 reportviews.py:529(__iter__)
1 0.000 0.000 0.000 0.000 isolate.py:42(isolates)
5 0.000 0.000 0.000 0.000 base.py:483(<listcomp>)
1 0.000 0.000 0.000 0.000 function.py:593(<listcomp>)
5 0.000 0.000 0.000 0.000 base.py:271(<dictcomp>)
9 0.000 0.000 0.000 0.000 base.py:253(get_full_name)
6 0.000 0.000 0.000 0.000 base.py:92(<listcomp>)
2 0.000 0.000 0.000 0.000 base.py:260(<dictcomp>)
5 0.000 0.000 0.000 0.000 base.py:502(is_static)
18 0.000 0.000 0.000 0.000 {method 'values' of 'mappingproxy' objects}
2 0.000 0.000 0.000 0.000 state.py:345(init_hist_att)
5 0.000 0.000 0.000 0.000 base.py:413(asdict)
1 0.000 0.000 0.000 0.000 base.py:106(init_flexible_roles)
9 0.000 0.000 0.000 0.000 inspect.py:292(isclass)
1 0.000 0.000 0.000 0.000 isolate.py:85(<genexpr>)
30 0.000 0.000 0.000 0.000 {built-in method builtins.callable}
3 0.000 0.000 0.000 0.000 base.py:597(<listcomp>)
4 0.000 0.000 0.000 0.000 {built-in method numpy.empty}
1 0.000 0.000 0.000 0.000 <class 'networkx.utils.decorators.argmap'> compilation 4:1(argmap_isolates_1)
20 0.000 0.000 0.000 0.000 inspect.py:3015(parameters)
24 0.000 0.000 0.000 0.000 copy.py:107(_copy_immutable)
5 0.000 0.000 0.000 0.000 base.py:508(is_dynamic)
15 0.000 0.000 0.000 0.000 fromnumeric.py:3265(_round_dispatcher)
4 0.000 0.000 0.000 0.000 graph.py:1318(neighbors)
2 0.000 0.000 0.000 0.000 <frozen _collections_abc>:717(__ior__)
1 0.000 0.000 0.000 0.000 timer.py:61(__init__)
1 0.000 0.000 0.000 0.000 reportviews.py:419(__init__)
26 0.000 0.000 0.000 0.000 {method 'update' of 'dict' objects}
1 0.000 0.000 0.000 0.000 graph.py:1484(degree)
2 0.000 0.000 0.000 0.000 base.py:69(get_track)
1 0.000 0.000 0.000 0.000 base.py:384(get_indicators)
1 0.000 0.000 0.000 0.000 backends.py:627(__call__)
8 0.000 0.000 0.000 0.000 {method 'join' of 'str' objects}
8 0.000 0.000 0.000 0.000 base.py:65(check_role)
1 0.000 0.000 0.000 0.000 base.py:393(<dictcomp>)
10 0.000 0.000 0.000 0.000 {built-in method builtins.id}
5 0.000 0.000 0.000 0.000 {built-in method builtins.max}
10 0.000 0.000 0.000 0.000 {built-in method sys.getrecursionlimit}
12 0.000 0.000 0.000 0.000 fromnumeric.py:861(_sort_dispatcher)
3 0.000 0.000 0.000 0.000 misc.py:595(_clear_cache)
5 0.000 0.000 0.000 0.000 base.py:230(update_seed)
1 0.000 0.000 0.000 0.000 graph.py:59(__set__)
12 0.000 0.000 0.000 0.000 {method 'values' of 'dict' objects}
18 0.000 0.000 0.000 0.000 {method 'copy' of 'dict' objects}
8 0.000 0.000 0.000 0.000 inspect.py:3019(return_annotation)
10 0.000 0.000 0.000 0.000 {built-in method builtins.repr}
8 0.000 0.000 0.000 0.000 __init__.py:165(__contains__)
5 0.000 0.000 0.000 0.000 base.py:422(init_block)
1 0.000 0.000 0.000 0.000 function.py:608(<listcomp>)
2 0.000 0.000 0.000 0.000 __init__.py:1121(__getitem__)
6 0.000 0.000 0.000 0.000 inspect.py:2726(default)
1 0.000 0.000 0.000 0.000 graph.py:37(__set__)
1 0.000 0.000 0.000 0.000 base.py:282(update_seed)
5 0.000 0.000 0.000 0.000 {method 'copy' of 'set' objects}
4 0.000 0.000 0.000 0.000 {built-in method builtins.any}
1 0.000 0.000 0.000 0.000 reportviews.py:426(__call__)
1 0.000 0.000 0.000 0.000 {method 'disable' of '_lsprof.Profiler' objects}
1 0.000 0.000 0.000 0.000 {method 'lower' of 'str' objects}
4 0.000 0.000 0.000 0.000 {built-in method builtins.iter}
1 0.000 0.000 0.000 0.000 {method '__exit__' of '_thread.RLock' objects}
As shown, running this model is not particularly computationally expensive. As a result, the majority of the computational expense is not actually because of the simulation itself, but because of the way the model is simulated: - the majority is spent simulating the model - a certain amount is spent re-initalizing the model at first so that the model object can be re-used without worrying about it being modified by any previous executions - another amount is spent recording the model history, wich can increase or decrease depending on tracking options (note the low number of values tracked in the pump model by default)
This is mostly because the model itself is computationally inexpensive. However, this example shows how one might easily speed up simulation for optimization or large-n simulations–avoiding unnecessary re-initialization, tracking fewer model states, or speeding up model execution. This can be done in the following ways: - using the options for track
(as mentioned above) to track fewer states (reducing time spent recording the history) - using protect
options, which specifies whether the
model used is re-instantiated for the simulation (True
) or used directly (False
) - speeding up the model by using dynamic_behavior()
methods instead of static_behavior()
or behavior()
methods (which can halve the simulation time at the expense of undirected propagation) - speeding up the model by using a longer global timestep ('tstep'
in modelparams
) or by speeding up paricularly expensive Function dynamic behaviors by setting (dt=local_tstep
) in the SimParam
[ ]: