Config module¶
Config contains essential setup for the simulation study.
- class Config.Config¶
Bases:
object
- __wgs_polygon_border¶
the polygon used to define the border.
- Type
np.ndarray
- __wgs_polygon_obstacle¶
polygons used for identifying collisions.
- Type
np.ndarray
- __wgs_loc_start¶
starting location: (lat, lon) used to define the starting location for the long horizon operation.
- Type
np.ndarray
- __wgs_loc_end¶
end location: (lat, lon) used to define the end location for the long horizon operation.
- Type
np.ndarray
- __polygon_border¶
the polygon used to define the border in local Cartesian coordinate system.
- Type
np.ndarray
- __polygon_border_shapely¶
shapely object to detect collision or border.
- Type
shapely.geometry.polygon.Polygon
- __line_border_shapely¶
shapely object to detect collision or border.
- Type
shapely.geometry.linestring.LineString
- __polygon_obstacle¶
polygons used for identifying collisions in local Cartesian coordinate system.
- Type
np.ndarray
- __polygon_obstacle_shapely¶
shapely object to detect collision with obstacles.
- Type
shapely.geometry.polygon.Polygon
- __line_obstacle_shapely¶
shapely object to detect collision with obstacles.
- Type
shapely.geometry.linestring.LineString
- __loc_start¶
starting location: (x, y) used to define the starting location for the long horizon operation.
- Type
np.ndarray
- __loc_end¶
end location: (x, y) used to define the end location for the long horizon operation.
- Type
np.ndarray
- __num_steps¶
number of steps in the simulation.
- Type
int
- __num_replicates¶
number of replicates in the simulation.
- Type
int
- __num_cores¶
number of cores used in the simulation.
- Type
int
- get_line_border_shapely() shapely.geometry.LineString ¶
Return linestring of polygon border.
- Parameters
None –
- Returns
linestring of polygon border.
- Return type
LineString
- get_line_obstacle_shapely() shapely.geometry.LineString ¶
Return linestring of polygon obstacle.
- Parameters
None –
- Returns
linestring of polygon obstacle.
- Return type
LineString
- get_loc_end() numpy.ndarray ¶
Return starting location in (x, y).
- Parameters
None –
- Returns
starting location in (x, y).
- Return type
np.ndarray
- get_loc_start() numpy.ndarray ¶
Return starting location in (x, y).
- Parameters
None –
- Returns
starting location in (x, y).
- Return type
np.ndarray
- get_num_cores() int ¶
Return the number of cores in the simulation study.
- Parameters
None –
- Returns
number of cores in the simulation study.
- Return type
int
- get_num_replicates() int ¶
Return the number of replicates in the simulation study.
- Parameters
None –
- Returns
number of replicates in the simulation study.
- Return type
int
- get_num_steps() int ¶
Return the number of steps in the simulation study.
- Parameters
None –
- Returns
number of steps in the simulation study.
- Return type
int
- get_polygon_border() numpy.ndarray ¶
Return polygon for the operational area in x y coordinates.
- Parameters
None –
- Returns
polygon for the operational area in x y coordinates.
- Return type
np.ndarray
- get_polygon_border_shapely() shapely.geometry.Polygon ¶
Return shapelized polygon for the operational area in xy coordinates.
- Parameters
None –
- Returns
shapelized polygon for the operational area in xy coordinates.
- Return type
Polygon
- get_polygon_obstacle() numpy.ndarray ¶
Return polygon for the obstacle.
- Parameters
None –
- Returns
polygon for the obstacle.
- Return type
np.ndarray
- get_polygon_obstacle_shapely() shapely.geometry.Polygon ¶
Return shapelized polygon for the obstacle.
- Parameters
None –
- Returns
shapelized polygon for the obstacle.
- Return type
Polygon
- get_wgs_loc_end() numpy.ndarray ¶
Return starting location in (lat, lon).
- Parameters
None –
- Returns
starting location in (lat, lon).
- Return type
np.ndarray
- get_wgs_loc_start() numpy.ndarray ¶
Return starting location in (lat, lon).
- Parameters
None –
- Returns
starting location in (lat, lon).
- Return type
np.ndarray
- get_wgs_polygon_border() numpy.ndarray ¶
Return polygon for the oprational area in wgs coordinates.
- Parameters
None –
- Returns
polygon for the oprational area in wgs coordinates.
- Return type
np.ndarray
- get_wgs_polygon_obstacle() numpy.ndarray ¶
Return polygon for the oprational area in wgs coordinates.
- Parameters
None –
- Returns
polygon for the oprational area in wgs coordinates.
- Return type
np.ndarray
- set_loc_end(loc: numpy.ndarray) None ¶
Set the starting location with (lat,lon).
- Parameters
loc (np.ndarray) – starting location with (lat,lon).
- Returns
None
- set_loc_start(loc: numpy.ndarray) None ¶
Set the starting location with (lat,lon).
- Parameters
loc (np.ndarray) – starting location with (lat,lon).
- Returns
None
- set_num_cores(value: int) None ¶
Set the number of cores to use in the simulation study.
- Parameters
value (int) – number of cores to use in the simulation study.
- Returns
None
- set_num_replicates(value: int) None ¶
Set the number of replicates in the simulation study.
- Parameters
value (int) – number of replicates in the simulation study.
- Returns
None
- set_num_steps(value: int) None ¶
Set the number of steps in the simulation to be an integer value.
- Parameters
value (int) – number of steps in the simulation.
- Returns
None
- set_polygon_border(value: numpy.ndarray) None ¶
Set operational area using polygon defined by lat lon coordinates.
- Parameters
value (np.ndarray) – polygon defined by lat lon coordinates.
Example –
- value: np.ndarray([[lat1, lon1],
[lat2, lon2], … [latn, lonn]])
- Returns
None
- set_polygon_obstacle(value: numpy.ndarray) None ¶
Set polygon obstacle using polygon defined by lat lon coordinates.
- Parameters
value (np.ndarray) – polygon defined by lat lon coordinates.
Example –
- value: np.ndarray([[lat1, lon1],
[lat2, lon2], … [latn, lonn]])
- Returns
None
- static wgs2xy(value: numpy.ndarray) numpy.ndarray ¶
Convert polygon containing wgs coordinates to polygon containing xy coordinates.
- Parameters
value (np.ndarray) – polygon containing wgs coordinates.
- Returns
polygon containing xy coordinates.
- Return type
np.ndarray