ALMaSS Skylark ODDox
1.1
The skylark model description following ODdox protocol
|
#include <WWheatPTreatment.h>
◆ WWheatPTreatment()
WWheatPTreatment::WWheatPTreatment |
( |
| ) |
|
|
inline |
◆ Do()
bool WWheatPTreatment::Do |
( |
Farm * |
a_farm, |
|
|
LE * |
a_field, |
|
|
FarmEvent * |
a_ev |
|
) |
| |
|
virtual |
Reimplemented from Crop.
66 m_field->SetMDates(0,0,g_date->DayInYear(20,8));
69 m_field->SetMDates(1,0,g_date->DayInYear(20,8));
71 m_field->SetMDates(1,1,g_date->DayInYear(20,8));
72 m_field->SetMDates(0,2,g_date->DayInYear(5,8));
73 m_field->SetMDates(1,2,g_date->DayInYear(25,8));
74 m_field->SetMDates(0,3,g_date->DayInYear(10,8));
75 m_field->SetMDates(1,3,g_date->DayInYear(15,9));
76 m_field->SetMDates(0,4,g_date->DayInYear(15,8));
77 m_field->SetMDates(1,4,g_date->DayInYear(15,10));
86 g_msg->Warn( WARN_BUG,
"WWheatPTreatment::Do(): "
87 "Harvest too late for the next crop to start!!!",
"" );
91 for (
int i=0; i<noDates; i++) {
106 d1 = g_date->OldDays() + g_date->DayInYear( 1,7 );
107 if (g_date->Date() < d1 ) {
109 printf (
"Poly: %d\n",
m_field->GetPoly());
110 g_msg->Warn( WARN_BUG,
"WWheatPTreatment::Do(): "
111 "Crop start attempt between 1st Jan & 1st July",
"" );
117 if (g_date->Date() > d1)
120 g_msg->Warn( WARN_BUG,
"WWheatPTrial::Do(): "
121 "Crop start attempt after last possible start date",
"" );
129 SimpleEvent( g_date->OldDays() + g_date->DayInYear( 1,4 ),
136 d1 = g_date->OldDays() + g_date->DayInYear( 21,8 );
150 g_date->DayInYear( 1,10 ) - g_date->DayInYear())) {
160 g_date->DayInYear( 1,10 ) - g_date->DayInYear())) {
174 g_date->DayInYear( 1,10 ) - g_date->DayInYear())) {
186 g_date->DayInYear( 1,10 ) - g_date->DayInYear())) {
202 g_date->DayInYear( 10,10 ) - g_date->DayInYear())) {
206 SimpleEvent( g_date->OldDays() + g_date->DayInYear( 10,9 ),
212 g_date->DayInYear( 10,10 ) - g_date->DayInYear())) {
216 SimpleEvent( g_date->OldDays() + g_date->DayInYear( 10,9 ),
222 g_date->DayInYear( 20,10 ) - g_date->DayInYear())) {
233 g_date->DayInYear( 27,10 ) - g_date->DayInYear())) {
238 SimpleEvent( g_date->OldDays() + g_date->DayInYear( 15,9 ),
245 if (
m_field->GetVegBiomass()>0)
249 g_date->DayInYear( 30,10 ) - g_date->DayInYear()))
256 SimpleEvent( g_date->OldDays() + g_date->DayInYear( 20,9 ),
264 g_date->DayInYear( 5,10 ) - g_date->DayInYear())) {
269 SimpleEvent( g_date->OldDays() + g_date->DayInYear( 1,4 )+365,
277 g_date->DayInYear( 30,4 ) - g_date->DayInYear())) {
285 SimpleEvent( g_date->OldDays() + g_date->DayInYear( 10,4 ),
289 SimpleEvent( g_date->OldDays() + g_date->DayInYear( 25,3 ),
292 SimpleEvent( g_date->OldDays() + g_date->DayInYear( 15,4 ),
294 SimpleEvent( g_date->OldDays() + g_date->DayInYear( 25,4 ),
296 SimpleEvent( g_date->OldDays() + g_date->DayInYear( 20,4 ),
298 SimpleEvent( g_date->OldDays() + g_date->DayInYear( 10,4 ),
300 SimpleEvent( g_date->OldDays() + g_date->DayInYear( 1,5 ),
312 g_date->DayInYear( 30,4 ) - g_date->DayInYear())) {
325 g_date->DayInYear( 10,5 ) - g_date->DayInYear())) {
337 g_date->DayInYear( 10,5 ) - g_date->DayInYear())) {
342 SimpleEvent( g_date->OldDays() + g_date->DayInYear( 20,5 ),
350 g_date->DayInYear( 15,5 ) - g_date->DayInYear())) {
389 g_date->DayInYear(25, 4) - g_date->DayInYear())) {
394 if ((g_date->Date() + 7)<(g_date->OldDays() + g_date->DayInYear(15, 6)))
395 SimpleEvent(g_date->OldDays() + g_date->DayInYear(25, 4),
417 if ((g_date->Date() + 5)<(g_date->OldDays() + g_date->DayInYear(2, 5)))
425 g_date->DayInYear( 1,6 ) - g_date->DayInYear())) {
434 g_date->DayInYear( 15,4 ) - g_date->DayInYear())) {
439 SimpleEvent( g_date->OldDays() + g_date->DayInYear( 25,4 ),
441 SimpleEvent( g_date->OldDays() + g_date->DayInYear( 1,4 ),
449 g_date->DayInYear( 15,5 ) - g_date->DayInYear())) {
456 SimpleEvent( g_date->OldDays() + g_date->DayInYear( 5,8 ),
464 g_date->DayInYear( 5,5 ) - g_date->DayInYear())) {
473 g_date->DayInYear( 30,4 ) - g_date->DayInYear())) {
478 SimpleEvent( g_date->OldDays() + g_date->DayInYear( 5,8 ),
486 g_date->DayInYear( 20,4 ) - g_date->DayInYear())) {
490 SimpleEvent( g_date->OldDays() + g_date->DayInYear( 21,4 ),
499 g_date->DayInYear( 1,5 ) - g_date->DayInYear())) {
508 g_date->DayInYear( 20,8 ) - g_date->DayInYear()))
520 m_field->GetMDates(1,0) - g_date->DayInYear())) {
539 m_field->GetMDates(1,1) - g_date->DayInYear())) {
550 m_field->GetMDates(1,2) - g_date->DayInYear())) {
562 m_field->GetMDates(1,3) - g_date->DayInYear())) {
575 m_field->GetMDates(1,4) - g_date->DayInYear())) {
585 g_msg->Warn( WARN_BUG,
"WWheatPTreatment::Do(): "
586 "Unknown event type! ",
"" );
References Farm::AutumnHarrow(), Farm::AutumnPlough(), Farm::AutumnRoll(), Farm::AutumnSow(), cfg_fungi_app_prop1, cfg_greg_app_prop, cfg_herbi_app_prop, cfg_pest_product_1_amount, cfg_pest_productapplic_startdate, cfg_productapplicendyear, cfg_productapplicstartyear, Farm::DeepPlough(), Farm::DoIt(), Farm::FA_Manure(), Farm::FA_NPK(), Farm::FA_Slurry(), Farm::FP_ManganeseSulphate(), Farm::FP_NPK(), Farm::FP_Slurry(), Farm::FungicideTreat(), g_landscape_p, Farm::GrowthRegulator(), Farm::Harvest(), Farm::HayBailing(), Farm::HayTurning(), Farm::HerbicideTreat(), Farm::IsStockFarmer(), Crop::m_ev, Crop::m_farm, Crop::m_field, Crop::m_first_date, FarmEvent::m_first_year, FarmEvent::m_lock, FarmEvent::m_startday, FarmEvent::m_todo, ppp_1, Farm::ProductApplication(), Crop::SimpleEvent(), Farm::SpringRoll(), Farm::StrawChopping(), Farm::Strigling(), Farm::StubbleHarrowing(), Landscape::SupplyYearNumber(), Farm::Water(), WWP_AUTUMN_PLOUGH, WWP_WAIT_FOR_PLOUGH, wwpt_autumn_harrow, wwpt_autumn_plough, wwpt_autumn_roll, wwpt_autumn_sow, wwpt_ferti_p1, wwpt_ferti_p2, wwpt_ferti_p3, wwpt_ferti_p4, wwpt_ferti_p5, wwpt_ferti_s1, wwpt_ferti_s2, wwpt_ferti_s3, wwpt_ferti_s4, wwpt_ferti_s5, wwpt_fungicide, wwpt_fungicide2, wwpt_GR, wwpt_grubning, wwpt_harvest, wwpt_hay_baling, wwpt_hay_turning, wwpt_herbicide1, wwpt_herbicide2, wwpt_insecticide1, wwpt_insecticide2, wwpt_insecticide3, wwpt_spring_roll, wwpt_start, wwpt_straw_chopping, wwpt_strigling1, wwpt_strigling2, wwpt_stubble_harrow1, wwpt_stubble_harrow2, wwpt_water1, and wwpt_water2.
The documentation for this class was generated from the following files:
virtual bool SpringRoll(LE *a_field, double a_user, int a_days)
Carry out a roll event in the spring on a_field.
Definition: farmfuncs.cpp:525
virtual bool FA_Slurry(LE *a_field, double a_user, int a_days)
Spready slurry on a_field owned by an stock farmer.
Definition: farmfuncs.cpp:965
Definition: WWheatPTreatment.h:61
Definition: WWheatPTreatment.h:80
virtual bool HerbicideTreat(LE *a_field, double a_user, int a_days)
Apply herbicide to a_field.
Definition: farmfuncs.cpp:1156
bool IsStockFarmer(void)
Definition: farm.h:905
virtual bool Strigling(LE *a_field, double a_user, int a_days)
Carry out a mechanical weeding on a_field.
Definition: farmfuncs.cpp:1545
Definition: WWheatPTreatment.h:67
CfgInt cfg_productapplicendyear
Definition: WWheatPTreatment.h:75
virtual bool Harvest(LE *a_field, double a_user, int a_days)
Carry out a harvest on a_field.
Definition: farmfuncs.cpp:1769
bool m_lock
Definition: farm.h:465
virtual bool FP_ManganeseSulphate(LE *a_field, double a_user, int a_days)
Apply Manganse Sulphate to a_field owned by an arable farmer.
Definition: farmfuncs.cpp:727
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
virtual bool FP_NPK(LE *a_field, double a_user, int a_days)
Apply NPK fertilizer, on a_field owned by an arable farmer.
Definition: farmfuncs.cpp:629
CfgInt cfg_productapplicstartyear
Definition: WWheatPTreatment.h:53
bool DoIt(double a_probability)
Return chance out of 0 to 100.
Definition: farm.cpp:800
CfgFloat cfg_herbi_app_prop
Definition: WWheatPTreatment.h:70
bool m_first_year
Definition: farm.h:467
Definition: WWheatPTreatment.h:78
Definition: WWheatPTreatment.h:58
Definition: WWheatPTreatment.h:77
virtual bool FA_Manure(LE *a_field, double a_user, int a_days)
Spread manure on a_field owned by an stock farmer.
Definition: farmfuncs.cpp:1036
Definition: WWheatPTreatment.h:72
Definition: WWheatPTreatment.h:48
Definition: WWheatPTreatment.h:55
Definition: WWheatPTreatment.h:65
CfgInt cfg_pest_productapplic_startdate
int m_first_date
Definition: farm.h:540
int m_startday
Definition: farm.h:466
virtual bool FA_NPK(LE *a_field, double a_user, int a_days)
Apply NPK fertilizer to a_field owned by an stock farmer.
Definition: farmfuncs.cpp:917
Definition: WWheatPTreatment.h:51
virtual bool FungicideTreat(LE *a_field, double a_user, int a_days)
Apply fungicide to a_field.
Definition: farmfuncs.cpp:1279
Definition: WWheatPTreatment.h:49
CfgFloat cfg_pest_product_1_amount
void SimpleEvent(long a_date, int a_todo, bool a_lock)
Adds an event to this crop management.
Definition: farm.cpp:307
Definition: WWheatPTreatment.h:76
Definition: WWheatPTreatment.h:62
virtual bool AutumnSow(LE *a_field, double a_user, int a_days)
Carry out a sowing event in the autumn on a_field.
Definition: farmfuncs.cpp:364
Definition: WWheatPTreatment.h:64
Definition: WWheatPTreatment.h:45
#define WWP_WAIT_FOR_PLOUGH
Definition: WheatPControl.h:37
Definition: WWheatPTreatment.h:79
Definition: WWheatPTreatment.h:71
Definition: WWheatPTreatment.h:52
virtual bool HayBailing(LE *a_field, double a_user, int a_days)
Carry out hay bailing on a_field.
Definition: farmfuncs.cpp:2184
virtual bool StrawChopping(LE *a_field, double a_user, int a_days)
Carry out straw chopping on a_field.
Definition: farmfuncs.cpp:2132
#define WWP_AUTUMN_PLOUGH
Definition: WheatPControl.h:38
CfgFloat cfg_fungi_app_prop1
Definition: WWheatPTreatment.h:66
Definition: WWheatPTreatment.h:69
Definition: WWheatPTreatment.h:68
int SupplyYearNumber(void)
Definition: Landscape.h:1616
Definition: WWheatPTreatment.h:50
Farm * m_farm
Definition: farm.h:537
LE * m_field
Definition: farm.h:538
Definition: WWheatPTreatment.h:73
int m_todo
Definition: farm.h:469
virtual bool AutumnRoll(LE *a_field, double a_user, int a_days)
Carry out a roll event in the autumn on a_field.
Definition: farmfuncs.cpp:288
virtual bool FP_Slurry(LE *a_field, double a_user, int a_days)
Apply slurry to a_field owned by an arable farmer.
Definition: farmfuncs.cpp:701
Definition: WWheatPTreatment.h:54
virtual bool Water(LE *a_field, double a_user, int a_days)
Carry out a watering on a_field.
Definition: farmfuncs.cpp:1717
virtual bool AutumnPlough(LE *a_field, double a_user, int a_days)
Carry out a ploughing event in the autumn on a_field.
Definition: farmfuncs.cpp:132
Definition: WWheatPTreatment.h:57
virtual bool AutumnHarrow(LE *a_field, double a_user, int a_days)
Carry out a harrow event in the autumn on a_field.
Definition: farmfuncs.cpp:261
Definition: WWheatPTreatment.h:56
virtual bool DeepPlough(LE *a_field, double a_user, int a_days)
Carry out a deep ploughing event on a_field.
Definition: farmfuncs.cpp:417
virtual bool GrowthRegulator(LE *a_field, double a_user, int a_days)
Apply growth regulator to a_field.
Definition: farmfuncs.cpp:1250
Definition: WWheatPTreatment.h:59
Definition: WWheatPTreatment.h:74
CfgFloat cfg_greg_app_prop
Definition: WWheatPTreatment.h:47
Definition: WWheatPTreatment.h:60
virtual bool HayTurning(LE *a_field, double a_user, int a_days)
Carry out hay turning on a_field.
Definition: farmfuncs.cpp:2159
FarmEvent * m_ev
Definition: farm.h:539
Landscape * g_landscape_p
Definition: Landscape.cpp:258
virtual bool StubbleHarrowing(LE *a_field, double a_user, int a_days)
Carry out stubble harrowing on a_field.
Definition: farmfuncs.cpp:2209
Definition: WWheatPTreatment.h:63