cpsim.formal package

Submodules

cpsim.formal.gaussian_distribution module

class cpsim.formal.gaussian_distribution.GaussianDistribution(miu: ndarray, sigma: ndarray)[source]

Bases: object

classmethod from_standard(miu: ndarray, C: ndarray)[source]
plot(x1, x2, y1, y2, fig=None)[source]
prob_in_half_space(hs: HalfSpace)[source]
prob_in_strip(s: Strip)[source]
random(size)[source]
transformation_matrix_from_standard()[source]

cpsim.formal.half_space module

class cpsim.formal.half_space.HalfSpace(l: ~numpy.ndarray, b: [<class 'int'>, <class 'float'>])[source]

Bases: object

normal vector - l The half space is defined as l^T x > b

plot(x1, x2, fig=None)[source]

cpsim.formal.hyperplane module

class cpsim.formal.hyperplane.Hyperplane(l: ~numpy.ndarray, b: [<class 'int'>, <class 'float'>])[source]

Bases: object

inverse_normal_vector()[source]

cpsim.formal.reachability module

class cpsim.formal.reachability.ReachableSet(A, B, U: Zonotope, W: GaussianDistribution, max_step=50)[source]

Bases: object

get the Reachable set + Distribution A, B - from discrete-time system

distribution(vertex: [<class 'numpy.ndarray'>, <class 'cpsim.formal.gaussian_distribution.GaussianDistribution'>], k: int)[source]
first_intersection() -> ([<class 'int'>, None], <class 'cpsim.formal.zonotope.Zonotope'>)[source]
given_P(P_given: float, max_k: int)[source]
given_k(max_k: int)[source]
init(x_0: GaussianDistribution, s: Strip)[source]
maintain_once(P_given: float)[source]
plot(X_k: Zonotope, D_k: GaussianDistribution, alpha, fig_setting)[source]
reachable_set_k(k: int)[source]
reachable_set_wo_noise(k: int) Zonotope[source]
state_reconstruction(us) GaussianDistribution[source]

cpsim.formal.strip module

class cpsim.formal.strip.Strip(l: ~numpy.ndarray, a: [<class 'int'>, <class 'float'>], b: [<class 'int'>, <class 'float'>])[source]

Bases: object

normal vector - l The half space is defined as a < l^T x < b

center() Hyperplane[source]
in_strip(x)[source]
inverse_normal_vector()[source]
plot(x1, x2, fig=None)[source]
point_to_strip(point)[source]

cpsim.formal.zonotope module

class cpsim.formal.zonotope.Zonotope(c: ndarray, g: ndarray)[source]

Bases: object

Zonotope. parameters:

c: center g: [g_0, g_1, …] generators

alpha_to_control(alpha)[source]
classmethod from_box(lo: ndarray, up: ndarray)[source]

initiate a zonotope from box lo: lower bound of the box up: upper bound of the box

is_intersected(hs)[source]
plot(fig=None, color='orange')[source]
point_closest_to_hyperplane(hp: Hyperplane)[source]
show_control_effect(alpha, u_dim: int, head_width, line_width, fig=None)[source]
show_routine(gs_l, fig=None)[source]
support(l: ndarray)[source]
to_V()[source]
vertex_with_max_support(l: ndarray)[source]
Return:

vertex - farthest vertex coordinate alpha - direction (1/-1) for each generators gs_l - generators to vertex

Module contents