rtac.rtac
This module contains classes that guide the RTAC process according to method.
Functions
|
Class factory to return the initialized RTAC class appropriate to the RTAC method scenario.ac. |
Classes
|
Realtime Algorithm Configuration class. |
|
Implementation of ReACTR. |
|
Implementation of ReACTR++. |
- class rtac.rtac.AbstractRTAC(scenario: Namespace)[source]
Bases:
ABCRealtime Algorithm Configuration class.
- Parameters:
scenario (argparse.Namespace) – Namespace containing all settings for the RTAC.
- class rtac.rtac.RTAC(scenario: Namespace)[source]
Bases:
AbstractRTACImplementation of ReACTR.
- Parameters:
scenario (argparse.Namespace) – Namespace containing all settings for the RTAC.
- black_box(instance: str | None = None) None[source]
Solves problem instance and performs all associated functionalities.
- Parameters:
instance (str) – Path to problem instance. Defaults to None.
- Return type:
None
- gray_box(instance: str, next_instance: str | None = None, early_rtac_data: RTACData | RTACDatapp | None = None) None[source]
Solves problem instance and performs all associated functionalities.
- Parameters:
instance (str) – Path to problem instance.
next_instance (str) – Path to next problem instance. Defaults to None.
early_rtac_data (RTACData | RTACDatapp) – Object containing data and objects necessary throughout the RTAC modules.
- Return type:
None
- plot_performances(results: bool = False, times: bool = False) None[source]
Plots results of the logged RTAC run and saves figure.
- Parameters:
results (bool) – True if objective value minimization scenario. Defaults to False.
times (bool) – True if runtime minimization scenario. Defaults to False.
- Return type:
None
- Raises:
NotImplementedError – This method is not implemented yet.
- provide_early_instance(early_instance: str) None[source]
If next instance is available early, use this function to pass it to the gray-box RAC method.
- Parameters:
early_instance (str) – Path to next problem instance. Defaults to None.
- Return type:
None
- result_output(instance: str) None[source]
Print result to terminal.
- Parameters:
instance (str) – Path to problem instance.
- Return type:
None
- solve_instance(instance: str, next_instance: str | None = None, early_rtac_data: RTACData | RTACDatapp | None = None) None[source]
Solve problem instance.
- Parameters:
instance (str) – Path to problem instance.
next_instance (str) – Path to next problem instance. Defaults to None.
early_rtac_data (RTACData | RTACDatapp) – Object containing data and objects necessary throughout the RTAC modules.
- Return type:
None
- rtac.rtac.rtac_factory(scenario: Namespace) AbstractRTAC[source]
Class factory to return the initialized RTAC class appropriate to the RTAC method scenario.ac.
- Parameters:
scenario (argparse.Namespace) – Namespace containing all settings for the RTAC.
- Returns:
Initialized AbstractRTAC object matching the RTAC method of the scenario.
- Return type: