ALMaSS Skylark ODDox
1.1
The skylark model description following ODdox protocol
|
#include <OrchardCrop.h>
◆ OrchardCrop()
OrchardCrop::OrchardCrop |
( |
| ) |
|
|
inline |
◆ Do()
bool OrchardCrop::Do |
( |
Farm * |
a_farm, |
|
|
LE * |
a_field, |
|
|
FarmEvent * |
a_ev |
|
) |
| |
|
virtual |
Reimplemented from Crop.
50 int today = g_date->Date();
59 m_field->SetMDates(0,0,g_date->DayInYear(1,9));
61 m_field->SetMDates(1,0,g_date->DayInYear(1,9));
72 g_msg->Warn( WARN_BUG,
"OrchardCrop::Do(): Harvest too late for the next crop to start!!!",
"" );
76 for (
int i=0; i<noDates; i++) {
91 g_msg->Warn( WARN_BUG,
" OrchardCrop::Do(): Crop start attempt after last possible start date",
"" );
98 if ( g_date->Date() > d1 ){
115 if ( ( today == 259 ) || ( today == 122 ) || ( today == 92 ) || ( today == 196 ) )
119 if ( ( today == 259 ) || ( today == 122 ) || ( today == 92 ) )
m_farm->
CutOrch(
m_field, 0.0, -1);
180 g_msg->Warn( WARN_BUG,
"OrchardCrop::Do(): Unknown event type! ",
"" );
References cfg_ins_app_prop1, cfg_OrchardNoCutsDay, cfg_pest_product_1_amount, cfg_pest_productapplic_startdate, cfg_pest_productapplic_startdate2, cfg_productapplicendyear, cfg_productapplicstartyear, Crop::ChooseNextCrop(), Farm::CutOrch(), Farm::DoIt(), g_landscape_p, Farm::GetType(), Crop::m_ev, Crop::m_farm, Crop::m_field, Crop::m_first_date, FarmEvent::m_first_year, Crop::m_last_date, FarmEvent::m_lock, FarmEvent::m_startday, FarmEvent::m_todo, orch_cut, orch_do_nothing_start, orch_do_nothing_stop, orch_insecticide1, orch_insecticide2, orch_start, ppp_1, Farm::ProductApplication(), Crop::SimpleEvent(), Landscape::SupplyYearNumber(), and tof_OptimisingFarm.
The documentation for this class was generated from the following files:
bool m_lock
Definition: farm.h:465
virtual bool ProductApplication(LE *a_field, double a_user, int a_days, double a_applicationrate, PlantProtectionProducts a_ppp)
Apply test pesticide to a_field.
Definition: farmfuncs.cpp:1445
bool DoIt(double a_probability)
Return chance out of 0 to 100.
Definition: farm.cpp:800
CfgFloat cfg_ins_app_prop1
Definition: OrchardCrop.h:41
bool m_first_year
Definition: farm.h:467
TTypesOfFarm GetType(void)
Definition: farm.h:901
int m_first_date
Definition: farm.h:540
int m_startday
Definition: farm.h:466
void SimpleEvent(long a_date, int a_todo, bool a_lock)
Adds an event to this crop management.
Definition: farm.cpp:307
Definition: OrchardCrop.h:39
CfgFloat cfg_pest_product_1_amount
Definition: OrchardCrop.h:42
Definition: OrchardCrop.h:40
virtual bool CutOrch(LE *a_field, double a_user, int a_days)
Cut vegetation on orchard crop. //based on cut to silage - values from cutting function of orchard.
Definition: farmfuncs.cpp:2362
int SupplyYearNumber(void)
Definition: Landscape.h:1616
CfgInt cfg_productapplicstartyear
Definition: OrchardCrop.h:38
Farm * m_farm
Definition: farm.h:537
LE * m_field
Definition: farm.h:538
int m_todo
Definition: farm.h:469
int m_last_date
Definition: farm.h:542
CfgInt cfg_productapplicendyear
Definition: OrchardCrop.h:37
CfgInt cfg_OrchardNoCutsDay
CfgInt cfg_pest_productapplic_startdate2
void ChooseNextCrop(int a_no_dates)
Chooses the next crop to grow in a field.
Definition: farm.cpp:318
FarmEvent * m_ev
Definition: farm.h:539
Landscape * g_landscape_p
Definition: Landscape.cpp:258
CfgInt cfg_pest_productapplic_startdate