FMT 0.9.8
Forest management tools for forest planning
Loading...
Searching...
No Matches
FMTspatialschedule.hpp
Go to the documentation of this file.
1/*
2Copyright (c) 2019 Gouvernement du Québec
3
4SPDX-License-Identifier: LiLiQ-R-1.1
5License-Filename: LICENSES/EN/LiLiQ-R11unicode.txt
6*/
7#ifndef FMTSPATIALSCHEDULE_H
8#define FMTSPATIALSCHEDULE_H
9
10#include "FMTlayer.hpp"
11#include "FMTlinegraph.hpp"
12#include "FMTeventcontainer.hpp"
15
16namespace Core {
17 class FMTGCBMtransition;
18 class FMToutput;
19 class FMTmodel;
20 class FMTconstraint;
21 class FMTyields;
22 class FMTaction;
23 class FMTdevelopment;
24}
25
26
27
28namespace Spatial
29{
30class FMTforest;
32 {
34 FMTpartial = 2
35 };
36
37// DocString: FMTspatialschedule
43class FMTEXPORT FMTspatialschedule : public FMTlayer<Graph::FMTlinegraph>
44{
45 mutable FMTspatialnodescache cache;
46 FMTspatialscheduletype scheduletype;
47 std::vector<double>constraintsfactor;
48 public:
49 typedef std::vector<std::vector<Spatial::FMTbindingspatialaction>> actionbindings;
50 // DocString: FMTspatialschedule(FMTspatialschedule&&)
55 // DocString: FMTspatialschedule()
60 // DocString: FMTspatialschedule(const FMTforest)
65 FMTspatialschedule(const FMTforest& initialmap);
66 // DocString: ~FMTspatialschedule()
70 virtual ~FMTspatialschedule() = default;
71 // DocString: FMTspatialschedule(const FMTspatialschedule)
76 // DocString: FMTspatialschedule(const FMTspatialschedule,const std::vector<FMTcoordinate>)
81 const std::vector<FMTcoordinate>::const_iterator& firstcoord,
82 const std::vector<FMTcoordinate>::const_iterator& endcoord);
83 // DocString: FMTspatialschedule::=
88 // DocString: FMTspatialschedule::==
92 bool operator == (const FMTspatialschedule& rhs)const;
93 // DocString: FMTspatialschedule::!=
97 bool operator != (const FMTspatialschedule& rhs)const;
98 // DocString: FMTspatialschedule::empty
102 bool empty() const {return mapping.empty();};
103 // DocString: FMTspatialschedule::actperiod
107 int actperiod() const;
108 // DocString: FMTspatialschedule::copyfromselected(const FMTspatialschedule, const std::vector<size_t>)
112 bool copyfromselected(const FMTspatialschedule& rhs, const std::vector<size_t>& selected);
113 // DocString: FMTspatialschedule::swapfromselected
117 bool swapfromselected(FMTspatialschedule& rhs, const std::vector<size_t>& selected);
118 // DocString: FMTspatialschedule::getforestperiod
122 FMTforest getforestperiod(const int& period,bool periodstart=false) const;
123 // DocString: FMTspatialschedule::allow_action
128 bool allow_action(const int& targetaction,const std::vector<Spatial::FMTbindingspatialaction>&bindingactions,const FMTcoordinate& location, const int& period) const;
129 // DocString: FMTspatialschedule::getupdatedscheduling
133 std::vector<std::set<Spatial::FMTcoordinate>>getupdatedscheduling(
134 const Models::FMTmodel& model,
135 const std::vector<int>& actiontargets,
136 boost::unordered_map<Core::FMTdevelopment, std::vector<bool>>& cachedaction,
137 const std::vector<boost::unordered_set<Core::FMTdevelopment>>& scheduleoperabilities,
138 bool schedule_only = true,
139 std::vector<std::set<Spatial::FMTcoordinate>> original= std::vector<std::set<Spatial::FMTcoordinate>>(),
140 std::vector<FMTcoordinate> updatedcoordinate= std::vector<FMTcoordinate>()) const;
141
142 // DocString: FMTspatialschedule::evaluatespatialconstraint
146 double evaluatespatialconstraint(const Core::FMTconstraint& spatialconstraint,
147 const Models::FMTmodel& model/*, const FMTeventcontainer* subset = nullptr*/) const;
148 // DocString: FMTspatialschedule::evaluatedistance
152 /*double evaluatedistance(const FMTevent& eventof,
153 const double& lowerdistancetoevent,
154 const double& upperdistancetoevent,
155 const int& period, const std::vector<bool>& actionsused,
156 std::unordered_set<size_t>& relations,
157 const std::vector<FMTeventcontainer::const_iterator>& events) const;*/
158 // DocString: FMTspatialschedule::verifyspatialfeasability
163 std::set<FMTcoordinate> verifyspatialfeasability(const int& targetaction,
164 const std::vector<Spatial::FMTbindingspatialaction>& bindingactions,
165 const int& period, const std::set<FMTcoordinate>& operables) const;
166 // DocString: FMTspatialschedule::buildharvest
170 FMTeventcontainer buildharvest(const double& target, const Spatial::FMTbindingspatialaction& targetaction, std::default_random_engine& generator, std::set<FMTcoordinate> mapping_pass,
171 const int& previousperiod, const int& actionid, std::vector<FMTcoordinate>& operated) const;
172 // DocString: FMTspatialschedule::operateevents
176 double operateevents(const FMTeventcontainer& cuts,const Core::FMTaction& action, const int& action_id, const Core::FMTtransition& Transition,
177 const Core::FMTyields& ylds, const std::vector<Core::FMTtheme>& themes);
178 // DocString: FMTspatialschedule::operatecoord
182 void operatecoord(const FMTcoordinate& coord,const Core::FMTaction& action, const int& action_id, const FMTbindingspatialaction& bindingspaction, const Core::FMTtransition& Transition,
183 const Core::FMTyields& ylds, const std::vector<Core::FMTtheme>& themes);
184 // DocString: FMTspatialschedule::grow
188 void grow();
189 // DocString: FMTspatialschedule::setnewperiod
193 //void setnewperiod();
194 // DocString: FMTspatialschedule::getschedules
198 std::vector<Core::FMTschedule> getschedules(const std::vector<Core::FMTaction>& modelactions,bool withlock=false) const;
199 // DocString: FMTspatialschedule::getgraphsoutputs
203 std::vector<double> getgraphsoutputs(const Models::FMTmodel& model, const Core::FMTconstraint& constraint,
204 const FMTspatialschedule* friendlysolution = nullptr) const;
205 // DocString: FMTspatialschedule::isbetterthan
210 std::vector<int> isbetterthan(const FMTspatialschedule& newsolution,
211 const Models::FMTmodel& model) const;
212 // DocString: FMTspatialschedule::getconstraintevaluation
217 const Models::FMTmodel& model,const FMTspatialschedule* friendlysolution = nullptr) const;
218 // DocString: FMTspatialschedule::getconstraintsvalues
222 std::vector<double> getconstraintsvalues(const Models::FMTmodel& model,
223 const FMTspatialschedule* friendlysolution = nullptr) const;
224 // DocString: FMTspatialschedule::getweightedfactors
228 std::vector<double> getweightedfactors(const Models::FMTmodel& model,
229 const FMTspatialschedule* friendlysolution = nullptr) const;
230 // DocString: FMTspatialschedule::getdualinfeasibility
234 double getprimalinfeasibility(const std::vector<const Core::FMTconstraint*>& constraints,
235 const Models::FMTmodel& model,const FMTspatialschedule* friendlysolution = nullptr, bool withfactorization = false) const;
236 // DocString: FMTspatialschedule::logsolutionstatus
240 void logsolutionstatus(const size_t& iteration, const double& objective, const double& primalinfeasibility) const;
241 // DocString: FMTspatialschedule::getsolutionstatus
245 void getsolutionstatus(double& objective, double& primalinfeasibility,const Models::FMTmodel& model,
246 const FMTspatialschedule* friendlysolution = nullptr, bool withsense = true, bool withfactorization = false,bool withspatial = true) const;
247 // DocString: FMTspatialschedule::getglobalobjective
253 const FMTspatialschedule* friendlysolution = nullptr) const;
254 // DocString: FMTspatialschedule::getobjectivevaluey
258 double getobjectivevalue(const Core::FMTconstraint& constraint, const Models::FMTmodel& model,
259 const FMTspatialschedule* friendlysolution = nullptr,bool withsense = true) const;
260 // DocString: FMTspatialschedule::setgraphfromcache
264 void setgraphfromcache(const Graph::FMTlinegraph& graph, const Models::FMTmodel& model, const int&startingperiod, bool remove = true);
265
266 // DocString: FMTspatialschedule::getpatchstats
270 std::string getpatchstats(const std::vector<Core::FMTaction>& actions) const;
271 // DocString: FMTspatialschedule::lastdistlayer
275 FMTlayer<std::string> lastdistlayer(const std::vector<Core::FMTaction>& modelactions, const int& period) const;
276 // DocString: FMTspatialschedule::getGCBMtransitions
280 std::vector<Core::FMTGCBMtransition> getGCBMtransitions(FMTlayer<std::string>& stackedactions, const std::vector<Core::FMTaction>& modelactions, const std::vector<Core::FMTtheme>& classifiers, const int& period) const;
281 // DocString: FMTspatialschedule::getpredictors
285 std::vector<std::vector<Graph::FMTpredictor>> getpredictors(FMTlayer<int>& predictorids, const Models::FMTmodel& model, const std::vector<std::string>& yieldnames, const int& period,bool periodonevalues = false,bool withGCBMid = true) const;
286
287 // DocString: FMTspatialschedule::eraselastperiod
292 // DocString: FMTspatialschedule::getbindingactions
296 std::vector<Spatial::FMTbindingspatialaction> getbindingactions(const Models::FMTmodel& model, const int& period) const;
297 // DocString: FMTspatialschedule::getbindingactionsbyperiod
302 // DocString: FMTspatialschedule::referencebuild
310 std::map<std::string, double> referencebuild(const Core::FMTschedule& schedule, const Models::FMTmodel& model,
311 const std::vector<boost::unordered_set<Core::FMTdevelopment>>& scheduleoperabilities,
312 bool schedule_only = true,
313 bool scheduleatfirstpass = true,
314 unsigned int seed = 0);
315 // DocString: FMTspatialschedule::greedyreferencebuild
324 std::map<std::string, double> greedyreferencebuild(const Core::FMTschedule& schedule, const Models::FMTmodel& model,
325 const size_t& randomiterations,
326 unsigned int seed = 0,
327 double tolerance = FMT_DBL_TOLERANCE,
328 bool log = true);
329 // DocString: FMTspatialschedule::randombuild
333 Graph::FMTgraphstats randombuild(const Models::FMTmodel& model, std::default_random_engine& generator);
334 // DocString: FMTspatialschedule::perturbgraph
338 void perturbgraph(const FMTcoordinate& coordinate,const int& period,
339 const Models::FMTmodel& model, std::default_random_engine& generator,
340 const actionbindings& bindings);
341 // DocString: FMTspatialschedule::isbetterbygroup
345 bool isbetterbygroup(const FMTspatialschedule& rhs, const Models::FMTmodel& model) const;
346 // DocString: FMTspatialschedule::swap
351 // DocString: FMTspatialschedule::getmovablecoordinates
355 std::vector<Spatial::FMTcoordinate>getmovablecoordinates(const Models::FMTmodel& model,const int& period,
356 const std::vector<Spatial::FMTcoordinate>* statics,
357 boost::unordered_map<Core::FMTdevelopment, bool>*operability = nullptr) const;
358
359 // DocString: FMTspatialschedule::getperiodwithmaximalevents
363 int getperiodwithmaximalevents(const std::vector<bool>& actions) const;
364 // DocString: FMTspatialschedule::getareaconflictcoordinates
368 std::vector<std::vector<Spatial::FMTcoordinate>>getareaconflictcoordinates(const actionbindings& bindingactions,const int& period,bool conflictonly=true) const;
369 // DocString: FMTspatialschedule::getadjacencyconflictcoordinates
373 std::vector<std::vector<Spatial::FMTcoordinate>>getadjacencyconflictcoordinates(const actionbindings& bindingactions,const int& period, bool conflictonly = true) const;
374 // DocString: FMTspatialschedule::getstaticsmovablecoordinates
378 std::vector<Spatial::FMTcoordinate>getstaticsmovablecoordinates(const Models::FMTmodel& model) const;
379 // DocString: FMTspatialschedule::ispartial
383 bool ispartial() const;
384 // DocString: FMTspatialschedule::emptyevents
388 bool emptyevents() const;
389 // DocString: FMTspatialschedule::copyfrompartial
394 // DocString: FMTspatialschedule::copyfrompartial
399 // DocString: FMTspatialschedule::setconstraintsfactor
403 void setconstraintsfactor(const Models::FMTmodel& model,const std::vector<double>&factors);
404 // DocString: FMTspatialschedule::needsrefactortorization
409 // DocString: FMTspatialschedule::dorefactortorization
414 // DocString: FMTspatialschedule::getconstraintsfactor
418 std::vector<double> getconstraintsfactor() const;
419 // DocString: FMTspatialschedule::getoutput
426 std::map<std::string, std::vector<double>> getoutput(const Models::FMTmodel & model, const Core::FMToutput& output,
427 const int& periodstart, const int& periodstop,
429 // DocString: FMTspatialschedule::getoutput
433 FMTlayer<double> getoutput(const Models::FMTmodel& model, const Core::FMToutput& output,const int& period) const;
434 // DocString: FMTspatialschedule::getoutputbycoordinate
438 std::vector<std::pair<FMTcoordinate, double>>getoutputbycoordinate(const Models::FMTmodel & model,
439 const Core::FMToutput& output, const int& period) const;
440 // DocString: FMTspatialschedule::postsolve
444 void postsolve(const Core::FMTmaskfilter& filter,const std::vector<Core::FMTaction>& presolveactions,const Models::FMTmodel& originalbasemodel);
445 protected:
446 // DocString: FMTspatialschedule::events
451 // DocString: FMTspatialschedule::getfromevents(const Core::FMTconstraint&, const std::vector<Core::FMTaction>&, const int&, const int&)
455 std::vector<const Graph::FMTlinegraph*>getfromevents(const Core::FMTconstraint& constraint, const std::vector<Core::FMTaction>& actions, const int& start, const int& stop) const;
456 // DocString: FMTspatialschedule::getfromevents(const Core::FMToutputnode&, const std::vector<Core::FMTaction>&, const int&)
460 std::vector<FMTcoordinate>getfromevents(const Core::FMToutputnode& node, const std::vector<Core::FMTaction>& actions, const int& period) const;
461 // DocString: FMTspatialschedule::getoutputfromgraph
465 std::map<std::string,double> getoutputfromgraph(const Graph::FMTlinegraph& linegraph, const Models::FMTmodel & model,
466 const Core::FMToutputnode& node, const double* solution,const int&period, const Core::FMTmask& nodemask,
467 boost::unordered_map<Core::FMTmask, double>& nodecache, Core::FMToutputlevel level = Core::FMToutputlevel::totalonly) const;
468
469 // DocString: FMTspatialschedule::setgraphcachebystatic
473 void setgraphcachebystatic(const std::vector<FMTcoordinate>& coordinates, const Core::FMToutputnode& node) const;
474 // DocString: FMTspatialschedule::getmaximalpatchsizes
478 //std::vector<size_t>getmaximalpatchsizes(const std::vector<FMTspatialaction>& spactions) const;
479 // DocString: FMTspatialschedule::inscheduleoperabilities
483 bool inscheduleoperabilities(const std::vector<boost::unordered_set<Core::FMTdevelopment>>& scheduleoperabilities,
484 Core::FMTdevelopment const* dev,const int& actionid, const Core::FMTaction& action) const;
485 // DocString: FMTspatialschedule::getoutputfromnode
489 std::vector<FMTlayer<Graph::FMTlinegraph>::const_iterator> getoutputfromnode(const Models::FMTmodel& model, const Core::FMToutputnode& node, const int& period) const;
490 private:
491 // DocString: FMTspatialschedule::evaluatespatialadjacency
495 double evaluatespatialadjacency(
496 const int& period,
497 const size_t& greenup,
498 const size_t& lowerlookup,
499 const size_t& upperlookup,
500 const bool& testlower,
501 const bool& testupper,
502 std::vector<FMTeventcontainer::const_iterator>& conflicts,
503 boost::unordered_set<FMTeventrelation>& relations,
504 const std::vector<bool>& actionused) const;
505
506};
507}
508
509
510#endif // FMTSPATIALSCHEDULE_H
#define FMT_DBL_TOLERANCE
Definition: FMTutility.hpp:11
#define FMTEXPORT
Definition: FMTutility.hpp:92
Definition: FMTaction.hpp:42
Definition: FMTconstraint.hpp:54
Definition: FMTdevelopment.hpp:44
Definition: FMTmask.hpp:96
Definition: FMTmaskfilter.hpp:27
Definition: FMToutput.hpp:39
Definition: FMToutputnode.hpp:20
Definition: FMTschedule.hpp:31
Definition: FMTtransition.hpp:37
Definition: FMTyields.hpp:40
Definition: FMTgraphstats.hpp:28
Definition: FMTlinegraph.hpp:30
Definition: FMTmodel.hpp:60
Definition: FMTbindingspatialaction.hpp:19
Definition: FMTcoordinate.hpp:25
Definition: FMTeventcontainer.hpp:35
Definition: FMTforest.hpp:27
Definition: FMTlayer.hpp:29
Definition: FMTspatialnodescache.hpp:33
Definition: FMTspatialschedule.hpp:44
std::map< std::string, std::vector< double > > getoutput(const Models::FMTmodel &model, const Core::FMToutput &output, const int &periodstart, const int &periodstop, Core::FMToutputlevel level=Core::FMToutputlevel::totalonly) const
std::vector< Spatial::FMTcoordinate > getmovablecoordinates(const Models::FMTmodel &model, const int &period, const std::vector< Spatial::FMTcoordinate > *statics, boost::unordered_map< Core::FMTdevelopment, bool > *operability=nullptr) const
FMTspatialschedule(const FMTspatialschedule &other, const std::vector< FMTcoordinate >::const_iterator &firstcoord, const std::vector< FMTcoordinate >::const_iterator &endcoord)
std::map< std::string, double > referencebuild(const Core::FMTschedule &schedule, const Models::FMTmodel &model, const std::vector< boost::unordered_set< Core::FMTdevelopment > > &scheduleoperabilities, bool schedule_only=true, bool scheduleatfirstpass=true, unsigned int seed=0)
double getglobalobjective(const Models::FMTmodel &model, const FMTspatialschedule *friendlysolution=nullptr) const
double evaluatespatialconstraint(const Core::FMTconstraint &spatialconstraint, const Models::FMTmodel &model) const
void copyfrompartial(FMTspatialschedule &rhs)
std::vector< Spatial::FMTcoordinate > getstaticsmovablecoordinates(const Models::FMTmodel &model) const
std::string getpatchstats(const std::vector< Core::FMTaction > &actions) const
void logsolutionstatus(const size_t &iteration, const double &objective, const double &primalinfeasibility) const
void setconstraintsfactor(const Models::FMTmodel &model, const std::vector< double > &factors)
double getobjectivevalue(const Core::FMTconstraint &constraint, const Models::FMTmodel &model, const FMTspatialschedule *friendlysolution=nullptr, bool withsense=true) const
Graph::FMTgraphstats randombuild(const Models::FMTmodel &model, std::default_random_engine &generator)
std::vector< FMTcoordinate > getfromevents(const Core::FMToutputnode &node, const std::vector< Core::FMTaction > &actions, const int &period) const
actionbindings getbindingactionsbyperiod(const Models::FMTmodel &model) const
FMTspatialschedule & operator=(const FMTspatialschedule &rhs)
std::vector< Spatial::FMTbindingspatialaction > getbindingactions(const Models::FMTmodel &model, const int &period) const
std::vector< FMTlayer< Graph::FMTlinegraph >::const_iterator > getoutputfromnode(const Models::FMTmodel &model, const Core::FMToutputnode &node, const int &period) const
std::vector< Core::FMTGCBMtransition > getGCBMtransitions(FMTlayer< std::string > &stackedactions, const std::vector< Core::FMTaction > &modelactions, const std::vector< Core::FMTtheme > &classifiers, const int &period) const
void operatecoord(const FMTcoordinate &coord, const Core::FMTaction &action, const int &action_id, const FMTbindingspatialaction &bindingspaction, const Core::FMTtransition &Transition, const Core::FMTyields &ylds, const std::vector< Core::FMTtheme > &themes)
FMTforest getforestperiod(const int &period, bool periodstart=false) const
bool empty() const
Definition: FMTspatialschedule.hpp:102
bool swapfromselected(FMTspatialschedule &rhs, const std::vector< size_t > &selected)
std::vector< const Graph::FMTlinegraph * > getfromevents(const Core::FMTconstraint &constraint, const std::vector< Core::FMTaction > &actions, const int &start, const int &stop) const
int getperiodwithmaximalevents(const std::vector< bool > &actions) const
virtual ~FMTspatialschedule()=default
FMTspatialschedule(const FMTspatialschedule &other)
void dorefactortorization(const Models::FMTmodel &model)
bool needsrefactortorization(const Models::FMTmodel &model) const
std::vector< Core::FMTschedule > getschedules(const std::vector< Core::FMTaction > &modelactions, bool withlock=false) const
bool copyfromselected(const FMTspatialschedule &rhs, const std::vector< size_t > &selected)
std::vector< double > getweightedfactors(const Models::FMTmodel &model, const FMTspatialschedule *friendlysolution=nullptr) const
std::vector< std::pair< FMTcoordinate, double > > getoutputbycoordinate(const Models::FMTmodel &model, const Core::FMToutput &output, const int &period) const
std::map< std::string, double > getoutputfromgraph(const Graph::FMTlinegraph &linegraph, const Models::FMTmodel &model, const Core::FMToutputnode &node, const double *solution, const int &period, const Core::FMTmask &nodemask, boost::unordered_map< Core::FMTmask, double > &nodecache, Core::FMToutputlevel level=Core::FMToutputlevel::totalonly) const
FMTspatialschedule(const FMTforest &initialmap)
void copyfrompartial(const FMTspatialschedule &rhs)
void setgraphfromcache(const Graph::FMTlinegraph &graph, const Models::FMTmodel &model, const int &startingperiod, bool remove=true)
std::set< FMTcoordinate > verifyspatialfeasability(const int &targetaction, const std::vector< Spatial::FMTbindingspatialaction > &bindingactions, const int &period, const std::set< FMTcoordinate > &operables) const
std::vector< std::vector< Spatial::FMTcoordinate > > getareaconflictcoordinates(const actionbindings &bindingactions, const int &period, bool conflictonly=true) const
void getsolutionstatus(double &objective, double &primalinfeasibility, const Models::FMTmodel &model, const FMTspatialschedule *friendlysolution=nullptr, bool withsense=true, bool withfactorization=false, bool withspatial=true) const
double operateevents(const FMTeventcontainer &cuts, const Core::FMTaction &action, const int &action_id, const Core::FMTtransition &Transition, const Core::FMTyields &ylds, const std::vector< Core::FMTtheme > &themes)
std::vector< std::vector< Spatial::FMTcoordinate > > getadjacencyconflictcoordinates(const actionbindings &bindingactions, const int &period, bool conflictonly=true) const
std::vector< double > getconstraintsfactor() const
std::vector< double > getgraphsoutputs(const Models::FMTmodel &model, const Core::FMTconstraint &constraint, const FMTspatialschedule *friendlysolution=nullptr) const
void swap(FMTspatialschedule &rhs)
bool allow_action(const int &targetaction, const std::vector< Spatial::FMTbindingspatialaction > &bindingactions, const FMTcoordinate &location, const int &period) const
void postsolve(const Core::FMTmaskfilter &filter, const std::vector< Core::FMTaction > &presolveactions, const Models::FMTmodel &originalbasemodel)
double getconstraintevaluation(const Core::FMTconstraint &constraint, const Models::FMTmodel &model, const FMTspatialschedule *friendlysolution=nullptr) const
std::vector< double > getconstraintsvalues(const Models::FMTmodel &model, const FMTspatialschedule *friendlysolution=nullptr) const
FMTlayer< std::string > lastdistlayer(const std::vector< Core::FMTaction > &modelactions, const int &period) const
std::vector< std::set< Spatial::FMTcoordinate > > getupdatedscheduling(const Models::FMTmodel &model, const std::vector< int > &actiontargets, boost::unordered_map< Core::FMTdevelopment, std::vector< bool > > &cachedaction, const std::vector< boost::unordered_set< Core::FMTdevelopment > > &scheduleoperabilities, bool schedule_only=true, std::vector< std::set< Spatial::FMTcoordinate > > original=std::vector< std::set< Spatial::FMTcoordinate > >(), std::vector< FMTcoordinate > updatedcoordinate=std::vector< FMTcoordinate >()) const
FMTeventcontainer events
Definition: FMTspatialschedule.hpp:450
std::vector< std::vector< Spatial::FMTbindingspatialaction > > actionbindings
Definition: FMTspatialschedule.hpp:49
void perturbgraph(const FMTcoordinate &coordinate, const int &period, const Models::FMTmodel &model, std::default_random_engine &generator, const actionbindings &bindings)
bool isbetterbygroup(const FMTspatialschedule &rhs, const Models::FMTmodel &model) const
void setgraphcachebystatic(const std::vector< FMTcoordinate > &coordinates, const Core::FMToutputnode &node) const
double getprimalinfeasibility(const std::vector< const Core::FMTconstraint * > &constraints, const Models::FMTmodel &model, const FMTspatialschedule *friendlysolution=nullptr, bool withfactorization=false) const
bool inscheduleoperabilities(const std::vector< boost::unordered_set< Core::FMTdevelopment > > &scheduleoperabilities, Core::FMTdevelopment const *dev, const int &actionid, const Core::FMTaction &action) const
std::vector< int > isbetterthan(const FMTspatialschedule &newsolution, const Models::FMTmodel &model) const
std::map< std::string, double > greedyreferencebuild(const Core::FMTschedule &schedule, const Models::FMTmodel &model, const size_t &randomiterations, unsigned int seed=0, double tolerance=FMT_DBL_TOLERANCE, bool log=true)
FMTeventcontainer buildharvest(const double &target, const Spatial::FMTbindingspatialaction &targetaction, std::default_random_engine &generator, std::set< FMTcoordinate > mapping_pass, const int &previousperiod, const int &actionid, std::vector< FMTcoordinate > &operated) const
FMTspatialschedule(FMTspatialschedule &&rhs) noexcept
FMTlayer< double > getoutput(const Models::FMTmodel &model, const Core::FMToutput &output, const int &period) const
std::vector< std::vector< Graph::FMTpredictor > > getpredictors(FMTlayer< int > &predictorids, const Models::FMTmodel &model, const std::vector< std::string > &yieldnames, const int &period, bool periodonevalues=false, bool withGCBMid=true) const
The Core namespace provides classes for simulating stands/strata growth/harvest through time.
Definition: FMTaction.hpp:31
FMToutputlevel
Definition: FMTutility.hpp:17
@ totalonly
Definition: FMTutility.hpp:19
The spatial namespace provides classes for spatialy explicit simulation/optimization based on raster ...
Definition: FMTareaparser.hpp:36
FMTspatialscheduletype
Definition: FMTspatialschedule.hpp:32
@ FMTcomplete
Definition: FMTspatialschedule.hpp:33
@ FMTpartial
Definition: FMTspatialschedule.hpp:34