8#ifndef PYEXPORTSPATIAL_H_INCLUDED
9#define PYEXPORTSPATIAL_H_INCLUDED
19#include "boost/python.hpp"
23BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(getforestperiod_overloads, getforestperiod, 1, 2)
24BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(getconstraintevaluation_overloads,getconstraintevaluation,2,2)
25BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(getobjectivevalue_overloads,getobjectivevalue,2,2)
28 namespace bp = boost::python;
29 bp::object SpatialModule(bp::handle<>(bp::borrowed(PyImport_AddModule(
"FMT.Spatial"))));
30 bp::scope().attr(
"Spatial") = SpatialModule;
31 bp::scope Spatial_scope = SpatialModule;
32 bp::scope().attr(
"__doc__") =
".. module:: Spatial\n"
34 " :platform: Unix, Windows\n"
35 " :synopsis: Spatial module used for Simulation.\n"
38 bp::class_<Spatial::FMTcoordinate>(
"FMTcoordinate",
"@DocString(FMTcoordinate)")
39 .def(bp::init<unsigned int,unsigned int>())
40 .def(
"__lt__",&Spatial::FMTcoordinate::operator <,
41 "@DocString(FMTcoordinate::operator<)")
43 "@DocString(FMTcoordinate::getx)")
45 "@DocString(FMTcoordinate::gety)")
47 "@DocString(FMTcoordinate::getSpatialCoordinate)")
48 .setattr(
"__hash__",&boost::pyhash<Spatial::FMTcoordinate>);
50 define_FMTlayer<Core::FMTdevelopment>();
52 define_pypair<Spatial::FMTcoordinate,Core::FMTdevelopment>();
53 define_pypair<Spatial::FMTcoordinate const,Core::FMTdevelopment>();
54 define_pypair<Spatial::FMTcoordinate,Graph::FMTlinegraph>();
55 define_pypair<Spatial::FMTcoordinate const,Graph::FMTlinegraph>();
59 bp::class_<Spatial::FMTforest, bp::bases<Spatial::FMTlayer<Core::FMTdevelopment>>>(
"FMTforest",
"@DocString(FMTforest)")
60 .def(bp::init<Spatial::FMTforest>())
62 "@DocString(FMTforest::getarea)")
64 "@DocString(FMTforest::grow)")
66 "@DocString(FMTforest::getage)")
68 "@DocString(FMTforest::setperiod)");
71 define_pylist<Spatial::FMTforest>();
73 bp::class_<Spatial::FMTeventcontainer>(
"FMTeventcontainer",
"@DocString(FMTeventcontainer)")
74 .def(bp::init<Spatial::FMTeventcontainer>());
76 define_pylist<Spatial::FMTeventcontainer>();
122 define_FMTlayer<Graph::FMTlinegraph>();
124 bp::class_<Spatial::FMTspatialschedule, bp::bases<Spatial::FMTlayer<Graph::FMTlinegraph>>>(
"FMTspatialschedule",
"@DocString(FMTspatialschedule)")
125 .def(bp::init<Spatial::FMTspatialschedule>())
132 define_pylist<Spatial::FMTspatialschedule>();
134 bp::class_<Spatial::FMTbindingspatialaction>(
"FMTbindingspatialaction",
"@DocString(FMTbindingspatialaction)")
139 define_pylist<Spatial::FMTbindingspatialaction>();
const size_t & getmaximalsize() const
Definition: FMTbindingspatialaction.hpp:67
const size_t & getminimaladjacency() const
Definition: FMTbindingspatialaction.hpp:55
const size_t & getminimalsize() const
Definition: FMTbindingspatialaction.hpp:63
const std::vector< double > getSpatialCoordinate(std::vector< double > geoTransform) const
unsigned int getx() const
unsigned int gety() const
std::vector< Core::FMTactualdevelopment > getarea() const
void setperiod(int period)
FMTlayer< int > getage() const
std::vector< Spatial::FMTbindingspatialaction > getbindingactions(const Models::FMTmodel &model, 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
std::vector< std::pair< FMTcoordinate, double > > getoutputbycoordinate(const Models::FMTmodel &model, const Core::FMToutput &output, const int &period) const
double getconstraintevaluation(const Core::FMTconstraint &constraint, const Models::FMTmodel &model, const FMTspatialschedule *friendlysolution=nullptr) const
Definition: PYdefinitions.hpp:14
void exportSpatial()
Definition: PYexportSpatial.hpp:26