FMT 1.2.0
Forest management tools for forest planning
Loading...
Searching...
No Matches
Public Member Functions | List of all members
Heuristics::FMTLpHeuristicMtHandler Class Reference

Multithreading handler running several LP heuristics in parallel and keeping the best solution. More...

#include <FMTLpHeuristicMtHandler.h>

Public Member Functions

 FMTLpHeuristicMtHandler ()
 Default constructor for FMTLpHeuristicMtHandler.
 
 FMTLpHeuristicMtHandler (std::vector< FMTOperatingAreaScheduler > &lheuristics, const double &linitialsolution)
 Construct a FMTLpHeuristicMtHandler from operating area schedulers and an initial solution.
 
 FMTLpHeuristicMtHandler (std::vector< FMTOperatingAreaClusterer > &lheuristics, const double &linitialsolution)
 Construct a FMTLpHeuristicMtHandler from operating area clusterers and an initial solution.
 
size_t initialSolve () const
 Solve each heuristic in parallel to find an initial solution and return the index of the best one.
 
size_t greedySolve (const unsigned int &iterations, const double &maxtime) const
 Improve the solution of each heuristic in parallel with greedy passes and return the index of the best one.
 

Detailed Description

Multithreading handler running several LP heuristics in parallel and keeping the best solution.

Constructor & Destructor Documentation

◆ FMTLpHeuristicMtHandler() [1/3]

Heuristics::FMTLpHeuristicMtHandler::FMTLpHeuristicMtHandler ( )

Default constructor for FMTLpHeuristicMtHandler.

◆ FMTLpHeuristicMtHandler() [2/3]

Heuristics::FMTLpHeuristicMtHandler::FMTLpHeuristicMtHandler ( std::vector< FMTOperatingAreaScheduler > &  lheuristics,
const double &  linitialsolution 
)

Construct a FMTLpHeuristicMtHandler from operating area schedulers and an initial solution.

Parameters
[in]lheuristicsthe scheduler heuristics.
[in]linitialsolutionthe initial solution value.

◆ FMTLpHeuristicMtHandler() [3/3]

Heuristics::FMTLpHeuristicMtHandler::FMTLpHeuristicMtHandler ( std::vector< FMTOperatingAreaClusterer > &  lheuristics,
const double &  linitialsolution 
)

Construct a FMTLpHeuristicMtHandler from operating area clusterers and an initial solution.

Parameters
[in]lheuristicsthe clusterer heuristics.
[in]linitialsolutionthe initial solution value.

Member Function Documentation

◆ greedySolve()

size_t Heuristics::FMTLpHeuristicMtHandler::greedySolve ( const unsigned int &  iterations,
const double &  maxtime 
) const

Improve the solution of each heuristic in parallel with greedy passes and return the index of the best one.

Parameters
[in]iterationsthe number of iterations.
[in]maxtimethe maximum time.
Returns
the best heuristic index.

◆ initialSolve()

size_t Heuristics::FMTLpHeuristicMtHandler::initialSolve ( ) const

Solve each heuristic in parallel to find an initial solution and return the index of the best one.

Returns
the best heuristic index.

The documentation for this class was generated from the following file: