8#ifndef FMToptimizationparser_H_INCLUDED
9#define FMToptimizationparser_H_INCLUDED
18#include <boost/regex.hpp>
45 const static boost::regex rxsections;
46 const static boost::regex rxobjectives;
47 const static boost::regex rxexclude;
48 const static boost::regex rxconstraints;
49 const static boost::regex rxequations;
50 const static boost::regex rxperiods;
51 const static boost::regex rxending;
52 const static boost::regex rxoutput;
53 const static boost::regex rxpenalty;
54 const static boost::regex rxspecialoutput;
55 const static boost::regex rxspatial;
56 const static boost::regex rxspecialobjective;
57 const static boost::regex rxstartwithoperator;
58 std::queue<std::string>ineach;
60 const std::vector<Core::FMToutput>& outputs,
61 const std::vector<Core::FMTtheme>& themes);
66 Core::FMToutput resume_output(
const std::map<std::string,double>& nodes,
67 const std::vector<Core::FMToutput>& outputs,
68 const std::vector<Core::FMTtheme>& themes,
70 std::string getoptline(std::ifstream& stream,
const std::vector<Core::FMTtheme>& themes,
72 std::queue<std::string> geteachlines(
const std::string& line,
const Core::FMTconstants& constants,
const std::vector<Core::FMToutput>& outputs,
const std::vector<Core::FMTtheme>& themes)
const;
73 std::map<std::string,double>getequation(
const std::string& line,
const Core::FMTconstants& constants,
74 const std::vector<Core::FMToutput>& outputs,
size_t lhssize= std::numeric_limits<size_t>::max());
76 void fillbounds(
const std::string& operatorvalue,
const double& rhs,
double& lower,
double& upper)
const;
78 const boost::smatch& match,
const std::string& line,
80 const std::vector<Core::FMTaction>& actions,
81 const std::vector<Core::FMToutput>& outputs,
82 const std::vector<Core::FMTtheme>& themes);
83 std::vector<std::vector<double>>getreplicatechanges(
const std::string& replicateargument);
88 std::vector<Core::FMTconstraint>
read(
const std::vector<Core::FMTtheme>& themes,
89 const std::vector<Core::FMTaction>& actions,
91 const std::vector<Core::FMToutput>& outputs,
92 std::vector<Core::FMTaction>& excluded,
93 const std::string& location);
95 const std::vector<Core::FMToutput>& outputs,
const std::vector<Core::FMTtheme>& themes,
const std::vector<Core::FMTaction>& actions);
96 void write(
const std::vector<Core::FMTconstraint>& constraints,
const std::string& location)
const;
#define FMTEXPORT
Definition: FMTutility.hpp:92
Definition: FMTconstants.hpp:29
Definition: FMTconstraint.hpp:54
Definition: FMToutput.hpp:39
Definition: FMTbounds.hpp:293
Definition: FMTbounds.hpp:342
Definition: FMToptimizationparser.hpp:44
~FMToptimizationparser()=default
std::vector< Core::FMTconstraint > read(const std::vector< Core::FMTtheme > &themes, const std::vector< Core::FMTaction > &actions, const Core::FMTconstants &constants, const std::vector< Core::FMToutput > &outputs, std::vector< Core::FMTaction > &excluded, const std::string &location)
FMToptimizationparser(const FMToptimizationparser &rhs)=default
void write(const std::vector< Core::FMTconstraint > &constraints, const std::string &location) const
std::vector< Core::FMTconstraint > getconstraints(const std::string &line, const Core::FMTconstants &constants, const std::vector< Core::FMToutput > &outputs, const std::vector< Core::FMTtheme > &themes, const std::vector< Core::FMTaction > &actions)
Definition: FMTparser.hpp:66
The Core namespace provides classes for simulating stands/strata growth/harvest through time.
Definition: FMTaction.hpp:31
Namespace handling all FMT's parsers. Everything related to I/O should be located in this namespace.
Definition: FMTactionparser.hpp:26
FMToptimizationsection
Definition: FMToptimizationparser.hpp:35
@ exclude
Definition: FMToptimizationparser.hpp:37
@ constraints
Definition: FMToptimizationparser.hpp:38
@ none
Definition: FMToptimizationparser.hpp:40
@ format
Definition: FMToptimizationparser.hpp:39
@ objective
Definition: FMToptimizationparser.hpp:36