40 bool isValid()
const {
return mCounter>0; }
46 const QString &
value()
const {
return mValue;}
48 int age()
const {
return mAge; }
51 void setValue(QString new_value) { mValue = new_value; }
60 QString mAfterActivity;
76 const QString &
name()
const {
return mName; }
78 void setupSTP(QJSValue agent_code,
const QString agent_name);
80 void addSTP(QString stp_name);
100 QHash<QString,FMSTP*> mSTP;
101 QVector<QString> mSpeciesCompositions;
102 QMultiHash<const FMUnit*, AgentUpdate> mAgentChanges;
The Agent is the core element of the agent based forest management model and simulates a foresters de...
Definition: agent.h:35
AgentType is the archtype agent including the agents decision logic.
Definition: agenttype.h:72
void addAgentUpdate(const AgentUpdate &update, FMUnit *unit)
Definition: agenttype.cpp:117
QString speciesCompositionName(const int index)
Definition: agenttype.cpp:238
const QString & name() const
Definition: agenttype.h:76
AgentType()
Definition: agenttype.cpp:39
Agent * createAgent(QString agent_name=QString())
create an agent of the agent type
Definition: agenttype.cpp:78
QJSValue & jsObject()
access to the javascript object
Definition: agenttype.h:91
void addSTP(QString stp_name)
add a STP to the list of available STPs for the agent
Definition: agenttype.cpp:68
FMSTP * stpByName(const QString &name)
get stand treatment program by name; return 0 if the stp is not available.
Definition: agenttype.cpp:222
int speciesCompositionIndex(const QString &key)
return the index (0-based) of the species composition given by 'key'. Returns -1 if not found.
Definition: agenttype.cpp:230
void setupSTP(QJSValue agent_code, const QString agent_name)
setup the definition of STPs for the agent
Definition: agenttype.cpp:43
bool agentUpdateForStand(FMStand *stand, QString after_activity, int age)
Definition: agenttype.cpp:158
Definition: agenttype.h:35
void setTimeActivity(QString act)
Definition: agenttype.h:54
bool isValid() const
Definition: agenttype.h:40
void decrease()
Definition: agenttype.h:42
UpdateType type() const
Definition: agenttype.h:45
QString dump()
Definition: agenttype.cpp:253
void setCounter(int n)
Definition: agenttype.h:41
void setTimeYear(int year)
Definition: agenttype.h:53
const QString & afterActivity() const
Definition: agenttype.h:47
void setType(UpdateType type)
Definition: agenttype.h:50
UpdateType
Definition: agenttype.h:38
@ UpdateSpecies
Definition: agenttype.h:38
@ UpdateThinning
Definition: agenttype.h:38
@ UpdateU
Definition: agenttype.h:38
@ UpdateInvalid
Definition: agenttype.h:38
int age() const
Definition: agenttype.h:48
void setTimeAge(int age)
Definition: agenttype.h:52
static UpdateType label(const QString &name)
Definition: agenttype.cpp:245
const QString & value() const
Definition: agenttype.h:46
void setValue(QString new_value)
Definition: agenttype.h:51
AgentUpdate()
Definition: agenttype.h:37
The FMSTP class encapsulates a stand treatment program, which is defined in Javascript.
Definition: fmstp.h:39
FMStand encapsulates a forest stand for the forest management engine.
Definition: fmstand.h:49
The FMUnit represents a management unit, i.e.
Definition: fmunit.h:32