15#include <boost/serialization/vector.hpp>
16#include <boost/serialization/serialization.hpp>
17#include <boost/serialization/nvp.hpp>
18#include <boost/serialization/export.hpp>
24 class FMTExponentialSchedule;
65 virtual bool build(std::vector<Core::FMTSchedule> schedules = std::vector<Core::FMTSchedule>());
78 virtual std::unique_ptr<FMTModel>
preSolve(std::vector<Core::FMTActualDevelopment> optionaldevelopments = std::vector<Core::FMTActualDevelopment>())
const;
86 virtual std::unique_ptr<FMTModel>
getCopy(
int period = 0)
const;
128 virtual std::unique_ptr<FMTModel>
clone() const final;
151 friend class
boost::serialization::access;
152 template<class Archive>
153 void serialize(Archive& ar, const
unsigned int version)
155 ar& boost::serialization::make_nvp(
"semodel", boost::serialization::base_object<FMTSeModel>(*
this));
160 AreaConflictDestrutor = 2,
161 AdjacencyConflictDestrutor = 3,
162 GroupsConflictDestructor = 4,
173 static std::string getMovesName(FMTsamove p_move);
177 FMTMoveStats() =
default;
178 FMTMoveStats(
const FMTMoveStats& rhs) =
default;
179 FMTMoveStats& operator=(
const FMTMoveStats& rhs) =
default;
188 double ObjectiveImpact;
198 mutable std::vector<FMTMoveStats>m_CycleMoves;
201 std::unique_ptr<Spatial::FMTSaSchedule>m_CoolingSchedule;
204 std::array<size_t, FMTsamove::MoveCount>m_NotAcceptedMovesCount;
207 double m_BestObjective;
213 FMTSaModel(
const FMTSeModel& rhs);
219 bool _doWriteDisturbances()
const;
224 void _writeDisturbances()
const;
238 size_t _getCycleMoves()
const;
244 size_t _getAcceptedCycleMoves()
const;
281 bool _allowMove(
const FMTsamove& move)
const;
287 bool _allowAnyMove()
const;
302 bool _isBetter(
double p_candidatObjective)
const;
323 std::vector<std::vector<Spatial::FMTCoordinate>> selectionpool,
const int& period)
const;
391 void _schedulesBuild(
const std::vector<Core::FMTSchedule>&schedules);
397 size_t _getLocalMoveSize()
const;
404 size_t _getMaximalMoveSize(
size_t p_MaxSize)
const;
411 size_t _getRandomMoveSize(
size_t p_MaxSize)
const;
424 bool _isCycleProvenOptimal()
const;
429 void _doFactorization();
434 void _logSolutionStatus()
const;
439 void _logCycleStatus()
const;
449 void _UpdateFailedMoveCount();
477 double p_ObjectiveValue);
490 double& p_SpatialRatio,
double& p_InventoryRatio,
double& p_TotalRatiom,
491 double& p_PrimalInf)
const;
498 void _resetTabouMoves();
505 std::vector<FMTsamove> _getNonTabouMoves()
const;
#define FMTEXPORT
Definition: FMTutility.h:125
Type III LP forest planning model, with the graph divided per period.
Definition: FMTLpModel.h:54
Base class for the different models in FMT.
Definition: FMTModel.h:62
Area restricted model (ARM) using the simulated annealing meta-heuristic to solve the spatial optimiz...
Definition: FMTSaModel.h:40
bool isProvenOptimal() const
Return true if the solution is optimal based on the termination criteria.
virtual std::unique_ptr< FMTModel > clone() const final
Get a clone of the FMTSaModel.
FMTSaModel(const FMTSaModel &rhs)
Copy constructor for FMTSaModel.
bool initialSolve()
Try to solve the model from a cold start.
FMTSaModel(const FMTModel &rhs)
Construct a FMTSaModel from a FMTModel, using the parent as argument.
virtual bool build(std::vector< Core::FMTSchedule > schedules=std::vector< Core::FMTSchedule >())
Try to build the spatial schedule from a schedule if one is provided, otherwise randomly build the mo...
virtual std::unique_ptr< FMTModel > getCopy(int period=0) const
Return a copy of the FMTModel for the selected period.
FMTSaModel(const FMTModel &rhs, const Spatial::FMTForest &forest)
Construct a FMTSaModel from a FMTModel and a forest.
~FMTSaModel()
Destructor for FMTSaModel.
FMTSaModel()=default
Default constructor for FMTSaModel.
virtual bool solve()
Call initialSolve on the solver.
void logMovesReport() const
Log the moves report.
virtual std::unique_ptr< FMTModel > preSolve(std::vector< Core::FMTActualDevelopment > optionaldevelopments=std::vector< Core::FMTActualDevelopment >()) const
Return a presolved copy of the model using a vector of developments and the actual transitions,...
Abstract class for spatially explicit models, parent of FMTSesModel and FMTSaModel.
Definition: FMTSeModel.h:33
Spatially referenced layer of Core::FMTDevelopment representing the forest.
Definition: FMTForest.h:33
Map containing a line graph for each cell, representing the stand, the action and the transition at e...
Definition: FMTSpatialSchedule.h:50
std::vector< std::vector< Spatial::FMTBindingSpatialAction > > actionbindings
Definition: FMTSpatialSchedule.h:52
Definition: FMTAreaParser.h:35
Namespace containing all enumerator and classes used to construct or manipulate the different type of...
Definition: FMTAreaParser.h:54
Definition: FMTAreaParser.h:40
Definition: FMTAction.h:463