The v.1.3.0 Patch provides a number of changes supporting the increased ability to **simulate more types of scenarios** as well as **optimize** model parameters to both find worst-case scenarios as well as find the best features/response to hazardous scenarios. The major changes are listed below:
1. 'propagate' methods have been refactored in a major way to enable more scenarios to be modelled and enable more outputs to be generated in a consistent way between methods. The major changes include:
1. `propagate.mult_fault` can now take both sequences of faults and **disturbances** which may be passed as a dictionary of times and model variable values to change at a given time (e.g. {4: {flow.value:10}}). This concept of a disturbance is now used throughout, and queried using the new model interface `Model.set_vars`.
2. Results generation in all `propagate` methods is now controlled via the `desired_result` argument, which defaults to "endclasses" (the end-state classification). This parameter can be changed to provide a number of different outputs if desired, such as results graphs, lists of faults, model values at particular times, etc. As a result of this change, single-scenario methods such as `propagate.one_fault` and `propagate.nominal` now only return two values--endresult and mdlhist, rather than endresult, resgraph, and mdlhist, since resgraph is (if the right argument e.g. "bipartite" is sent) provided in endresult.
2. A new `faultsim.search` module has been written enable the optimization of fault scenarios as well as the system architecture/response to these scenarios, including:
1. The `ProblemInterface` class, which can be used to optimize both the parameters and scenarios/response of a system over a single or multiple simulations. Several examples of using this for optimization have furthermore been incorporated in the repository, in `multirotor_example`, `pump_example`, 'tank_example', and `rover_example`.
2. A `DynamicInterface` class, which can be used to optimize a dynamic scenario to bring the system to failure. This enables the interfacing of fmdtools models with adaptive stress testing methods (e.g., in [AdaStress](https://github.com/NASA-SW-VnV/AdaStress.jl)), which is shown in `pump_example/AST_Integration.ipynb`.
3. A variety of examples have been added to demonstrate recently-developed human factors modelling, degradation modelling, and mode sampling capabilities. These are mainly in the `rover_example` folder.
Some additional minor changes include:
- NominalApproach and Sampleapproach now provide tractable __repr__
- Custom Flow classes now throw warnings when custom copy/reset/status methods have not been implemented
- A variety of bugfixes for Components
- End conditions now do not trigger of nominal run of fault simulations (for better history copying)
- `plot.phases` now sets figsize, v_padding, title_padding options consistent with other plot functions
- `update_seed` can now be used to pass new seeds to stochastic models post-instantiation (if desired), and `get_pdf` can in turn provide a pdf value corresponding to the samples from the seed.