plafosim.algorithms.dummy module
- class plafosim.algorithms.dummy.Dummy(owner: object, dummy: int = -1, **kw_args)[source]
Bases:
FormationAlgorithmDummy Platoon Formation Algorithm.
- __init__(owner: object, dummy: int = -1, **kw_args)[source]
Initialize an instance of this formation algorithm to be used in a vehicle or an infrastructure.
- Parameters:
owner (object) – The owning object that is execution this algorithm. This can be either a PlatooningVehicle or an Infrastructure.
dummy (int, optional) – The value for the dummy parameter
- classmethod add_parser_argument_group(parser: ArgumentParser) _ArgumentGroup[source]
Create and return specific argument group for this algorithm to use in global argument parser.
- Parameters:
parser (argparse.ArgumentParser) – The global argument parser
- Returns:
The specific argument group for this algorithm
- Return type:
argparse._ArgumentGroup
- do_formation()[source]
Run platoon formation algorithm to search for a platooning opportunity and perform the corresponding join maneuver.
- finish()[source]
Clean up the instance of the formation algorithm.
This includes mostly statistic recording.
- _abc_impl = <_abc_data object>
- property name
Print the name of the formation algorithm.
- class plafosim.algorithms.dummy.FormationAlgorithm(owner: object)[source]
Bases:
ABCAbstract base class for any type of platoon formation algorithm (i.e., assignment calculation).
Implementing sub-classes need to override the do_formation() method.
- __init__(owner: object)[source]
Initialize an instance of a formation algorithm.
- Parameters:
owner (object) – The owning object that is execution this algorithm. This can be either a PlatooningVehicle or an Infrastructure.
- abstract add_parser_argument_group(parser: ArgumentParser) _ArgumentGroup[source]
Abstract method for performing any type of platoon formation (i.e., assignment calculation).
This methods needs to be overridden in implementing sub-classes.
- Returns:
The specific argument group for this algorithm.
- Return type:
argparse._ArgumentGroup
- abstract do_formation()[source]
Abstract method for performing any type of platoon formation (i.e., assignment calculation).
This methods needs to be overridden in implementing sub-classes.
- _abc_impl = <_abc_data object>
- property name
Print the name of the formation algorithm.