Running Simulations

Now that we have everything set up, we can run our simulations! This is fairly simple with the execute_sims! method. The stuff about saving to file and chunksize will be explained on the next page

PowerSystemsExperiments.execute_sims!Function
execute_sims!(
    gss::GridSearchSys;
    
    change::Union{PSID.Perturbation, Nothing},
    tspan::Tuple{Float64, Float64}=(0.48, 0.55), 
    tstops::Vector{Float64}=[0.5]
    dtmax=0.0005, 
    run_transient::Bool=true, 
    log_path::String="sims",
    ida_opts::Dict{Symbol, Any} = Dict(:linear_solver=>:Dense, :max_convergence_failures=>5),
)

run simulations on all of the systems in the gridsearch and store the results in a DataFrame. Fully parallelized.

Args

  • gss::GridSearchSys : the systems
  • change::Union{Perturbation, Nothing} : perturbation to apply to the system, or nothing for no perturbation.
  • tspan::Tuple{Float64, Float64} : time interval (in seconds) to simulate.
  • tstops::Vector{Float64} : tstops argument for DifferentialEquations.jl solver - places to force a solver step.
  • dtmax::Float64 : max timestep for solver (make sure λh is in the feasible region for the solver)
  • run_transient::Bool : whether or not to run the transient simulations.
  • log_path : folder where outputs will be saved (when chunksize is reached).
  • ida_opts : options for IDA integrator. Defaults are usually OK.

Whenever the number of rows in gss.df reaches gss.chunksize, results will be saved to file then deleted from gss.df in order to limit total memory usage.

If gss.chunksize is finite, the final dataframe will be saved. This way all results will be saved, even the last chunk or if chunksize was not reached.

To not save anything to file and keep the results in gss.df, make sure to set_chunksize(gss, Inf).

source

For our example, let's run short transient simulations with a BranchTrip:

execute_sims!(
    gss,
    BranchTrip(0.5, ACBranch, "Bus 5-Bus 4-i_1"),
    tspan=(0.49, 0.55),
    dtmax=0.05,
    run_transient=true,
    log_path="example_sims"
)
[ Info: Unit System changed to UnitSystem.DEVICE_BASE = 1
[ Info: Unit System changed to UnitSystem.DEVICE_BASE = 1
[ Info: Unit System changed to UnitSystem.DEVICE_BASE = 1
[ Info: Unit System changed to UnitSystem.DEVICE_BASE = 1
[ Info: Unit System changed to UnitSystem.DEVICE_BASE = 1
[ Info: Unit System changed to UnitSystem.DEVICE_BASE = 1
[ Info: Unit System changed to UnitSystem.DEVICE_BASE = 1
[ Info: Unit System changed to UnitSystem.DEVICE_BASE = 1
[ Info: Unit System changed to UnitSystem.DEVICE_BASE = 1
[ Info: Unit System changed to UnitSystem.DEVICE_BASE = 1
[ Info: Unit System changed to UnitSystem.DEVICE_BASE = 1
[ Info: Unit System changed to UnitSystem.DEVICE_BASE = 1
[ Info: Unit System changed to UnitSystem.DEVICE_BASE = 1
[ Info: Unit System changed to UnitSystem.DEVICE_BASE = 1
[ Info: Unit System changed to UnitSystem.DEVICE_BASE = 1
[ Info: Unit System changed to UnitSystem.DEVICE_BASE = 1
[ Info: Unit System changed to UnitSystem.DEVICE_BASE = 1
[ Info: Unit System changed to UnitSystem.DEVICE_BASE = 1
[ Info: Unit System changed to UnitSystem.DEVICE_BASE = 1
[ Info: Unit System changed to UnitSystem.DEVICE_BASE = 1
[ Info: Unit System changed to UnitSystem.DEVICE_BASE = 1
┌ Warning: No Infinite Bus found. Confirm stability directly checking eigenvalues.
If all eigenvalues are on the left-half plane and only one eigenvalue is zero, the system is small signal stable.
@ PowerSimulationsDynamics ~/.julia/packages/PowerSimulationsDynamics/wch0a/src/base/small_signal.jl:111
┌ Warning: No Infinite Bus found. Confirm stability directly checking eigenvalues.
If all eigenvalues are on the left-half plane and only one eigenvalue is zero, the system is small signal stable.
@ PowerSimulationsDynamics ~/.julia/packages/PowerSimulationsDynamics/wch0a/src/base/small_signal.jl:111
┌ Warning: No Infinite Bus found. Confirm stability directly checking eigenvalues.
If all eigenvalues are on the left-half plane and only one eigenvalue is zero, the system is small signal stable.
@ PowerSimulationsDynamics ~/.julia/packages/PowerSimulationsDynamics/wch0a/src/base/small_signal.jl:111
┌ Warning: No Infinite Bus found. Confirm stability directly checking eigenvalues.
If all eigenvalues are on the left-half plane and only one eigenvalue is zero, the system is small signal stable.
@ PowerSimulationsDynamics ~/.julia/packages/PowerSimulationsDynamics/wch0a/src/base/small_signal.jl:111
┌ Warning: No Infinite Bus found. Confirm stability directly checking eigenvalues.
If all eigenvalues are on the left-half plane and only one eigenvalue is zero, the system is small signal stable.
@ PowerSimulationsDynamics ~/.julia/packages/PowerSimulationsDynamics/wch0a/src/base/small_signal.jl:111
┌ Warning: No Infinite Bus found. Confirm stability directly checking eigenvalues.
If all eigenvalues are on the left-half plane and only one eigenvalue is zero, the system is small signal stable.
@ PowerSimulationsDynamics ~/.julia/packages/PowerSimulationsDynamics/wch0a/src/base/small_signal.jl:111
┌ Warning: No Infinite Bus found. Confirm stability directly checking eigenvalues.
If all eigenvalues are on the left-half plane and only one eigenvalue is zero, the system is small signal stable.
@ PowerSimulationsDynamics ~/.julia/packages/PowerSimulationsDynamics/wch0a/src/base/small_signal.jl:111
[ Info: Unit System changed to UnitSystem.DEVICE_BASE = 1
┌ Warning: No Infinite Bus found. Confirm stability directly checking eigenvalues.
If all eigenvalues are on the left-half plane and only one eigenvalue is zero, the system is small signal stable.
@ PowerSimulationsDynamics ~/.julia/packages/PowerSimulationsDynamics/wch0a/src/base/small_signal.jl:111
┌ Warning: No Infinite Bus found. Confirm stability directly checking eigenvalues.
If all eigenvalues are on the left-half plane and only one eigenvalue is zero, the system is small signal stable.
@ PowerSimulationsDynamics ~/.julia/packages/PowerSimulationsDynamics/wch0a/src/base/small_signal.jl:111
┌ Warning: No Infinite Bus found. Confirm stability directly checking eigenvalues.
If all eigenvalues are on the left-half plane and only one eigenvalue is zero, the system is small signal stable.
@ PowerSimulationsDynamics ~/.julia/packages/PowerSimulationsDynamics/wch0a/src/base/small_signal.jl:111
[ Info: Unit System changed to UnitSystem.DEVICE_BASE = 1
[ Info: Unit System changed to UnitSystem.DEVICE_BASE = 1
[ Info: Unit System changed to UnitSystem.DEVICE_BASE = 1
[ Info: Unit System changed to UnitSystem.DEVICE_BASE = 1
┌ Warning: No Infinite Bus found. Confirm stability directly checking eigenvalues.
If all eigenvalues are on the left-half plane and only one eigenvalue is zero, the system is small signal stable.
@ PowerSimulationsDynamics ~/.julia/packages/PowerSimulationsDynamics/wch0a/src/base/small_signal.jl:111
[ Info: Unit System changed to UnitSystem.DEVICE_BASE = 1
┌ Warning: No Infinite Bus found. Confirm stability directly checking eigenvalues.
If all eigenvalues are on the left-half plane and only one eigenvalue is zero, the system is small signal stable.
@ PowerSimulationsDynamics ~/.julia/packages/PowerSimulationsDynamics/wch0a/src/base/small_signal.jl:111
┌ Warning: No Infinite Bus found. Confirm stability directly checking eigenvalues.
If all eigenvalues are on the left-half plane and only one eigenvalue is zero, the system is small signal stable.
@ PowerSimulationsDynamics ~/.julia/packages/PowerSimulationsDynamics/wch0a/src/base/small_signal.jl:111

[IDAS ERROR]  IDASolve
  At t = 0.500199 and h = 4.48379e-12, the corrector convergence failed repeatedly or with |h| = hmin.

┌ Error: The simulation failed with return code ConvergenceFailure
@ PowerSimulationsDynamics ~/.julia/packages/PowerSimulationsDynamics/wch0a/src/base/simulation.jl:556
┌ Warning: No Infinite Bus found. Confirm stability directly checking eigenvalues.
If all eigenvalues are on the left-half plane and only one eigenvalue is zero, the system is small signal stable.
@ PowerSimulationsDynamics ~/.julia/packages/PowerSimulationsDynamics/wch0a/src/base/small_signal.jl:111

[IDAS ERROR]  IDACalcIC
  Newton/Linesearch algorithm failed to converge.

┌ Error: The simulation failed with return code ConvergenceFailure
@ PowerSimulationsDynamics ~/.julia/packages/PowerSimulationsDynamics/wch0a/src/base/simulation.jl:556
┌ Warning: No Infinite Bus found. Confirm stability directly checking eigenvalues.
If all eigenvalues are on the left-half plane and only one eigenvalue is zero, the system is small signal stable.
@ PowerSimulationsDynamics ~/.julia/packages/PowerSimulationsDynamics/wch0a/src/base/small_signal.jl:111

[IDAS ERROR]  IDACalcIC
  Newton/Linesearch algorithm failed to converge.

┌ Error: The simulation failed with return code ConvergenceFailure
@ PowerSimulationsDynamics ~/.julia/packages/PowerSimulationsDynamics/wch0a/src/base/simulation.jl:556

[IDAS ERROR]  IDACalcIC
  Newton/Linesearch algorithm failed to converge.

┌ Error: The simulation failed with return code ConvergenceFailure
@ PowerSimulationsDynamics ~/.julia/packages/PowerSimulationsDynamics/wch0a/src/base/simulation.jl:556
┌ Warning: No Infinite Bus found. Confirm stability directly checking eigenvalues.
If all eigenvalues are on the left-half plane and only one eigenvalue is zero, the system is small signal stable.
@ PowerSimulationsDynamics ~/.julia/packages/PowerSimulationsDynamics/wch0a/src/base/small_signal.jl:111

[IDAS ERROR]  IDASolve
  At t = 0.500133 and h = 1.24738e-12, the corrector convergence failed repeatedly or with |h| = hmin.

┌ Error: The simulation failed with return code ConvergenceFailure
@ PowerSimulationsDynamics ~/.julia/packages/PowerSimulationsDynamics/wch0a/src/base/simulation.jl:556
finished solve 1/32 in 5.58s (3.0%) (runtime: 6.0s)
finished solve 6/32 in 5.62s (19.0%) (runtime: 7.0s)
┌ Warning: No Infinite Bus found. Confirm stability directly checking eigenvalues.
If all eigenvalues are on the left-half plane and only one eigenvalue is zero, the system is small signal stable.
@ PowerSimulationsDynamics ~/.julia/packages/PowerSimulationsDynamics/wch0a/src/base/small_signal.jl:111
finished solve 7/32 in 0.04s (22.0%) (runtime: 9.0s)
[ Info: Unit System changed to UnitSystem.DEVICE_BASE = 1

[IDAS ERROR]  IDASolve
  At t = 0.500209 and h = 5.36073e-13, the corrector convergence failed repeatedly or with |h| = hmin.


[IDAS ERROR]  IDASolve
  At t = 0.500138 and h = 1.3935e-12, the corrector convergence failed repeatedly or with |h| = hmin.

┌ Warning: No Infinite Bus found. Confirm stability directly checking eigenvalues.
If all eigenvalues are on the left-half plane and only one eigenvalue is zero, the system is small signal stable.
@ PowerSimulationsDynamics ~/.julia/packages/PowerSimulationsDynamics/wch0a/src/base/small_signal.jl:111
┌ Warning: No Infinite Bus found. Confirm stability directly checking eigenvalues.
If all eigenvalues are on the left-half plane and only one eigenvalue is zero, the system is small signal stable.
@ PowerSimulationsDynamics ~/.julia/packages/PowerSimulationsDynamics/wch0a/src/base/small_signal.jl:111

[IDAS ERROR]  IDASolve
  At t = 0.500211 and h = 8.78453e-11, the corrector convergence failed repeatedly or with |h| = hmin.


[IDAS ERROR]  IDASolve
  At t = 0.500133 and h = 5.83397e-12, the corrector convergence failed repeatedly or with |h| = hmin.

┌ Error: The simulation failed with return code ConvergenceFailure
@ PowerSimulationsDynamics ~/.julia/packages/PowerSimulationsDynamics/wch0a/src/base/simulation.jl:556
┌ Error: The simulation failed with return code ConvergenceFailure
@ PowerSimulationsDynamics ~/.julia/packages/PowerSimulationsDynamics/wch0a/src/base/simulation.jl:556
┌ Error: The simulation failed with return code ConvergenceFailure
@ PowerSimulationsDynamics ~/.julia/packages/PowerSimulationsDynamics/wch0a/src/base/simulation.jl:556
┌ Error: The simulation failed with return code ConvergenceFailure
@ PowerSimulationsDynamics ~/.julia/packages/PowerSimulationsDynamics/wch0a/src/base/simulation.jl:556
finished solve 9/32 in 0.05s (28.0%) (runtime: 10.0s)
finished solve 15/32 in 8.95s (47.0%) (runtime: 10.0s)
finished solve 12/32 in 8.49s (38.0%) (runtime: 10.0s)
finished solve 16/32 in 9.01s (50.0%) (runtime: 10.0s)
finished solve 4/32 in 0.04s (12.0%) (runtime: 10.0s)
finished solve 3/32 in 5.51s (9.0%) (runtime: 10.0s)
finished solve 10/32 in 0.21s (31.0%) (runtime: 10.0s)
finished solve 11/32 in 8.43s (34.0%) (runtime: 10.0s)
finished solve 8/32 in 0.04s (25.0%) (runtime: 10.0s)
finished solve 2/32 in 5.59s (6.0%) (runtime: 10.0s)
finished solve 14/32 in 8.96s (44.0%) (runtime: 10.0s)
finished solve 13/32 in 8.5s (41.0%) (runtime: 10.0s)
┌ Warning: No Infinite Bus found. Confirm stability directly checking eigenvalues.
If all eigenvalues are on the left-half plane and only one eigenvalue is zero, the system is small signal stable.
@ PowerSimulationsDynamics ~/.julia/packages/PowerSimulationsDynamics/wch0a/src/base/small_signal.jl:111
[ Info: Unit System changed to UnitSystem.DEVICE_BASE = 1
finished solve 17/32 in 9.09s (53.0%) (runtime: 10.0s)

[IDAS ERROR]  IDASolve
  At t = 0.500063 and h = 5.15902e-10, the corrector convergence failed repeatedly or with |h| = hmin.

┌ Error: The simulation failed with return code ConvergenceFailure
@ PowerSimulationsDynamics ~/.julia/packages/PowerSimulationsDynamics/wch0a/src/base/simulation.jl:556
finished solve 18/32 in 3.51s (56.0%) (runtime: 10.0s)
┌ Warning: No Infinite Bus found. Confirm stability directly checking eigenvalues.
If all eigenvalues are on the left-half plane and only one eigenvalue is zero, the system is small signal stable.
@ PowerSimulationsDynamics ~/.julia/packages/PowerSimulationsDynamics/wch0a/src/base/small_signal.jl:111
finished solve 5/32 in 0.03s (16.0%) (runtime: 10.0s)┌ Warning: No Infinite Bus found. Confirm stability directly checking eigenvalues.
If all eigenvalues are on the left-half plane and only one eigenvalue is zero, the system is small signal stable.
@ PowerSimulationsDynamics ~/.julia/packages/PowerSimulationsDynamics/wch0a/src/base/small_signal.jl:111
┌ Warning: No Infinite Bus found. Confirm stability directly checking eigenvalues.
If all eigenvalues are on the left-half plane and only one eigenvalue is zero, the system is small signal stable.
@ PowerSimulationsDynamics ~/.julia/packages/PowerSimulationsDynamics/wch0a/src/base/small_signal.jl:111
┌ Warning: No Infinite Bus found. Confirm stability directly checking eigenvalues.
If all eigenvalues are on the left-half plane and only one eigenvalue is zero, the system is small signal stable.
@ PowerSimulationsDynamics ~/.julia/packages/PowerSimulationsDynamics/wch0a/src/base/small_signal.jl:111
┌ Warning: No Infinite Bus found. Confirm stability directly checking eigenvalues.
If all eigenvalues are on the left-half plane and only one eigenvalue is zero, the system is small signal stable.
@ PowerSimulationsDynamics ~/.julia/packages/PowerSimulationsDynamics/wch0a/src/base/small_signal.jl:111


[IDAS ERROR]  IDASolve
  At t = 0.500128 and h = 2.31141e-12, the corrector convergence failed repeatedly or with |h| = hmin.

┌ Error: The simulation failed with return code ConvergenceFailure
@ PowerSimulationsDynamics ~/.julia/packages/PowerSimulationsDynamics/wch0a/src/base/simulation.jl:556
┌ Warning: No Infinite Bus found. Confirm stability directly checking eigenvalues.
If all eigenvalues are on the left-half plane and only one eigenvalue is zero, the system is small signal stable.
@ PowerSimulationsDynamics ~/.julia/packages/PowerSimulationsDynamics/wch0a/src/base/small_signal.jl:111
┌ Warning: No Infinite Bus found. Confirm stability directly checking eigenvalues.
If all eigenvalues are on the left-half plane and only one eigenvalue is zero, the system is small signal stable.
@ PowerSimulationsDynamics ~/.julia/packages/PowerSimulationsDynamics/wch0a/src/base/small_signal.jl:111
┌ Warning: No Infinite Bus found. Confirm stability directly checking eigenvalues.
If all eigenvalues are on the left-half plane and only one eigenvalue is zero, the system is small signal stable.
@ PowerSimulationsDynamics ~/.julia/packages/PowerSimulationsDynamics/wch0a/src/base/small_signal.jl:111
finished solve 19/32 in 9.17s (59.0%) (runtime: 10.0s)
[ Info: Unit System changed to UnitSystem.DEVICE_BASE = 1
finished solve 20/32 in 8.57s (62.0%) (runtime: 10.0s)
┌ Warning: No Infinite Bus found. Confirm stability directly checking eigenvalues.
If all eigenvalues are on the left-half plane and only one eigenvalue is zero, the system is small signal stable.
@ PowerSimulationsDynamics ~/.julia/packages/PowerSimulationsDynamics/wch0a/src/base/small_signal.jl:111
[ Info: Unit System changed to UnitSystem.DEVICE_BASE = 1
[ Info: Unit System changed to UnitSystem.DEVICE_BASE = 1

[IDAS ERROR]  IDASolve
  At t = 0.50005 and h = 3.80445e-11, the corrector convergence failed repeatedly or with |h| = hmin.

┌ Error: The simulation failed with return code ConvergenceFailure
@ PowerSimulationsDynamics ~/.julia/packages/PowerSimulationsDynamics/wch0a/src/base/simulation.jl:556
finished solve 21/32 in 7.58s (66.0%) (runtime: 10.0s)
finished solve 22/32 in 9.13s (69.0%) (runtime: 10.0s)
finished solve 23/32 in 0.04s (72.0%) (runtime: 10.0s)
finished solve 24/32 in 9.12s (75.0%) (runtime: 10.0s)
finished solve 25/32 in 9.14s (78.0%) (runtime: 10.0s)

[IDAS ERROR]  IDASolve
  At t = 0.500058 and h = 7.89169e-13, the corrector convergence failed repeatedly or with |h| = hmin.

┌ Error: The simulation failed with return code ConvergenceFailure
@ PowerSimulationsDynamics ~/.julia/packages/PowerSimulationsDynamics/wch0a/src/base/simulation.jl:556
finished solve 26/32 in 9.12s (81.0%) (runtime: 10.0s)

[IDAS ERROR]  IDASolve
  At t = 0.500069 and h = 7.69865e-14, the corrector convergence failed repeatedly or with |h| = hmin.

┌ Warning: No Infinite Bus found. Confirm stability directly checking eigenvalues.
If all eigenvalues are on the left-half plane and only one eigenvalue is zero, the system is small signal stable.
@ PowerSimulationsDynamics ~/.julia/packages/PowerSimulationsDynamics/wch0a/src/base/small_signal.jl:111
┌ Error: The simulation failed with return code ConvergenceFailure
@ PowerSimulationsDynamics ~/.julia/packages/PowerSimulationsDynamics/wch0a/src/base/simulation.jl:556
finished solve 27/32 in 9.14s (84.0%) (runtime: 10.0s)
[IDAS ERROR]  IDASolve
  At t = 0.500053 and h = 5.93809e-13, the corrector convergence failed repeatedly or with |h| = hmin.


┌ Error: The simulation failed with return code ConvergenceFailure
@ PowerSimulationsDynamics ~/.julia/packages/PowerSimulationsDynamics/wch0a/src/base/simulation.jl:556
finished solve 28/32 in 9.2s (88.0%) (runtime: 10.0s)

[IDAS ERROR]  IDASolve
  At t = 0.500224 and h = 1.22417e-10, the corrector convergence failed repeatedly or with |h| = hmin.

┌ Error: The simulation failed with return code ConvergenceFailure
@ PowerSimulationsDynamics ~/.julia/packages/PowerSimulationsDynamics/wch0a/src/base/simulation.jl:556
finished solve 29/32 in 9.05s (91.0%) (runtime: 10.0s)
┌ Warning: No Infinite Bus found. Confirm stability directly checking eigenvalues.
If all eigenvalues are on the left-half plane and only one eigenvalue is zero, the system is small signal stable.
@ PowerSimulationsDynamics ~/.julia/packages/PowerSimulationsDynamics/wch0a/src/base/small_signal.jl:111
┌ Warning: No Infinite Bus found. Confirm stability directly checking eigenvalues.
If all eigenvalues are on the left-half plane and only one eigenvalue is zero, the system is small signal stable.
@ PowerSimulationsDynamics ~/.julia/packages/PowerSimulationsDynamics/wch0a/src/base/small_signal.jl:111
finished solve 30/32 in 0.04s (94.0%) (runtime: 10.0s)
finished solve 31/32 in 0.04s (97.0%) (runtime: 10.0s)
finished solve 32/32 in 0.04s (100.0%) (runtime: 10.0s)

Now we can inspect the results!

gss
GridSearchSys with 32 systems
  base: System (Buses: 9)
  header: AbstractString["injector at {Bus 3}", "injector at {Bus1}", "injector at {Bus 2}", "Load Scale", "ZIPE Params"]
  sysdict: Dict{Vector{Any}, Function} with 32 entries
  results_header: ["error", "sim", "sm", "dt", "Eigenvalues", "Bus 3 Injector Current", "Bus 1 Injector Current", "Bus 2 Injector Current"]
  results_getters: Function[PowerSystemsExperiments.var"#19#21"{typeof(PowerSystemsExperiments.get_error)}(PowerSystemsExperiments.get_error), PowerSystemsExperiments.var"#19#21"{typeof(PowerSystemsExperiments.get_sim)}(PowerSystemsExperiments.get_sim), PowerSystemsExperiments.var"#19#21"{typeof(PowerSystemsExperiments.get_sm)}(PowerSystemsExperiments.get_sm), PowerSystemsExperiments.var"#19#21"{typeof(PowerSystemsExperiments.get_dt)}(PowerSystemsExperiments.get_dt), PowerSystemsExperiments.var"#19#21"{typeof(PowerSystemsExperiments.get_eigenvalues)}(PowerSystemsExperiments.get_eigenvalues), PowerSystemsExperiments.get_injector_currents]
  df: 32x13 DataFrame
  chunksize: Inf
  hfile: 8 function declarations
julia> gss.df32×13 DataFrame
 Row  injector at {Bus 3}  injector at {Bus1}  injector at {Bus 2}  Load Scal ⋯
     │ Any                  Any                 Any                  Any       ⋯
─────┼──────────────────────────────────────────────────────────────────────────
   1 │ GFM                  GFM                 GFM                  0.4       ⋯
   2 │ GFM                  GFM                 GFM                  1.0
   3 │ GFM                  GFM                 GFM                  0.4
   4 │ GFM                  SM                  SM                   1.0
   5 │ SM                   GFM                 GFM                  1.0       ⋯
   6 │ SM                   SM                  GFM                  1.0
   7 │ GFM                  SM                  GFM                  1.0
   8 │ SM                   GFM                 SM                   1.0
  ⋮  │          ⋮                   ⋮                    ⋮               ⋮     ⋱
  26 │ SM                   GFM                 SM                   0.4       ⋯
  27 │ SM                   GFM                 GFM                  0.4
  28 │ GFM                  SM                  GFM                  0.4
  29 │ GFM                  GFM                 GFM                  1.0
  30 │ SM                   SM                  SM                   0.4       ⋯
  31 │ SM                   GFM                 SM                   0.4
  32 │ SM                   GFM                 GFM                  0.4
                                                  10 columns and 17 rows omitted

Notes

  • You must only use at most one perturbation if you want to save the results to file. For some reason, passing a Vector{Perturbation} changes something about the typing and breaks serialization.
  • if your perturbation does not occur at $t=0.5$, make sure to pass the tstops argument and include at least the time of your perturbation. This significantly helps numerical stability.
  • execute_sims! is fully parallelized, so use as many cores as you can! Sometimes the REPL is limited to one thread, so I've found more success running sims from the command line and passing an explicit thread count with julia -t $(nproc) my_experiments.jl.
    • be sure to mind your memory usage - these systems are big and therefore solving them can be costly.
    • tmux is a useful tool that lets you create a terminal that keeps running after you detach from it, so you don't have to stay connected to a server or keep your computer awake while running simulations.
  • tuning ida_opts did not prove very fruitful; unless you have deep knowledge of how IDA works, don't spend a ton of time tuning.
  • be careful about the ratio of the time span to dtmax. The data accumulates quickly, and RAM is limited. If you really need very small dtmax, decrease the chunk size.