|
MTCT
Design Automation and Optimization for ETCS Railway Networks
|
Base of every problem instance. More...
#include <GeneralProblemInstance.hpp>
Classes | |
| struct | FeasibilityCheck |
| The outcome of is_obviously_infeasible, with its reason. More... | |
Public Member Functions | |
| virtual void | export_instance (const std::filesystem::path &working_directory) const =0 |
| Exports the instance to the specified working directory. | |
| virtual void | export_instance (const std::string &working_directory) const |
| Exports the instance to the specified working directory. | |
| virtual void | export_instance (char const *const workingDirectory) const |
| Exports the instance to the specified working directory. | |
| virtual bool | check_consistency () const =0 |
| Checks whether the instance is internally consistent. | |
| virtual | ~GeneralProblemInstance ()=default |
| Virtual destructor. | |
| GeneralProblemInstance (const GeneralProblemInstance &)=default | |
| Copy constructor. | |
| GeneralProblemInstance & | operator= (const GeneralProblemInstance &)=default |
| Copy assignment operator. | |
| GeneralProblemInstance (GeneralProblemInstance &&) noexcept=default | |
| Move constructor. | |
| GeneralProblemInstance & | operator= (GeneralProblemInstance &&) noexcept=default |
| Move assignment operator. | |
| const std::string & | get_instance_name () const |
| Gets the instance name. | |
| const std::string & | get_instance_subdirectory () const |
| Provides the instance subdirectory. | |
| void | set_instance_name (std::string_view const instanceName) |
| Sets the instance name. | |
| void | set_instance_subdirectory (std::string_view const instanceSubdirectory) |
| Sets the instance subdirectory. | |
| virtual FeasibilityCheck | is_obviously_infeasible (bool late_entry_allowed) const =0 |
| Checks the instance for reasons that make it infeasible by itself. | |
Protected Member Functions | |
| GeneralProblemInstance ()=default | |
| Initializes the instance with empty name and subdirectory. | |
| GeneralProblemInstance (std::string_view const instanceName, std::string_view const instanceSubdirectory) | |
| Initializes the instance with a name and subdirectory. | |
Base of every problem instance.
An instance knows where it is stored, namely under <working directory>/instances/<subdirectory>/<name>, and how to export itself there. Everything it consists of is added by the derived classes.
|
protecteddefault |
Initializes the instance with empty name and subdirectory.
|
inlineprotected |
Initializes the instance with a name and subdirectory.
| instanceName | The name of the instance; must be a valid folder name. |
| instanceSubdirectory | The subdirectory path; must be a valid folder name. |
| If | either parameter is not a valid folder name. |
|
virtualdefault |
Virtual destructor.
|
default |
Copy constructor.
|
defaultnoexcept |
Move constructor.
|
nodiscardpure virtual |
Checks whether the instance is internally consistent.
Implemented in cda_rail::instances::GeneralPerformanceOptimizationInstance, and cda_rail::instances::GeneralProblemInstanceWithScheduleAndRoutes.
|
inlinevirtual |
Exports the instance to the specified working directory.
| workingDirectory | Path where the instance will be exported. |
Reimplemented in cda_rail::instances::GeneralProblemInstanceWithScheduleAndRoutes.
|
pure virtual |
Exports the instance to the specified working directory.
| working_directory | Base export directory. |
Implemented in cda_rail::instances::GeneralPerformanceOptimizationInstance, and cda_rail::instances::GeneralProblemInstanceWithScheduleAndRoutes.
|
inlinevirtual |
Exports the instance to the specified working directory.
| working_directory | Path to the directory where the instance is exported. |
Reimplemented in cda_rail::instances::GeneralProblemInstanceWithScheduleAndRoutes.
|
inlinenodiscard |
Gets the instance name.
|
inlinenodiscard |
Provides the instance subdirectory.
|
nodiscardpure virtual |
Checks the instance for reasons that make it infeasible by itself.
Only necessary conditions are checked, e.g. whether every train can reach its stations and its exit vertex at all. An instance that passes this check may still turn out to be infeasible once the trains are considered together, which no check can tell without solving the instance.
| late_entry_allowed | Whether trains may enter later than scheduled. If they may not, the scheduled entry times themselves can be checked against each other as well. |
Implemented in cda_rail::instances::GeneralProblemInstanceWithScheduleAndRoutes.
|
default |
Copy assignment operator.
|
defaultnoexcept |
Move assignment operator.
|
inline |
Sets the instance name.
| instanceName | The new instance name; must be a valid folder name. |
| If | the instance name is not a valid folder name. |
|
inline |
Sets the instance subdirectory.
| instanceSubdirectory | The new subdirectory name. |
| std::invalid_argument | If the subdirectory is not a valid folder name. |