iLand
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | Friends | List of all members

Activity is the base class for management activities. More...

#include <activity.h>

Inheritance diagram for ABE::Activity:
ABE::ActGeneral ABE::ActPlanting ABE::ActSalvage ABE::ActScheduled ABE::ActThinning ABE::Thinning

Public Types

enum  Phase {
  Invalid , Tending , Thinning , Regeneration ,
  All
}
 

Public Member Functions

 Activity (const FMSTP *parent)
 
virtual ~Activity ()
 
const FMSTPprogram () const
 
virtual QString type () const
 
QString name () const
 name of the activity as provided by JS More...
 
int index () const
 index of the activity within the STP More...
 
int earliestSchedule (const double U=100.) const
 get earlist possible scheduled year (relative to rotation begin) More...
 
int latestSchedule (const double U=100.) const
 get latest possible scheduled year (relative to rotation begin) More...
 
int optimalSchedule (const double U=100.) const
 get optimal scheduled year (relative to rotation begin) More...
 
bool isRepeatingActivity () const
 
virtual void setup (QJSValue value)
 setup of the activity (events, schedule, constraints). additional setup in derived classes. More...
 
virtual double scheduleProbability (FMStand *stand, const int specific_year=-1)
 returns a value > 0 if the activity coult be scheduled now More...
 
virtual double execeuteProbability (FMStand *stand)
 returns a probability for the activity to be executed (ie all constraints are fulfilled) return value is 0 if the activity can not be executed (maximum result is 1) More...
 
virtual bool execute (FMStand *stand)
 executes the action (usually defined in derived classes) using the context of 'stand'. More...
 
virtual bool evaluate (FMStand *stand)
 executes the evaluation of the forest stand. More...
 
virtual void evaluateDyanamicExpressions (FMStand *stand)
 function that evaluates "bound" dynamic expressions More...
 
virtual QStringList info ()
 dumps some information for debugging More...
 

Static Public Member Functions

static ActivitycreateActivity (const QString &type, FMSTP *stp)
 Activity factory - create activities for given 'type'. More...
 

Protected Member Functions

Scheduleschedule ()
 
Constraintsconstraints ()
 
Eventsevents ()
 
ActivityFlagsstandFlags (FMStand *stand=0)
 

Protected Attributes

ActivityFlags mBaseActivity
 

Static Protected Attributes

static QStringList mAllowedProperties = QStringList() << "schedule" << "constraint" << "type"
 

Friends

class FMSTP
 
class FMStand
 
class ActivityObj
 

Detailed Description

Activity is the base class for management activities.

An activity is the basic silvicultural building block; it holds state information and defines basic capabilities of all activities (such as having a given Schedule, or Events).

Member Enumeration Documentation

◆ Phase

Enumerator
Invalid 
Tending 
Thinning 
Regeneration 
All 

Constructor & Destructor Documentation

◆ Activity()

ABE::Activity::Activity ( const FMSTP parent)

◆ ~Activity()

ABE::Activity::~Activity ( )
virtual

Member Function Documentation

◆ constraints()

Constraints & ABE::Activity::constraints ( )
inlineprotected

◆ createActivity()

Activity * ABE::Activity::createActivity ( const QString &  type,
FMSTP stp 
)
static

Activity factory - create activities for given 'type'.

◆ earliestSchedule()

int ABE::Activity::earliestSchedule ( const double  U = 100.) const
inline

get earlist possible scheduled year (relative to rotation begin)

◆ evaluate()

bool ABE::Activity::evaluate ( FMStand stand)
virtual

executes the evaluation of the forest stand.

returns true, when the stand should enter the scheduler.

Reimplemented in ABE::ActScheduled, and ABE::ActThinning.

◆ evaluateDyanamicExpressions()

void ABE::Activity::evaluateDyanamicExpressions ( FMStand stand)
virtual

function that evaluates "bound" dynamic expressions

◆ events()

Events & ABE::Activity::events ( )
inlineprotected

◆ execeuteProbability()

double ABE::Activity::execeuteProbability ( FMStand stand)
virtual

returns a probability for the activity to be executed (ie all constraints are fulfilled) return value is 0 if the activity can not be executed (maximum result is 1)

◆ execute()

bool ABE::Activity::execute ( FMStand stand)
virtual

executes the action (usually defined in derived classes) using the context of 'stand'.

Reimplemented in ABE::ActGeneral, ABE::ActPlanting, ABE::ActSalvage, ABE::ActScheduled, and ABE::ActThinning.

◆ index()

int ABE::Activity::index ( ) const
inline

index of the activity within the STP

◆ info()

QStringList ABE::Activity::info ( )
virtual

dumps some information for debugging

Reimplemented in ABE::ActGeneral, ABE::ActPlanting, ABE::ActSalvage, and ABE::ActScheduled.

◆ isRepeatingActivity()

bool ABE::Activity::isRepeatingActivity ( ) const
inline

◆ latestSchedule()

int ABE::Activity::latestSchedule ( const double  U = 100.) const
inline

get latest possible scheduled year (relative to rotation begin)

◆ name()

QString ABE::Activity::name ( ) const
inline

name of the activity as provided by JS

◆ optimalSchedule()

int ABE::Activity::optimalSchedule ( const double  U = 100.) const
inline

get optimal scheduled year (relative to rotation begin)

◆ program()

const FMSTP * ABE::Activity::program ( ) const
inline

◆ schedule()

Schedule & ABE::Activity::schedule ( )
inlineprotected

◆ scheduleProbability()

double ABE::Activity::scheduleProbability ( FMStand stand,
const int  specific_year = -1 
)
virtual

returns a value > 0 if the activity coult be scheduled now

◆ setup()

void ABE::Activity::setup ( QJSValue  value)
virtual

setup of the activity (events, schedule, constraints). additional setup in derived classes.

Reimplemented in ABE::ActGeneral, ABE::ActPlanting, ABE::ActSalvage, ABE::ActScheduled, ABE::ActThinning, and ABE::Thinning.

◆ standFlags()

ActivityFlags & ABE::Activity::standFlags ( FMStand stand = 0)
protected

◆ type()

QString ABE::Activity::type ( ) const
virtual

Friends And Related Function Documentation

◆ ActivityObj

friend class ActivityObj
friend

◆ FMStand

friend class FMStand
friend

◆ FMSTP

friend class FMSTP
friend

Member Data Documentation

◆ mAllowedProperties

QStringList ABE::Activity::mAllowedProperties = QStringList() << "schedule" << "constraint" << "type"
staticprotected

◆ mBaseActivity

ActivityFlags ABE::Activity::mBaseActivity
protected

The documentation for this class was generated from the following files: