10#include <boost/serialization/serialization.hpp>
11#include <boost/serialization/nvp.hpp>
12#include <boost/serialization/export.hpp>
13#include <boost/serialization/vector.hpp>
18#ifndef FMToperatingareaclusterer_H_INCLUDED
19#define FMToperatingareaclusterer_H_INCLUDED
31 friend class boost::serialization::access;
32 template<
class Archive>
33 void serialize(Archive& ar,
const unsigned int version)
35 ar & boost::serialization::make_nvp(
"FMTlpheuristic", boost::serialization::base_object<FMTlpheuristic>(*
this));
36 ar & BOOST_SERIALIZATION_NVP(clusters);
37 ar & BOOST_SERIALIZATION_NVP(numberofsimulationpass);
42 std::vector<FMToperatingareacluster>clusters;
45 int numberofsimulationpass;
48 int minimalnumberofclusters;
51 int maximalnumberofclusters;
59 std::map<Core::FMTmask,std::vector<FMToperatingareaclusterbinary>>getallbinaries()
const;
64 double calculatetotalarea()
const;
69 inline const double& gettotalarea()
const
77 void addmaxminobjective(
const FMToperatingareacluster& cluster,
const FMToperatingareaclusterbinary& binary,
78 const std::vector<FMToperatingareaclusterbinary>& binaries,
79 const int& clusterid);
85 void buildclustersvariables();
103 void addforcingrows();
108 void addnumberofclusterrows();
113 void addareaconstraints();
119 void setallinteger();
125 double getspreadprobability(
const std::vector<FMToperatingareaclusterbinary>& incluster,
const FMToperatingareaclusterbinary& target)
const;
131 bool spread(
const FMToperatingareacluster& ignition,std::vector<FMToperatingareaclusterbinary>& assigned);
136 double gettargetedoperatingareasize(
const FMToperatingareacluster& target);
141 bool isvalidarea(
const FMToperatingareacluster& cluster,
142 const double& area,
const size_t& actives)
const;
152 std::vector<int>getbinariesvariables()
const;
164 const size_t& lseed,
const std::vector<FMToperatingareacluster>& lclusters,
165 int minimalnumberofclusters = -1,
int maximalnumberofclusters = -1);
203 bool branchnboundsolve() final;
#define FMTEXPORT
Definition: FMTutility.hpp:92
Definition: FMTlpheuristic.hpp:40
Definition: FMToperatingareacluster.hpp:28
Definition: FMToperatingareaclusterer.hpp:30
bool initialsolve() final
void setnumberofsimulationpass(const int &pass)
FMToperatingareaclusterer()=default
size_t getbinariescount() const
FMToperatingareaclusterer(const Models::FMTsolverinterface &interfacetype, const size_t &lseed, const std::vector< FMToperatingareacluster > &lclusters, int minimalnumberofclusters=-1, int maximalnumberofclusters=-1)
~FMToperatingareaclusterer()=default
FMToperatingareaclusterer(const FMToperatingareaclusterer &)
Namespace regrouping all tools for solving LP/MIP problems using an heuristic.
Definition: FMTareaparser.hpp:43
FMTsolverinterface
Definition: FMTsolverinterface.hpp:21