LIRRA  1.0.0
Loading...
Searching...
No Matches
rl_stl.stl.nahs.PatrolTask Class Reference

Public Member Functions

 __post_init__ (self)
 
int dim (self)
 
str base_spec (self)
 
bool uncertain (self)
 
bool interval_predicates (self)
 
str exact_spec (self)
 
STLFormula outside_formula (self)
 
STLFormula formula (self)
 
STLFormula interval_formula (self)
 
STLFormula true_formula (self, dict region)
 
dict sample_true_region (self, np.random.Generator rng)
 
int horizon (self)
 
int terminal_block (self)
 
np.ndarray waypoints (self)
 

Public Attributes

 spec
 
 half_width
 
 dim
 
 base_spec
 
 dt
 

Static Public Attributes

SpecName spec = "theta"
 
float dt = 0.5
 
float half_width = 1.41
 
float waypoint_radius = 1.52
 
float waypoint_tol = 0.1
 
float altitude = 1.5
 
float workspace = 2.5
 
float theta_seconds = 4.0
 
float phi_eventually_seconds = 3.0
 
float phi_always_seconds = 1.0
 
float pred_offset = 0.05
 
float pred_rotation = 0.05
 
bool nominal_predicates = False
 

Protected Member Functions

STLFormula _temporal (self, STLFormula not_s)
 

Detailed Description

Geometry and timing of the NAHS patrol experiment (all lengths in metres).

Member Function Documentation

◆ __post_init__()

rl_stl.stl.nahs.PatrolTask.__post_init__ (   self)

◆ _temporal()

STLFormula rl_stl.stl.nahs.PatrolTask._temporal (   self,
STLFormula  not_s 
)
protected

◆ base_spec()

str rl_stl.stl.nahs.PatrolTask.base_spec (   self)
Temporal structure: ``theta`` (24) or ``phi`` (25).

◆ dim()

int rl_stl.stl.nahs.PatrolTask.dim (   self)
Dimension of the STL signal (planar position, or 3-D position for the cube specs).

◆ exact_spec()

str rl_stl.stl.nahs.PatrolTask.exact_spec (   self)
The exact counterpart (``theta_plus_u -> theta_plus``).

◆ formula()

STLFormula rl_stl.stl.nahs.PatrolTask.formula (   self)
The per-window formula psi (24) or (25) (or its cube version) in steps.

◆ horizon()

int rl_stl.stl.nahs.PatrolTask.horizon (   self)
Formula horizon ``h`` in steps.

◆ interval_formula()

STLFormula rl_stl.stl.nahs.PatrolTask.interval_formula (   self)
psi with the interval predicates (``_u`` specs, also under the nominal ablation).

◆ interval_predicates()

bool rl_stl.stl.nahs.PatrolTask.interval_predicates (   self)
The planning formula uses interval predicates (``_u`` spec without the nominal ablation).

◆ outside_formula()

STLFormula rl_stl.stl.nahs.PatrolTask.outside_formula (   self)
``x notin S`` of the planning formula (interval predicates for the ``_u`` specs).

◆ sample_true_region()

dict rl_stl.stl.nahs.PatrolTask.sample_true_region (   self,
np.random.Generator  rng 
)
A true keep-out region inside the predicate uncertainty set (uniform half-width; 2-D: uniform
angle in ``[-pred_rotation, pred_rotation]``; 3-D: uniform axis on the sphere, uniform angle in
``[0, pred_rotation]``). Exact specs: the nominal region.

◆ terminal_block()

int rl_stl.stl.nahs.PatrolTask.terminal_block (   self)
Number ``b`` of consecutive terminal states that must lie in one face set.

theta needs one outside sample per window: a single terminal state in an invariant
subset of ``S^c`` keeps every later window satisfied (b = 1). phi needs
``G_[0,hG]``: ``b = hG + 1`` consecutive outside samples in the same face set.

◆ true_formula()

STLFormula rl_stl.stl.nahs.PatrolTask.true_formula (   self,
dict  region 
)
psi with the exact predicates of a true region (:meth:`sample_true_region`).

◆ uncertain()

bool rl_stl.stl.nahs.PatrolTask.uncertain (   self)
``_u`` spec: the true keep-out region is uncertain (scored against a drawn true region).

◆ waypoints()

np.ndarray rl_stl.stl.nahs.PatrolTask.waypoints (   self)
Patrol waypoints ``(n_wp, dim)``: face centres of ``S`` moved outward by
``waypoint_radius - half_width``. 2-D: ``(0, r), (r, 0), (0, -r), (-r, 0)``; cube:
``+y, +x, +z, -y, -x, -z`` (consecutive faces adjacent).

Member Data Documentation

◆ altitude

float rl_stl.stl.nahs.PatrolTask.altitude = 1.5
static

◆ base_spec

rl_stl.stl.nahs.PatrolTask.base_spec

◆ dim

rl_stl.stl.nahs.PatrolTask.dim

◆ dt [1/2]

float rl_stl.stl.nahs.PatrolTask.dt = 0.5
static

◆ dt [2/2]

rl_stl.stl.nahs.PatrolTask.dt

◆ half_width [1/2]

float rl_stl.stl.nahs.PatrolTask.half_width = 1.41
static

◆ half_width [2/2]

rl_stl.stl.nahs.PatrolTask.half_width

◆ nominal_predicates

bool rl_stl.stl.nahs.PatrolTask.nominal_predicates = False
static

◆ phi_always_seconds

float rl_stl.stl.nahs.PatrolTask.phi_always_seconds = 1.0
static

◆ phi_eventually_seconds

float rl_stl.stl.nahs.PatrolTask.phi_eventually_seconds = 3.0
static

◆ pred_offset

float rl_stl.stl.nahs.PatrolTask.pred_offset = 0.05
static

◆ pred_rotation

float rl_stl.stl.nahs.PatrolTask.pred_rotation = 0.05
static

◆ spec [1/2]

SpecName rl_stl.stl.nahs.PatrolTask.spec = "theta"
static

◆ spec [2/2]

rl_stl.stl.nahs.PatrolTask.spec

◆ theta_seconds

float rl_stl.stl.nahs.PatrolTask.theta_seconds = 4.0
static

◆ waypoint_radius

float rl_stl.stl.nahs.PatrolTask.waypoint_radius = 1.52
static

◆ waypoint_tol

float rl_stl.stl.nahs.PatrolTask.waypoint_tol = 0.1
static

◆ workspace

float rl_stl.stl.nahs.PatrolTask.workspace = 2.5
static

The documentation for this class was generated from the following file: