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;
49 friend class boost::serialization::access;
50 template<
class Archive>
51 void serialize(Archive& ar,
const unsigned int version)
53 ar& boost::serialization::make_nvp(
"semodel", boost::serialization::base_object<FMTsemodel>(*
this));
59 AreaConflictDestrutor = 3,
60 AdjacencyConflictDestrutor = 4,
66 FMTmovestats() =
default;
67 FMTmovestats(
const FMTmovestats& rhs) =
default;
68 FMTmovestats& operator=(
const FMTmovestats& rhs) =
default;
77 double ObjectiveImpact;
87 mutable std::vector<FMTmovestats>CycleMoves;
90 double LastGlobalObjectiveValue;
93 mutable std::default_random_engine Generator;
96 std::unique_ptr<Spatial::FMTsaschedule> CoolingSchedule;
99 std::array<size_t, FMTsamove::MoveCount>NotAcceptedMovesCount;
104 FMTsamodel(
const FMTsemodel& rhs);
153 const std::vector<Spatial::FMTcoordinate>* movable,
154 boost::unordered_map<Core::FMTdevelopment, bool>* operability)
const;
161 std::vector<std::vector<Spatial::FMTcoordinate>> selectionpool,
const int& period)
const;
180 const std::vector<Spatial::FMTcoordinate>*movable =
nullptr,
181 boost::unordered_map<Core::FMTdevelopment, bool>*operability=
nullptr)
const;
188 const std::vector<Spatial::FMTcoordinate>*movable =
nullptr,
189 boost::unordered_map<Core::FMTdevelopment, bool>*operability =
nullptr,
190 double initprobability = 0.5,
size_t iterations=10);
210 virtual void swap_ptr(
const std::unique_ptr<FMTmodel>& rhs);
273 virtual bool build(std::vector<Core::FMTschedule> schedules = std::vector<Core::FMTschedule>());
284 virtual std::unique_ptr<FMTmodel>
presolve(std::vector<Core::FMTactualdevelopment> optionaldevelopments = std::vector<Core::FMTactualdevelopment>())
const;
292 virtual std::unique_ptr<FMTmodel>
getcopy(
int period = 0)
const;
309 virtual std::unique_ptr<FMTmodel>
clone() const final;
#define FMTEXPORT
Definition: FMTutility.hpp:92
Definition: FMTmodel.hpp:60
Definition: FMTsamodel.hpp:44
bool AllowMove(const FMTsamove &move) const
void SchedulesBuild(const std::vector< Core::FMTschedule > &schedules)
void UpdateFailedMoveCount()
virtual std::unique_ptr< FMTmodel > clone() const final
std::vector< bool > GetFromBindings(const Spatial::FMTspatialschedule::actionbindings &bindingactions) const
Spatial::FMTspatialschedule DoEventsAdjacencyConflictDestrutorMove(const Spatial::FMTspatialschedule &actual, const Spatial::FMTspatialschedule::actionbindings &bindings) const
virtual void swap_ptr(const std::unique_ptr< FMTmodel > &rhs)
bool AllowAnyMove() const
Spatial::FMTspatialschedule DoLocalMove(const Spatial::FMTspatialschedule &actual, const Spatial::FMTspatialschedule::actionbindings &bindings, const std::vector< Spatial::FMTcoordinate > *movable, boost::unordered_map< Core::FMTdevelopment, bool > *operability) const
void LogCycleStatus() const
Spatial::FMTspatialschedule DoEventsAreaConflictDestrutorMove(const Spatial::FMTspatialschedule &actual, const Spatial::FMTspatialschedule::actionbindings &bindings) const
virtual std::unique_ptr< FMTmodel > getcopy(int period=0) const
size_t GetAcceptedCycleMoves() const
void LogMovesReport() const
void LogSolutionStatus() const
FMTsamodel(const FMTsamodel &rhs)
Copy constructor.
bool isProvenOptimal() const
Spatial::FMTspatialschedule Move(const Spatial::FMTspatialschedule &actual, const Spatial::FMTspatialschedule::actionbindings &bindings, const std::vector< Spatial::FMTcoordinate > *movable=nullptr, boost::unordered_map< Core::FMTdevelopment, bool > *operability=nullptr) const
double Warmup(const Spatial::FMTspatialschedule &actual, const Spatial::FMTspatialschedule::actionbindings &bindings, const std::vector< Spatial::FMTcoordinate > *movable=nullptr, boost::unordered_map< Core::FMTdevelopment, bool > *operability=nullptr, double initprobability=0.5, size_t iterations=10)
virtual std::unique_ptr< FMTmodel > presolve(std::vector< Core::FMTactualdevelopment > optionaldevelopments=std::vector< Core::FMTactualdevelopment >()) const
virtual bool build(std::vector< Core::FMTschedule > schedules=std::vector< Core::FMTschedule >())
FMTsamodel(const FMTmodel &rhs, const Spatial::FMTforest &forest)
Copy constructor to use parent as argument in constructor.
Spatial::FMTspatialschedule DoConflictDestruction(const Spatial::FMTspatialschedule &actual, const Spatial::FMTspatialschedule::actionbindings &bindings, std::vector< std::vector< Spatial::FMTcoordinate > > selectionpool, const int &period) const
FMTsamove GetAMove(const Spatial::FMTspatialschedule &actual, const Spatial::FMTspatialschedule::actionbindings &bindings) const
size_t GetCycleMoves() const
bool isCycleProvenOptimal() const
size_t GetLocalMoveSize() const
bool AllowDestruction(const Spatial::FMTspatialschedule &actual, const Spatial::FMTspatialschedule::actionbindings &bindings) const
FMTsamodel(const FMTmodel &rhs)
Copy constructor to use parent as argument in constructor.
bool IsBetter(const Spatial::FMTspatialschedule &actual, const Spatial::FMTspatialschedule &candidat) const
Spatial::FMTspatialschedule GetRebuild(const Spatial::FMTspatialschedule &actual) const
Definition: FMTsemodel.hpp:33
Definition: FMTforest.hpp:27
Definition: FMTspatialschedule.hpp:44
std::vector< std::vector< Spatial::FMTbindingspatialaction > > actionbindings
Definition: FMTspatialschedule.hpp:49
Namespace for using/building unidirectional graphs in FMT.
Definition: FMTareaparser.hpp:31
Namespace containing all enumerator and classes used to construct or manipulate the different type of...
Definition: FMTareaparser.hpp:50
The spatial namespace provides classes for spatialy explicit simulation/optimization based on raster ...
Definition: FMTareaparser.hpp:36