geoVeRoPy.obj2Obj module¶
- geoVeRoPy.obj2Obj.circle2CirclePath(startPt: list[float] | tuple[float, float], endPt: list[float] | tuple[float, float], circles: list[dict], algo: str = 'SOCP', **kwargs)[source]¶
Given a starting point, a list of circles, and an ending point, returns a shortest route that starts from startPt, visits every polys in given order, and returns to the ending point.
- Parameters:
startPt (pt, required, default None) – The coordinate which starts the path.
endPt (pt, required, default None) – The coordinate which ends the path.
circles (dict, required) – A list of circles modeled by dictionaries to be visited in given sequence. Each circle is dictionary with two fields: ‘radius’ and ‘center’.
algo (str, optional, default as 'SOCP') –
Select the algorithm for calculating the shortest path. Options and required additional inputs are as follows:
- (default) ‘SOCP’, use Second-order Cone Programing method.
solver: str, optional, now supports ‘Gurobi’ and ‘COPT’
timeLimit: int|float, additional stopping criteria
gapTolerance: int|float, additional stopping criteria
outputFlag: bool, True if turn on the log output from solver. Default to be False
**kwargs (optional) – Provide additional inputs for different edges options and algo options
- Returns:
Two fields in the dictionary, ‘dist’ indicates the distance of the path, ‘path’ indicates the travel path.
- Return type:
dict
- geoVeRoPy.obj2Obj.cone2ConePath(startPt: list[float] | tuple[float, float], endPt: list[float] | tuple[float, float], cones: dict, repSeq: list, tanAlpha: float, config=None)[source]¶
- geoVeRoPy.obj2Obj.poly2PolyPath(startPt: list[float] | tuple[float, float], endPt: list[float] | tuple[float, float], polys: list[list[list[float]]] | list[list[tuple[float, float]]], algo: str = 'SOCP', **kwargs)[source]¶
Given a starting point, a list of polys, and an ending point, returns a shortest route that starts from startPt, visits every polys in given order, and returns to the ending point.
- Parameters:
startPt (pt, required, default None) – The coordinate which starts the path.
endPt (pt, required, default None) – The coordinate which ends the path.
polys (polys, required) – A list of polys to be visited in given sequence
algo (str, optional, default as 'SOCP') –
Select the algorithm for calculating the shortest path. Options and required additional inputs are as follows:
- (default) ‘SOCP’, use Second-order Cone Programing method.
solver: str, optional, now only supports ‘Gurobi’
timeLimit: int|float, additional stopping criteria
gapTolerance: int|float, additional stopping criteria
outputFlag: bool, True if turn on the log output from solver. Default to be False
- ’AdaptIter’, use adapt iteration algorithm
errorTol: float, optional, error tolerance
**kwargs (optional) – Provide additional inputs for different edges options and algo options
- Returns:
Two fields in the dictionary, ‘dist’ indicates the distance of the path, ‘path’ indicates the travel path.
- Return type:
dict