Package tulip :: Package abstract :: Module prop2partition
[frames] | no frames]

Module prop2partition

Proposition preserving partition module.

Classes
  PropPreservingPartition
Partition class with following fields:
  PPP
Alias to PropPreservingPartition.
Functions
PropPreservingPartition
prop2part(state_space, cont_props_dict)
Main function that takes a domain (state_space) and a list of propositions (cont_props), and returns a proposition preserving partition of the state space.
(PropPreservingPartition, list)
part2convex(ppp)
This function takes a proposition preserving partition and generates another proposition preserving partition such that each part in the new partition is a convex polytope
(PropPreservingPartition, list, list)
pwa_partition(pwa_sys, ppp, abs_tol=1e-05)
This function takes:
 
add_grid(ppp, grid_size=None, num_grid_pnts=None, abs_tol=1e-10)
This function takes a proposition preserving partition ppp and the size of the grid or the number of grids, and returns a refined proposition preserving partition with grids.
 
compute_interval(low_domain, high_domain, size, abs_tol=1e-07)
Helper implementing intervals computation for each dimension.
 
product_interval(list1, list2)
Helper implementing combination of all intervals for any two interval lists.
(transys.FTS, \dict)
ppp2ts(part)
Derive transition system from proposition preserving partition.
Variables
  logger = logging.getLogger(__name__)
  __package__ = None
hash(x)
Function Details

prop2part(state_space, cont_props_dict)

 

Main function that takes a domain (state_space) and a list of propositions (cont_props), and returns a proposition preserving partition of the state space.

See Also

PropPreservingPartition, polytope.Polytope

Parameters:
  • state_space (polytope.Polytope) - problem domain
  • cont_props_dict (dict of polytope.Polytope) - propositions
Returns: PropPreservingPartition
state space quotient partition induced by propositions

part2convex(ppp)

 

This function takes a proposition preserving partition and generates another proposition preserving partition such that each part in the new partition is a convex polytope

Parameters:
Returns: (PropPreservingPartition, list)
refinement into convex polytopes and map from new to old Regions

pwa_partition(pwa_sys, ppp, abs_tol=1e-05)

 

This function takes:

  • a piecewise affine system pwa_sys and
  • a proposition-preserving partition ppp whose domain is a subset of the domain of pwa_sys

and returns a *refined* proposition preserving partition where in each region a unique subsystem of pwa_sys is active.

Reference

Modified from Petter Nilsson's code implementing merge algorithm in:

Nilsson et al. `Temporal Logic Control of Switched Affine Systems with an Application in Fuel Balancing`, ACC 2012.

See Also

discretize

Parameters:
Returns: (PropPreservingPartition, list, list)
new partition and associated maps:
  • new partition new_ppp
  • map of new_ppp.regions to pwa_sys.list_subsys
  • map of new_ppp.regions to ppp.regions

add_grid(ppp, grid_size=None, num_grid_pnts=None, abs_tol=1e-10)

 

This function takes a proposition preserving partition ppp and the size of the grid or the number of grids, and returns a refined proposition preserving partition with grids.

Input:

  • `ppp`: a PropPreservingPartition object
  • `grid_size`: the size of the grid, type: float or list of float
  • `num_grid_pnts`: the number of grids for each dimension, type: integer or list of integer

Output:

Note: There could be numerical instabilities when the continuous propositions in ppp do not align well with the grid resulting in very small regions. Performace significantly degrades without glpk.

ppp2ts(part)

 

Derive transition system from proposition preserving partition.

Parameters:
Returns: (transys.FTS, \dict)
(ts, state_map) finite transition system labeled with propositions from the given partition, and map of polytope indices to transition system states.