ALMaSS Skylark ODDox
1.1
The skylark model description following ODdox protocol
|
#include <WinterWheatStriglingCulm.h>
◆ WinterWheatStriglingCulm()
WinterWheatStriglingCulm::WinterWheatStriglingCulm |
( |
| ) |
|
|
inline |
◆ Do()
bool WinterWheatStriglingCulm::Do |
( |
Farm * |
a_farm, |
|
|
LE * |
a_field, |
|
|
FarmEvent * |
a_ev |
|
) |
| |
|
virtual |
Reimplemented from Crop.
61 m_field->SetMDates(0,0,g_date->DayInYear(20,8));
64 m_field->SetMDates(1,0,g_date->DayInYear(20,8));
66 m_field->SetMDates(1,1,g_date->DayInYear(20,8));
67 m_field->SetMDates(0,2,g_date->DayInYear(5,8));
68 m_field->SetMDates(1,2,g_date->DayInYear(25,8));
69 m_field->SetMDates(0,3,g_date->DayInYear(10,8));
70 m_field->SetMDates(1,3,g_date->DayInYear(15,9));
71 m_field->SetMDates(0,4,g_date->DayInYear(15,8));
72 m_field->SetMDates(1,4,g_date->DayInYear(15,10));
84 g_msg->Warn( WARN_BUG,
"WinterWheat::Do(): "
85 "Harvest too late for the next crop to start!!!",
"" );
90 for (
int i=0; i<noDates; i++) {
100 if (toggle)
for (
int i=0; i<10; i++)
m_field->SetMConstants(i,0);
110 d1 = g_date->OldDays() + g_date->DayInYear( 1,7 );
111 if (g_date->Date() < d1 ) {
113 printf (
"Poly: %d\n",
m_field->GetPoly());
114 g_msg->Warn( WARN_BUG,
"WinterWheatStrigling::Do(): "
115 "Crop start attempt between 1st Jan & 1st July",
"" );
121 if (g_date->Date() > d1)
124 g_msg->Warn( WARN_BUG,
"WinterWheatStrigling::Do(): "
125 "Crop start attempt after last possible start date",
"" );
133 SimpleEvent( g_date->OldDays() + g_date->DayInYear( 1,4 ),
140 d1 = g_date->OldDays() + g_date->DayInYear( 21,8 );
154 g_date->DayInYear( 1,10 ) - g_date->DayInYear())) {
164 g_date->DayInYear( 1,10 ) - g_date->DayInYear())) {
178 g_date->DayInYear( 1,10 ) - g_date->DayInYear())) {
190 g_date->DayInYear( 1,10 ) - g_date->DayInYear())) {
206 g_date->DayInYear( 10,10 ) - g_date->DayInYear())) {
210 SimpleEvent( g_date->OldDays() + g_date->DayInYear( 10,9 ),
216 g_date->DayInYear( 10,10 ) - g_date->DayInYear())) {
220 SimpleEvent( g_date->OldDays() + g_date->DayInYear( 10,9 ),
226 g_date->DayInYear( 20,10 ) - g_date->DayInYear())) {
237 g_date->DayInYear( 27,10 ) - g_date->DayInYear())) {
242 SimpleEvent( g_date->OldDays() + g_date->DayInYear( 15,9 ),
249 if (
m_field->GetVegBiomass()>0)
253 g_date->DayInYear( 30,10 ) - g_date->DayInYear()))
260 SimpleEvent( g_date->OldDays() + g_date->DayInYear( 1,10 ),
266 g_date->DayInYear( 1,10 ) - g_date->DayInYear())) {
270 SimpleEvent( g_date->OldDays() + g_date->DayInYear( 1,4 )+365,
278 g_date->DayInYear( 30,4 ) - g_date->DayInYear())) {
286 SimpleEvent( g_date->OldDays() + g_date->DayInYear( 10,4 ),
290 SimpleEvent( g_date->OldDays() + g_date->DayInYear( 25,3 ),
294 SimpleEvent( g_date->OldDays() + g_date->DayInYear( 15,4),
297 SimpleEvent( g_date->OldDays() + g_date->DayInYear( 25,4 ),
299 SimpleEvent( g_date->OldDays() + g_date->DayInYear( 20,4 ),
301 SimpleEvent( g_date->OldDays() + g_date->DayInYear( 1,5 ),
304 SimpleEvent( g_date->OldDays() + g_date->DayInYear( 25,4 ),
307 SimpleEvent( g_date->OldDays() + g_date->DayInYear( 1,5 ),
313 g_date->DayInYear( 15,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())) {
362 g_date->DayInYear( 15,5 ) - g_date->DayInYear()))
369 SimpleEvent( g_date->OldDays() + g_date->DayInYear( 1,6 ),
380 g_date->DayInYear( 10,6 ) - g_date->DayInYear())) {
386 if ((g_date->Date()+7)<( g_date->OldDays() + g_date->DayInYear( 15,6 )))
387 SimpleEvent( g_date->OldDays() + g_date->DayInYear( 15,6 ),
400 g_date->DayInYear( 30,6 ) - g_date->DayInYear())) {
410 g_date->DayInYear( 25,4 ) - g_date->DayInYear())) {
416 SimpleEvent( g_date->OldDays() + g_date->DayInYear( 5,5),
424 g_date->DayInYear( 5,5 ) - g_date->DayInYear())) {
436 g_date->DayInYear( 15,5 ) - g_date->DayInYear())) {
441 if ((g_date->Date()+5)<( g_date->OldDays() + g_date->DayInYear( 2,5 )))
442 SimpleEvent( g_date->OldDays() + g_date->DayInYear( 2,5 ),
451 g_date->DayInYear( 1,6 ) - g_date->DayInYear())) {
460 g_date->DayInYear( 15,4 ) - g_date->DayInYear())) {
465 SimpleEvent( g_date->OldDays() + g_date->DayInYear( 25,4 ),
467 SimpleEvent( g_date->OldDays() + g_date->DayInYear( 1,4 ),
475 g_date->DayInYear( 15,5 ) - g_date->DayInYear())) {
482 SimpleEvent( g_date->OldDays() + g_date->DayInYear( 5,8 ),
490 g_date->DayInYear( 5,5 ) - g_date->DayInYear())) {
499 g_date->DayInYear( 30,4 ) - g_date->DayInYear())) {
504 SimpleEvent( g_date->OldDays() + g_date->DayInYear( 5,8 ),
512 g_date->DayInYear( 20,4 ) - g_date->DayInYear())) {
516 SimpleEvent( g_date->OldDays() + g_date->DayInYear( 21,4 ),
525 g_date->DayInYear( 1,5 ) - g_date->DayInYear())) {
534 g_date->DayInYear( 20,8 ) - g_date->DayInYear()))
546 m_field->GetMDates(1,0) - g_date->DayInYear())) {
565 m_field->GetMDates(1,1) - g_date->DayInYear())) {
576 m_field->GetMDates(1,2) - g_date->DayInYear())) {
588 m_field->GetMDates(1,3) - g_date->DayInYear())) {
601 m_field->GetMDates(1,4) - g_date->DayInYear())) {
611 g_msg->Warn( WARN_BUG,
"WinterWheat::Do(): "
612 "Unknown event type! ",
"" );
References Farm::AutumnHarrow(), Farm::AutumnPlough(), Farm::AutumnRoll(), Farm::AutumnSow(), cfg_CulmLastStriglingTime, cfg_fungi_app_prop1, cfg_greg_app_prop, cfg_ins_app_prop1, 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(), wwsc_autumn_harrow, wwsc_autumn_plough, wwsc_autumn_roll, wwsc_autumn_sow, wwsc_ferti_p1, wwsc_ferti_p2, wwsc_ferti_p3, wwsc_ferti_p4, wwsc_ferti_p5, wwsc_ferti_s1, wwsc_ferti_s2, wwsc_ferti_s3, wwsc_ferti_s4, wwsc_ferti_s5, wwsc_fungicide, wwsc_fungicide2, wwsc_GR, wwsc_grubning, wwsc_harvest, wwsc_hay_baling, wwsc_hay_turning, wwsc_insecticide1, wwsc_insecticide2, wwsc_insecticide3, wwsc_spring_roll, wwsc_start, wwsc_straw_chopping, wwsc_strigling0a, wwsc_strigling0b, wwsc_strigling1, wwsc_strigling2, wwsc_stubble_harrow1, wwsc_stubble_harrow2, wwsc_water1, wwsc_water2, WWStriglingCulm_AUTUMN_PLOUGH, and WWStriglingCulm_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: WinterWheatStriglingCulm.h:79
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
CfgFloat cfg_greg_app_prop
Definition: WinterWheatStriglingCulm.h:53
Definition: WinterWheatStriglingCulm.h:60
bool IsStockFarmer(void)
Definition: farm.h:905
Definition: WinterWheatStriglingCulm.h:68
virtual bool Strigling(LE *a_field, double a_user, int a_days)
Carry out a mechanical weeding on a_field.
Definition: farmfuncs.cpp:1545
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
Definition: WinterWheatStriglingCulm.h:58
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: WinterWheatStriglingCulm.h:48
bool m_first_year
Definition: farm.h:467
Definition: WinterWheatStriglingCulm.h:65
Definition: WinterWheatStriglingCulm.h:71
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: WinterWheatStriglingCulm.h:57
Definition: WinterWheatStriglingCulm.h:64
Definition: WinterWheatStriglingCulm.h:56
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
virtual bool FungicideTreat(LE *a_field, double a_user, int a_days)
Apply fungicide to a_field.
Definition: farmfuncs.cpp:1279
void SimpleEvent(long a_date, int a_todo, bool a_lock)
Adds an event to this crop management.
Definition: farm.cpp:307
CfgInt cfg_CulmLastStriglingTime
Definition: WinterWheatStriglingCulm.h:62
Definition: WinterWheatStriglingCulm.h:45
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: WinterWheatStriglingCulm.h:69
Definition: WinterWheatStriglingCulm.h:74
Definition: WinterWheatStriglingCulm.h:51
Definition: WinterWheatStriglingCulm.h:78
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: WinterWheatStriglingCulm.h:75
Definition: WinterWheatStriglingCulm.h:77
Definition: WinterWheatStriglingCulm.h:55
Definition: WinterWheatStriglingCulm.h:80
Definition: WinterWheatStriglingCulm.h:63
Definition: WinterWheatStriglingCulm.h:50
#define WWStriglingCulm_WAIT_FOR_PLOUGH
Definition: WinterWheatStriglingCulm.h:41
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: WinterWheatStriglingCulm.h:67
Definition: WinterWheatStriglingCulm.h:47
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: WinterWheatStriglingCulm.h:59
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
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: WinterWheatStriglingCulm.h:66
Definition: WinterWheatStriglingCulm.h:52
virtual bool GrowthRegulator(LE *a_field, double a_user, int a_days)
Apply growth regulator to a_field.
Definition: farmfuncs.cpp:1250
Definition: WinterWheatStriglingCulm.h:73
Definition: WinterWheatStriglingCulm.h:76
CfgFloat cfg_fungi_app_prop1
Definition: WinterWheatStriglingCulm.h:70
Definition: WinterWheatStriglingCulm.h:61
CfgFloat cfg_ins_app_prop1
#define WWStriglingCulm_AUTUMN_PLOUGH
Definition: WinterWheatStriglingCulm.h:42
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
Definition: WinterWheatStriglingCulm.h:54
Definition: WinterWheatStriglingCulm.h:49
Definition: WinterWheatStriglingCulm.h:72
virtual bool StubbleHarrowing(LE *a_field, double a_user, int a_days)
Carry out stubble harrowing on a_field.
Definition: farmfuncs.cpp:2209