opyrability#

Opyrability - Process Operability Analysis in Python#

A Python package for process operability analysis: forward and inverse mapping between input and output spaces, operability index evaluation, nonlinear- and mixed-integer-linear-programming based operability calculations, and dynamic operability, for steady-state and dynamic process models.

Copyright (c) 2022-2026 Victor Alves – Carnegie Mellon University. Released under the MIT License.

See the acknowledgements on source code and documentation for the project’s origins and current development.

Functions

AIS2AOS_map(model, AIS_bound, AIS_resolution)

Forward mapping for Process Operability calculations (From AIS to AOS).

OI_eval(AS, DS[, perspective, ...])

Operability Index (OI) calculation.

are_overlapping(poly1, poly2)

Check if two polytopes overlap.

create_grid(region_bounds, region_resolution)

Create a multidimensional, discretized grid, given the bounds and the resolution.

dOI_eval(mapping_results, DOS[, plot, labels])

Evaluate the Dynamic Operability Index (dOI) at each time step of a dynamic operability mapping.

dynamic_operability(model, x0, AIS_bound[, ...])

One-call dynamic operability analysis -- the recommended high-level entry point.

dynamic_operability_mapping([step_model, ...])

Obtain the multimodel representation of the output-space Achievable Output Set (AOS) for a dynamic process as it evolves over k time steps.

dynamic_operability_nstep(step_model, x0, ...)

Build the dynamic Achievable Output Set (AOS) funnel by direct n-step simulation of a nonlinear step model, reproducing the construction used in Dinh & Lima (IECR, 2023, Figures 8-9).

dynamic_operability_scenarios(step_factory, ...)

Dynamic operability across several disturbance scenarios (or input sequences), together with their disturbance-robust intersection.

gaussian_robust_funnel(mapping_results, Sigma_y)

Disturbance-robust achievable output funnel for Gaussian uncertainty, by hyperplane shrinkage: each slice of the (mean) funnel is shrunk so that the remaining outputs stay achievable for every uncertainty realization inside the chosen highest-density region.

get_extreme_vertices(bounds)

Gets the extreme vertices of any D-dimensional hypercube.

identify_lti_step_tests(step_model, x0, ...)

Identify a discrete-time LTI model from step tests on a nonlinear step model, in the form consumed by dynamic_operability's matrices interface.

implicit_map(model, image_init[, ...])

Performs implicit mapping of an implicitly defined process F(u,y) = 0.

make_pyomo_step_model(build_func, n_x, n_u)

Wrap a Pyomo model builder function into a step_model callable that is compatible with dynamic_operability_mapping.

milp_based_approach(model, AIS_bound, ...[, ...])

MILP-based iterative algorithm for optimal modular design: Layer 1 of the multilayer operability framework of Gazzaneo and Lima.

multimodel_rep(model, bounds, resolution[, ...])

Obtain a multimodel representation based on polytopes of Process Operability sets.

nlp_based_approach(model, DOS_bounds, ...[, ...])

Inverse mapping for Process Operability calculations.

plot_dynamic_funnel(mapping_results[, DOS, ...])

Plot the 3D dynamic operability funnel by stacking the output-space AOS polytopes along the time axis, as in Dinh & Lima (IECR 2023 and Comput.

plot_funnel_comparison(results_dict[, ...])

Overlay the output-space funnels of several dynamic operability results as outlines, one color per result.

plot_state_funnel(mapping_results[, dims, ...])

Plot the dynamic funnel in the STATE space, as in Figures 4 and 5 of Dinh & Lima (Comput.

points2polyhedra(AIS, AOS)

Generation of connected polyhedra based on the AIS/AOS points.

points2simplices(AIS, AOS)

Generation of connected simplices (k+1 convex hull of k+1 vertices) based on the AIS/AOS points.

process_overlapping_polytopes(bound_box, ...)

Eliminate overlaps between polytopes given a bounding box and a region of potentially overlapping polytopes.

propagate_output_covariance(A, G, C, ...[, ...])

Propagate Gaussian disturbance covariance through linear dynamics and return the output covariance at each time step:

rank_designs(models, AIS_bound, DOS_bound, ...)

Rank two or more steady-state process designs by their Operability Index.

simulate_mc_trajectories(mapping_results[, ...])

Simulate Monte Carlo output trajectories using randomly sampled AIS (and, if applicable, EDS) inputs at each time step.

update_dynamic_funnel(mapping_results, x0_new)

Online update of a linear dynamic operability funnel for a new initial state, via the hyperplane right-hand-side shift of Dinh & Lima (Comput.