Discrete-Time Stochastic (dt-SS)¶
Functions for computing barrier certificates for discrete-time stochastic systems over a finite time horizon with noise.
dt_SS¶
from src.functions.dt_SS import dt_SS
result = dt_SS(b_degree, dim, L_initial, U_initial, L_unsafe, U_unsafe,
L_space, U_space, x, varsigma, f, t, noise_type="normal",
optimize=False, solver="mosek", confidence=None, gam=None,
lam=None, c_val=None, mean=None, sigma=None, rate=None,
a=None, b=None, l_degree=None)
Parameters:
Parameter |
Type |
Description |
|---|---|---|
|
int |
Degree of the barrier polynomial. |
|
int |
Dimension of the state space. |
|
np.ndarray |
Lower bounds of the initial set. Shape: |
|
np.ndarray |
Upper bounds of the initial set. Shape: |
|
np.ndarray |
Lower bounds of unsafe set(s). Shape: |
|
np.ndarray |
Upper bounds of unsafe set(s). Shape: |
|
np.ndarray |
Lower bounds of the state space. Shape: |
|
np.ndarray |
Upper bounds of the state space. Shape: |
|
tuple |
SymPy symbols for state variables. |
|
tuple |
SymPy symbols for noise variables. |
|
np.ndarray |
Array of SymPy expressions defining the dynamics. |
|
int |
Finite time horizon. |
|
str |
Type of noise: |
|
bool |
If |
|
str |
|
|
float or None |
Minimal confidence threshold for the feasible solution. |
|
float or None |
Fixed value for \(\gamma\). |
|
float or None |
Fixed value for \(\lambda\). |
|
float or None |
Value for \(c\) (multiplied by time horizon in the confidence bound). |
|
list or None |
Mean values for normal noise (assumed zero if not provided). |
|
list or None |
Standard deviations for normal noise per dimension. |
|
list or None |
Rate parameter(s) for exponential noise. |
|
list or None |
Lower bounds for uniform noise. |
|
list or None |
Upper bounds for uniform noise. |
|
int or None |
Degree of Lagrangian multipliers. Defaults to |
Noise-specific parameters:
Normal: provide
sigma(and optionallymean)Exponential: provide
rateUniform: provide
aandb
Returns: dict with barrier certificate details, or None if infeasible.
parallel_dt_SS¶
from src.functions.parallel_dt_SS import parallel_dt_SS
result = parallel_dt_SS(b_degree, dim, L_initial, U_initial, L_unsafe,
U_unsafe, L_space, U_space, x, varsigma, f, t,
noise_type="normal", optimize=False, solver="mosek",
confidence=None, gam=None, lam=None, c_val=None,
mean=None, sigma=None, rate=None, a=None, b=None,
l_degree=None)
Searches barrier degrees 2, 4, …, b_degree in parallel. All parameters
are identical to dt_SS except b_degree is the maximum degree.
Note
Must be called inside if __name__ == '__main__': due to Python multiprocessing.
Returns: The result dict from the first successful degree, or None.