ALMaSS Skylark ODDox
1.1
The skylark model description following ODdox protocol
|
#include <WinterWheatStrigling.h>
◆ WinterWheatStrigling()
WinterWheatStrigling::WinterWheatStrigling |
( |
| ) |
|
|
inline |
◆ Do()
bool WinterWheatStrigling::Do |
( |
Farm * |
a_farm, |
|
|
LE * |
a_field, |
|
|
FarmEvent * |
a_ev |
|
) |
| |
|
virtual |
Reimplemented from Crop.
60 m_field->SetMDates(0,0,g_date->DayInYear(20,8));
63 m_field->SetMDates(1,0,g_date->DayInYear(20,8));
65 m_field->SetMDates(1,1,g_date->DayInYear(20,8));
66 m_field->SetMDates(0,2,g_date->DayInYear(5,8));
67 m_field->SetMDates(1,2,g_date->DayInYear(25,8));
68 m_field->SetMDates(0,3,g_date->DayInYear(10,8));
69 m_field->SetMDates(1,3,g_date->DayInYear(15,9));
70 m_field->SetMDates(0,4,g_date->DayInYear(15,8));
71 m_field->SetMDates(1,4,g_date->DayInYear(15,10));
83 g_msg->Warn( WARN_BUG,
"WinterWheat::Do(): "
84 "Harvest too late for the next crop to start!!!",
"" );
89 for (
int i=0; i<noDates; i++) {
99 if (toggle)
for (
int i=0; i<10; i++)
m_field->SetMConstants(i,0);
109 d1 = g_date->OldDays() + g_date->DayInYear( 1,7 );
110 if (g_date->Date() < d1 ) {
112 printf (
"Poly: %d\n",
m_field->GetPoly());
113 g_msg->Warn( WARN_BUG,
"WinterWheatStrigling::Do(): "
114 "Crop start attempt between 1st Jan & 1st July",
"" );
120 if (g_date->Date() > d1)
123 g_msg->Warn( WARN_BUG,
"WinterWheatStrigling::Do(): "
124 "Crop start attempt after last possible start date",
"" );
132 SimpleEvent( g_date->OldDays() + g_date->DayInYear( 1,4 ),
139 d1 = g_date->OldDays() + g_date->DayInYear( 21,8 );
153 g_date->DayInYear( 1,10 ) - g_date->DayInYear())) {
163 g_date->DayInYear( 1,10 ) - g_date->DayInYear())) {
177 g_date->DayInYear( 1,10 ) - g_date->DayInYear())) {
189 g_date->DayInYear( 1,10 ) - g_date->DayInYear())) {
205 g_date->DayInYear( 10,10 ) - g_date->DayInYear())) {
209 SimpleEvent( g_date->OldDays() + g_date->DayInYear( 10,9 ),
215 g_date->DayInYear( 10,10 ) - g_date->DayInYear())) {
219 SimpleEvent( g_date->OldDays() + g_date->DayInYear( 10,9 ),
225 g_date->DayInYear( 20,10 ) - g_date->DayInYear())) {
239 g_date->DayInYear( 27,10 ) - g_date->DayInYear())) {
244 SimpleEvent( g_date->OldDays() + g_date->DayInYear( 15,9 ),
251 if (
m_field->GetVegBiomass()>0)
255 g_date->DayInYear( 30,10 ) - g_date->DayInYear()))
262 SimpleEvent( g_date->OldDays() + g_date->DayInYear( 20,9 ),
270 g_date->DayInYear( 5,10 ) - g_date->DayInYear())) {
275 SimpleEvent( g_date->OldDays() + g_date->DayInYear( 1,4 )+365,
283 g_date->DayInYear( 30,4 ) - g_date->DayInYear())) {
291 SimpleEvent( g_date->OldDays() + g_date->DayInYear( 10,4 ),
295 SimpleEvent( g_date->OldDays() + g_date->DayInYear( 25,3 ),
298 SimpleEvent( g_date->OldDays() + g_date->DayInYear( )+10,
300 SimpleEvent( g_date->OldDays() + g_date->DayInYear( 25,4 ),
302 SimpleEvent( g_date->OldDays() + g_date->DayInYear( 20,4 ),
304 SimpleEvent( g_date->OldDays() + g_date->DayInYear( 1,5 ),
306 SimpleEvent( g_date->OldDays() + g_date->DayInYear( 10,4 ),
308 SimpleEvent( g_date->OldDays() + g_date->DayInYear( 1,5 ),
316 g_date->DayInYear( 30,4 ) - g_date->DayInYear())) {
329 g_date->DayInYear( 10,5 ) - g_date->DayInYear())) {
341 g_date->DayInYear( 10,5 ) - g_date->DayInYear())) {
346 SimpleEvent( g_date->OldDays() + g_date->DayInYear( 20,5 ),
354 g_date->DayInYear( 15,5 ) - g_date->DayInYear())) {
366 g_date->DayInYear( 15,5 ) - g_date->DayInYear()))
373 SimpleEvent( g_date->OldDays() + g_date->DayInYear( 1,6 ),
384 g_date->DayInYear( 10,6 ) - g_date->DayInYear())) {
390 if ((g_date->Date()+7)<( g_date->OldDays() + g_date->DayInYear( 15,6 )))
391 SimpleEvent( g_date->OldDays() + g_date->DayInYear( 15,6 ),
404 g_date->DayInYear( 30,6 ) - g_date->DayInYear())) {
416 g_date->DayInYear( 25,4 ) - g_date->DayInYear())) {
422 if ((g_date->Date()+7)<( g_date->OldDays() + g_date->DayInYear( 15,6 )))
423 SimpleEvent( g_date->OldDays() + g_date->DayInYear( 25,4),
433 g_date->DayInYear( 5,5 ) - g_date->DayInYear())) {
444 g_date->DayInYear( 15,5 ) - g_date->DayInYear())) {
449 if ((g_date->Date()+5)<( g_date->OldDays() + g_date->DayInYear( 2,5 )))
450 SimpleEvent( g_date->OldDays() + g_date->DayInYear( 2,5 ),
459 g_date->DayInYear( 1,6 ) - g_date->DayInYear())) {
468 g_date->DayInYear( 15,4 ) - g_date->DayInYear())) {
473 SimpleEvent( g_date->OldDays() + g_date->DayInYear( 25,4 ),
475 SimpleEvent( g_date->OldDays() + g_date->DayInYear( 1,4 ),
483 g_date->DayInYear( 15,5 ) - g_date->DayInYear())) {
490 SimpleEvent( g_date->OldDays() + g_date->DayInYear( 5,8 ),
498 g_date->DayInYear( 5,5 ) - g_date->DayInYear())) {
507 g_date->DayInYear( 30,4 ) - g_date->DayInYear())) {
512 SimpleEvent( g_date->OldDays() + g_date->DayInYear( 5,8 ),
520 g_date->DayInYear( 20,4 ) - g_date->DayInYear())) {
524 SimpleEvent( g_date->OldDays() + g_date->DayInYear( 21,4 ),
533 g_date->DayInYear( 1,5 ) - g_date->DayInYear())) {
542 g_date->DayInYear( 20,8 ) - g_date->DayInYear()))
554 m_field->GetMDates(1,0) - g_date->DayInYear())) {
573 m_field->GetMDates(1,1) - g_date->DayInYear())) {
584 m_field->GetMDates(1,2) - g_date->DayInYear())) {
596 m_field->GetMDates(1,3) - g_date->DayInYear())) {
609 m_field->GetMDates(1,4) - g_date->DayInYear())) {
619 g_msg->Warn( WARN_BUG,
"WinterWheat::Do(): "
620 "Unknown event type! ",
"" );
References Farm::AutumnHarrow(), Farm::AutumnPlough(), Farm::AutumnRoll(), Farm::AutumnSow(), cfg_fungi_app_prop1, cfg_greg_app_prop, cfg_ins_app_prop1, cfg_strigling_prop, Farm::DeepPlough(), Farm::DoIt(), Farm::FA_Manure(), Farm::FA_NPK(), Farm::FA_Slurry(), Farm::FP_ManganeseSulphate(), Farm::FP_NPK(), Farm::FP_Slurry(), Farm::FungicideTreat(), Farm::GrowthRegulator(), Farm::Harvest(), Farm::HayBailing(), Farm::HayTurning(), Farm::InsecticideTreat(), 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, Crop::SimpleEvent(), Farm::SpringRoll(), Farm::StrawChopping(), Farm::Strigling(), Farm::StubbleHarrowing(), Farm::Water(), wws_autumn_harrow, wws_autumn_plough, wws_autumn_roll, wws_autumn_sow, wws_ferti_p1, wws_ferti_p2, wws_ferti_p3, wws_ferti_p4, wws_ferti_p5, wws_ferti_s1, wws_ferti_s2, wws_ferti_s3, wws_ferti_s4, wws_ferti_s5, wws_fungicide, wws_fungicide2, wws_GR, wws_grubning, wws_harvest, wws_hay_baling, wws_hay_turning, wws_insecticide1, wws_insecticide2, wws_insecticide3, wws_spring_roll, wws_start, wws_straw_chopping, wws_strigling0a, wws_strigling0b, wws_strigling1, wws_strigling2, wws_stubble_harrow1, wws_stubble_harrow2, wws_water1, wws_water2, WWStrigling_AUTUMN_PLOUGH, and WWStrigling_WAIT_FOR_PLOUGH.
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
Definition: WinterWheatStrigling.h:76
Definition: WinterWheatStrigling.h:56
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: WinterWheatStrigling.h:47
Definition: WinterWheatStrigling.h:65
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: WinterWheatStrigling.h:52
Definition: WinterWheatStrigling.h:80
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 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
bool DoIt(double a_probability)
Return chance out of 0 to 100.
Definition: farm.cpp:800
Definition: WinterWheatStrigling.h:66
Definition: WinterWheatStrigling.h:45
bool m_first_year
Definition: farm.h:467
#define WWStrigling_AUTUMN_PLOUGH
Definition: WinterWheatStrigling.h:42
Definition: WinterWheatStrigling.h:74
Definition: WinterWheatStrigling.h:70
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: WinterWheatStrigling.h:54
Definition: WinterWheatStrigling.h:71
Definition: WinterWheatStrigling.h:75
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: WinterWheatStrigling.h:58
virtual bool FungicideTreat(LE *a_field, double a_user, int a_days)
Apply fungicide to a_field.
Definition: farmfuncs.cpp:1279
Definition: WinterWheatStrigling.h:59
Definition: WinterWheatStrigling.h:50
void SimpleEvent(long a_date, int a_todo, bool a_lock)
Adds an event to this crop management.
Definition: farm.cpp:307
Definition: WinterWheatStrigling.h:68
CfgFloat cfg_fungi_app_prop1
Definition: WinterWheatStrigling.h:64
Definition: WinterWheatStrigling.h:63
Definition: WinterWheatStrigling.h:61
CfgFloat cfg_ins_app_prop1
Definition: WinterWheatStrigling.h:48
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: WinterWheatStrigling.h:51
CfgFloat cfg_greg_app_prop
Definition: WinterWheatStrigling.h:78
Definition: WinterWheatStrigling.h:73
Definition: WinterWheatStrigling.h:77
Definition: WinterWheatStrigling.h:60
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
Definition: WinterWheatStrigling.h:79
Definition: WinterWheatStrigling.h:72
Definition: WinterWheatStrigling.h:57
Farm * m_farm
Definition: farm.h:537
LE * m_field
Definition: farm.h:538
int m_todo
Definition: farm.h:469
virtual bool InsecticideTreat(LE *a_field, double a_user, int a_days)
Apply insecticide to a_field.
Definition: farmfuncs.cpp:1348
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: WinterWheatStrigling.h:55
#define WWStrigling_WAIT_FOR_PLOUGH
Definition: WinterWheatStrigling.h:41
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
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: WinterWheatStrigling.h:62
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
Definition: WinterWheatStrigling.h:49
Definition: WinterWheatStrigling.h:67
virtual bool GrowthRegulator(LE *a_field, double a_user, int a_days)
Apply growth regulator to a_field.
Definition: farmfuncs.cpp:1250
Definition: WinterWheatStrigling.h:69
Definition: WinterWheatStrigling.h:53
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
CfgFloat cfg_strigling_prop
virtual bool StubbleHarrowing(LE *a_field, double a_user, int a_days)
Carry out stubble harrowing on a_field.
Definition: farmfuncs.cpp:2209