Sensitivity_Analysis#
Classes:
|
Sensitivity analysis for multiple parameters. |
- class pyH2A.Analysis.Sensitivity_Analysis.Sensitivity_Analysis(input_file)[source]#
Sensitivity analysis for multiple parameters.
- Parameters
- Sensitivity_Analysis > […] > Namestr
Display name for parameter, e.g. used for plot labels.
- Sensitivity_Analysis > […] > Typestr
Type of parameter values. If Type is ‘value’, provided values are used as is. If Type is ‘factor’, provided values are multiplied with base value of parameter in input file.
- Sensitivity_Analysis > […] > Valuesstr
Value pair to be used for sensitivity analysis. One value should be higher than the base value, the other should be lower. Specified in following format: value A; value B (order is irrelevant). E.g. ‘0.3; 10’.
Notes
Sensitivity_Analysis contains parameters which are to be varied in sensitivity analysis. First column specifies path to parameter in input file (top key > middle key > bottom key format, e.g. Catalyst > Cost per kg ($) > Value). Order of parameters is not relevant.
Methods:
perform_sensitivity_analysis
([format_cutoff])Perform sensitivity analysis.
sensitivity_box_plot
([ax, figure_lean, ...])Plot sensitivity box plot.
sort_h2_cost_values
(data)Sort H2 cost values.
- perform_sensitivity_analysis(format_cutoff=7)[source]#
Perform sensitivity analysis.
- Parameters
- format_cutoffint
Length of number string above which dyanmic formatting is applied.
- sensitivity_box_plot(ax=None, figure_lean=True, height=0.8, label_offset=0.1, lim_extra=0.2, format_cutoff=7, plot_kwargs={}, **kwargs)[source]#
Plot sensitivity box plot.
- Parameters
- axmatplotlib.axes, optional
Axes object in which plot is drawn. Default is None, creating new plot.
- figure_leanbool, optional
If figure_lean is True, matplotlib.fig object is returned.
- heightfloat, optional
Height of bars.
- label_offsetfloat, optional
Offset for bar labels.
- lim_extrafloat, optional
Fractional increase of x axis limits.
- format_cutoffint
Length of number string above which dyanmic formatting is applied.
- plot_kwargs: dict, optional
Dictionary containing optional keyword arguments for
Figure_Lean()
, has priority over **kwargs.- **kwargs:
Additional kwargs passed to
Figure_Lean()
- Returns
- figurematplotlib.fig or None
matplotlib.fig is returned if figure_lean is True.
Notes
In plot, parameters are sorted by descending cost increase magnitude.