Algorithms
Methods to configure, enable, disable and reset algorithms, and to run the solver.
Setup
setupAlgorithms
Configures algorithms from pathwyse.set, or default settings if not found.
setAlgorithms
Sets the algorithms to be used by the solver.
- names (std::vector\<std::string>) — list of algorithm names.
- active (std::vector\<bool>) — enable flags, one per algorithm. All enabled by default if omitted.
addAlgorithm
Appends an algorithm to the solver's list. The first overload creates the algorithm by name; the second registers an externally constructed Algorithm object.
- name (std::string) — algorithm name.
- algorithm (Algorithm&) — reference to a custom Algorithm instance.
changeAlgorithm
Replaces the algorithm at position id. The first overload substitutes by name; the second substitutes with an external object.
- id (int) — algorithm id.
- name (std::string) — algorithm name.
- algorithm (Algorithm&) — reference to a custom Algorithm instance.
clearAlgorithms
Removes all algorithms from the solver.
setAlgorithmsParallel
Sets whether algorithms should run in parallel.
- parallel (bool) —
trueto enable parallel execution.
Enable / disable
enableAlgorithm
Enables the algorithm with the given id.
- id (int) — algorithm id.
disableAlgorithm
Disables the algorithm with the given id.
- id (int) — algorithm id.
enableAllAlgorithms
Enables all algorithms.
disableAllAlgorithms
Disables all algorithms.
Reset
resetAlgorithm
Resets the algorithm with the given id to an unoptimized state.
- id (int) — algorithm id.
- reset_level (int) — should be
0; not used in PathWyse 1.0.
resetAllAlgorithms
Resets all algorithms to an unoptimized state.
- reset_level (int) — should be
0; not used in PathWyse 1.0.
Query
isAlgorithmEnabled
Returns true if the algorithm with the given id is currently enabled.
- id (int) — algorithm id.
getEnabledAlgorithms
Returns the ids of all currently enabled algorithms.
areAlgorithmsParallel
Returns true if algorithms are configured to run in parallel.
getAlgorithm
Returns a pointer to the algorithm with the given id.
- id (int) — algorithm id.
Solve
solve
Solves the problem using the enabled algorithms.