ALMaSS Skylark ODDox
1.1
The skylark model description following ODdox protocol
|
#include <OWinterWheat.h>
◆ OWinterWheat()
OWinterWheat::OWinterWheat |
( |
| ) |
|
|
inline |
◆ Do()
bool OWinterWheat::Do |
( |
Farm * |
a_farm, |
|
|
LE * |
a_field, |
|
|
FarmEvent * |
a_ev |
|
) |
| |
|
virtual |
Reimplemented from Crop.
51 m_field->SetMDates(0,0,g_date->DayInYear(1,8));
53 m_field->SetMDates(1,0,g_date->DayInYear(20,8));
54 m_field->SetMDates(0,1,g_date->DayInYear(5,8));
55 m_field->SetMDates(1,1,g_date->DayInYear(5,9));
56 m_field->SetMDates(0,2,g_date->DayInYear(25,8));
57 m_field->SetMDates(1,2,g_date->DayInYear(25,8));
58 m_field->SetMDates(0,3,g_date->DayInYear(25,8));
59 m_field->SetMDates(1,3,g_date->DayInYear(30,8));
60 m_field->SetMDates(0,4,g_date->DayInYear(5,8));
61 m_field->SetMDates(1,4,g_date->DayInYear(5,8));
62 m_field->SetMDates(0,5,g_date->DayInYear(15,9));
63 m_field->SetMDates(1,5,g_date->DayInYear(15,9));
64 m_field->SetMDates(0,6,g_date->DayInYear(1,8));
65 m_field->SetMDates(1,6,g_date->DayInYear(30,8));
73 g_msg->Warn( WARN_BUG,
"OWinterWheat::Do(): "
74 "Harvest too late for the next crop to start!!!",
"" );
78 for (
int i=0; i<noDates; i++)
91 int today=g_date->Date();
93 d1 = g_date->OldDays() + g_date->DayInYear( 1,7 );
97 g_msg->Warn( WARN_BUG,
"OWinterWheat::Do(): "
98 "Crop start attempt between 1st Jan & 1st July",
"" );
107 g_msg->Warn( WARN_BUG,
"OWinterWheat::Do(): "
108 "Crop start attempt after last possible start date",
"" );
115 SimpleEvent( g_date->OldDays() + g_date->DayInYear(28,8),
123 if ( g_date->Date() > d1 ) {
140 g_date->DayInYear( 30,9 ) - g_date->DayInYear())) {
152 g_date->DayInYear( 30,9 ) - g_date->DayInYear())) {
162 g_date->DayInYear( 30,9 ) - g_date->DayInYear())) {
171 g_date->DayInYear( 10,10 ) - g_date->DayInYear())) {
175 SimpleEvent( g_date->OldDays() + g_date->DayInYear( 20,9 ),
181 g_date->DayInYear( 10,10 ) - g_date->DayInYear())) {
186 long newdate1 = g_date->OldDays() + g_date->DayInYear( 10,9 );
187 long newdate2 = g_date->Date() + 10;
188 if ( newdate2 > newdate1 )
196 g_date->DayInYear( 10,10 ) - g_date->DayInYear())) {
200 SimpleEvent( g_date->OldDays() + g_date->DayInYear( 24,9 ),
210 g_date->DayInYear( 24,10 ) - g_date->DayInYear())) {
216 SimpleEvent( g_date->OldDays() + g_date->DayInYear( 25,3 )+365,
222 g_date->DayInYear( 15,4 ) - g_date->DayInYear())) {
226 SimpleEvent( g_date->OldDays() + g_date->DayInYear( 1,4 ),
234 g_date->DayInYear( 30,4 ) - g_date->DayInYear())) {
249 g_date->DayInYear( 30,4 ) - g_date->DayInYear())) {
258 g_date->DayInYear( 30,4 ) - g_date->DayInYear())) {
269 g_date->DayInYear( 30,4 ) - g_date->DayInYear())) {
276 SimpleEvent( g_date->OldDays() + g_date->DayInYear( 1,5 ),
280 SimpleEvent( g_date->OldDays() + g_date->DayInYear( 1,8 ),
288 g_date->DayInYear( 30,5 ) - g_date->DayInYear())) {
293 SimpleEvent( g_date->OldDays() + g_date->DayInYear( 1,8 ),
299 m_field->GetMDates(1,0) - g_date->DayInYear())) {
311 m_field->GetMDates(1,0) - g_date->DayInYear()))
319 SimpleEvent( g_date->OldDays() + g_date->DayInYear( 1,8 ),
326 int d1=g_date->Date() + 3;
336 m_field->GetMDates(1,2) - g_date->DayInYear())) {
342 long d1 = g_date->OldDays() + g_date->DayInYear( 7,8 );
343 long d2 = g_date->Date() + 3;
344 if ( d2 > d1 ) d1 = d2;
352 m_field->GetMDates(1,3) - g_date->DayInYear())) {
369 m_field->GetMDates(1,1) - g_date->DayInYear())) {
373 int d1=g_date->Date()+10;
384 m_field->GetMDates(1,5) - g_date->DayInYear()))
398 m_field->GetMDates(1,6) - g_date->DayInYear()))
418 g_msg->Warn( WARN_BUG,
"OWinterWheat::Do(): "
419 "Unknown event type! ",
"" );
References Farm::AutumnHarrow(), Farm::AutumnPlough(), Farm::AutumnSow(), cfg_strigling_prop, Farm::DeepPlough(), Farm::DoIt(), Farm::FA_Manure(), Farm::FA_Slurry(), Farm::FP_Manure(), Farm::FP_Slurry(), Farm::Harvest(), Farm::HayBailing(), Farm::HayTurning(), Farm::IsStockFarmer(), 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, oww_autumn_harrow, oww_autumn_plough, oww_autumn_sow, oww_catch_all, oww_deep_plough, oww_ferti_p1, oww_ferti_p2, oww_ferti_s1, oww_ferti_s2, oww_ferti_s3, OWW_HARROW_RUNS, oww_harvest, oww_hay_baling, oww_hay_turning, OWW_PLOUGH_RUNS, oww_spring_roll1, oww_spring_roll2, oww_start, oww_straw_chopping, oww_strigling1, oww_strigling2, oww_strigling_sow, oww_stubble_harrow1, oww_stubble_harrow2, Crop::SimpleEvent(), Farm::SpringRoll(), Farm::StrawChopping(), Farm::Strigling(), Farm::StriglingSow(), and Farm::StubbleHarrowing().
The documentation for this class was generated from the following files:
Definition: OWinterWheat.h:53
Definition: OWinterWheat.h:50
Definition: OWinterWheat.h:36
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: OWinterWheat.h:38
bool IsStockFarmer(void)
Definition: farm.h:905
#define OWW_PLOUGH_RUNS
Definition: OWinterWheat.h:32
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: OWinterWheat.h:55
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
bool DoIt(double a_probability)
Return chance out of 0 to 100.
Definition: farm.cpp:800
Definition: OWinterWheat.h:52
bool m_first_year
Definition: farm.h:467
Definition: OWinterWheat.h:43
#define OWW_HARROW_RUNS
Definition: OWinterWheat.h:33
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: OWinterWheat.h:56
int m_first_date
Definition: farm.h:540
int m_startday
Definition: farm.h:466
Definition: OWinterWheat.h:46
void SimpleEvent(long a_date, int a_todo, bool a_lock)
Adds an event to this crop management.
Definition: farm.cpp:307
virtual bool FP_Manure(LE *a_field, double a_user, int a_days)
Spread manure on a_field owned by an arable farmer.
Definition: farmfuncs.cpp:773
Definition: OWinterWheat.h:44
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: OWinterWheat.h:57
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: OWinterWheat.h:45
Definition: OWinterWheat.h:54
Farm * m_farm
Definition: farm.h:537
LE * m_field
Definition: farm.h:538
int m_todo
Definition: farm.h:469
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: OWinterWheat.h:51
int m_last_date
Definition: farm.h:542
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: OWinterWheat.h:41
virtual bool StriglingSow(LE *a_field, double a_user, int a_days)
Carry out a mechanical weeding followed by sowing on a_field.
Definition: farmfuncs.cpp:1597
Definition: OWinterWheat.h:42
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: OWinterWheat.h:39
Definition: OWinterWheat.h:59
Definition: OWinterWheat.h:48
CfgFloat cfg_strigling_prop
Definition: OWinterWheat.h:40
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: OWinterWheat.h:47
virtual bool StubbleHarrowing(LE *a_field, double a_user, int a_days)
Carry out stubble harrowing on a_field.
Definition: farmfuncs.cpp:2209
Definition: OWinterWheat.h:58