iLand
Classes | Public Types | Public Member Functions | Friends | List of all members

The Scheduler class schedules the forest management activities on a planning unit. More...

#include <scheduler.h>

Public Types

enum  HarvestType { Thinning , EndHarvest , Salvage }
 

Public Member Functions

 Scheduler (FMUnit *unit)
 
void setEnabled (bool enabled)
 
bool enabled () const
 
void addTicket (FMStand *stand, ActivityFlags *flags, double prob_schedule, double prob_execute)
 add an planned activity for a given stand. More...
 
int clearItemsOfStand (const FMStand *stand)
 clear all items from the scheduler from a given stand returns the number of cleared items. More...
 
void run ()
 executes the scheduler for the planning unit. More...
 
void resetHarvestCounter ()
 at the end of the year, reset the salvage harvests More...
 
bool forceHarvest (const FMStand *stand, const int max_years)
 prepone a stand if in queue for the given stand. More...
 
void addExtraHarvest (const FMStand *stand, const double volume, HarvestType type)
 tell the scheduler about extra harvests (that should be considered in the scheduling) volume: total volume (m3) More...
 
double plannedHarvests (double &rFinal, double &rThinning)
 return the total amount of planned harvests in the next planning period (10yrs) (total=false) if 'total' is true all scheduled harvests are counted More...
 
void setHarvestTarget (double target_m3_ha, double thinning_target_m3_ha)
 set the harvest target for the unit (m3/ha) for the current year. More...
 
double harvestTarget () const
 
double scoreOf (const int stand_id) const
 get current score for stand 'id' return -1 if stand is invalid, 0..1 for probabilities, 1.1 for forced execution More...
 
QStringList info (const int stand_id) const
 
void dump () const
 write state of the scheduler to the console More...
 

Friends

class UnitOut
 

Detailed Description

The Scheduler class schedules the forest management activities on a planning unit.

The Scheduler class implements the logic of scheduling the when and what of activties.

Member Enumeration Documentation

◆ HarvestType

Enumerator
Thinning 
EndHarvest 
Salvage 

Constructor & Destructor Documentation

◆ Scheduler()

ABE::Scheduler::Scheduler ( FMUnit unit)
inline

Member Function Documentation

◆ addExtraHarvest()

void ABE::Scheduler::addExtraHarvest ( const FMStand stand,
const double  volume,
Scheduler::HarvestType  type 
)

tell the scheduler about extra harvests (that should be considered in the scheduling) volume: total volume (m3)

◆ addTicket()

void ABE::Scheduler::addTicket ( FMStand stand,
ActivityFlags flags,
double  prob_schedule,
double  prob_execute 
)

add an planned activity for a given stand.

Parameters
standthe stand to add
flagsthe execution flags (activty x stand)
prob_schedulethe probability from the activity-scheduling algorithm at the time of adding the ticket
prob_executethe probability for executing the activity (based on the constraints of the activity)

◆ clearItemsOfStand()

int ABE::Scheduler::clearItemsOfStand ( const FMStand stand)

clear all items from the scheduler from a given stand returns the number of cleared items.

◆ dump()

void ABE::Scheduler::dump ( ) const

write state of the scheduler to the console

◆ enabled()

bool ABE::Scheduler::enabled ( ) const
inline

◆ forceHarvest()

bool ABE::Scheduler::forceHarvest ( const FMStand stand,
const int  max_years 
)

prepone a stand if in queue for the given stand.

return true if a activity is preponed.

◆ harvestTarget()

double ABE::Scheduler::harvestTarget ( ) const
inline

◆ info()

QStringList ABE::Scheduler::info ( const int  stand_id) const

◆ plannedHarvests()

double ABE::Scheduler::plannedHarvests ( double &  rFinal,
double &  rThinning 
)

return the total amount of planned harvests in the next planning period (10yrs) (total=false) if 'total' is true all scheduled harvests are counted

◆ resetHarvestCounter()

void ABE::Scheduler::resetHarvestCounter ( )
inline

at the end of the year, reset the salvage harvests

◆ run()

void ABE::Scheduler::run ( )

executes the scheduler for the planning unit.

scheduled operations are executed.

◆ scoreOf()

double ABE::Scheduler::scoreOf ( const int  stand_id) const

get current score for stand 'id' return -1 if stand is invalid, 0..1 for probabilities, 1.1 for forced execution

◆ setEnabled()

void ABE::Scheduler::setEnabled ( bool  enabled)
inline

◆ setHarvestTarget()

void ABE::Scheduler::setHarvestTarget ( double  target_m3_ha,
double  thinning_target_m3_ha 
)
inline

set the harvest target for the unit (m3/ha) for the current year.

target_m3_ha: the

Friends And Related Function Documentation

◆ UnitOut

friend class UnitOut
friend

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