ALMaSS Skylark ODDox
1.1
The skylark model description following ODdox protocol
|
#include <OCloverGrassGrazed2.h>
◆ OCloverGrassGrazed2()
OCloverGrassGrazed2::OCloverGrassGrazed2 |
( |
| ) |
|
|
inline |
◆ Do()
bool OCloverGrassGrazed2::Do |
( |
Farm * |
a_farm, |
|
|
LE * |
a_field, |
|
|
FarmEvent * |
a_ev |
|
) |
| |
|
virtual |
Reimplemented from Crop.
57 m_field->SetMDates(0,0,g_date->DayInYear(27,7));
59 m_field->SetMDates(1,0,g_date->DayInYear(10,10));
60 m_field->SetMDates(0,1,g_date->DayInYear(1,9));
61 m_field->SetMDates(1,1,g_date->DayInYear(1,10));
69 g_msg->Warn( WARN_BUG,
"OCloverGrassGrazed2::Do(): "
70 "Harvest too late for the next crop to start!!!",
"" );
74 for (
int i=0; i<noDates; i++)
84 d1 = g_date->OldDays() + g_date->DayInYear( 1,7 );
85 if (g_date->Date() < d1) {
87 g_msg->Warn( WARN_BUG,
"OCloverGrassGrazed2::Do(): "
88 "Crop start attempt between 1st Jan & 1st July",
"" );
92 if (g_date->Date() > d1) {
94 g_msg->Warn( WARN_BUG,
"OCloverGrassGrazed2::Do(): "
95 "Crop start attempt after last possible start date",
102 d1 = g_date->OldDays() + g_date->DayInYear( 1, 4 );
117 g_date->DayInYear( 30, 4 ) - g_date->DayInYear())) {
123 SimpleEvent( g_date->OldDays() + g_date->DayInYear( 1,5 ),
129 SimpleEvent( g_date->OldDays() + g_date->DayInYear( 15, 5 ),
139 g_date->DayInYear())) {
147 g_date->DayInYear())) {
157 SimpleEvent( g_date->OldDays() + g_date->DayInYear( 25,5 ),
165 g_date->DayInYear(),
m_field->GetMDates(1,1))) {
173 g_date->DayInYear(),
m_field->GetMDates(1,1)))
189 g_date->DayInYear( 25, 6 ) -
190 g_date->DayInYear())) {
208 g_date->DayInYear())) {
215 m_field->SetMDates(1,1,g_date->DayInYear()-1);
227 g_date->DayInYear( 30, 5 ) -
228 g_date->DayInYear())) {
235 long newdate1 = g_date->OldDays() + g_date->DayInYear( 1,6 );
236 long newdate2 = g_date->Date() + 7;
237 if ( newdate2 > newdate1 )
251 g_date->DayInYear( 15, 6 ) -
252 g_date->DayInYear())) {
264 g_msg->Warn( WARN_BUG,
"OCloverGrassGrazed2::Do(): "
265 "Unknown event type! ",
"" );
References cfg_organic_extensive, cfg_silage_prop, ocgg2_cattle_is_out, ocgg2_cattle_out, OCGG2_CUT_DATE, ocgg2_cut_to_silage, ocgg2_ferti_zero, ocgg2_start, ocgg2_stubble_harrow, OCGG2_WATER_DATE, ocgg2_water_one, and ocgg2_water_zero.
The documentation for this class was generated from the following files:
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
bool m_lock
Definition: farm.h:465
virtual bool CattleIsOut(LE *a_field, double a_user, int a_days, int a_max)
Generate a 'cattle_out' event for every day the cattle are on a_field.
Definition: farmfuncs.cpp:1974
virtual bool CutToSilage(LE *a_field, double a_user, int a_days)
Cut vegetation for silage on a_field.
Definition: farmfuncs.cpp:2329
bool DoIt(double a_probability)
Return chance out of 0 to 100.
Definition: farm.cpp:800
Definition: OCloverGrassGrazed2.h:36
bool m_first_year
Definition: farm.h:467
#define OCGG2_WATER_DATE
Definition: OCloverGrassGrazed2.h:32
#define OCGG2_CUT_DATE
Definition: OCloverGrassGrazed2.h:31
CfgBool cfg_organic_extensive
int m_first_date
Definition: farm.h:540
int m_startday
Definition: farm.h:466
virtual bool CattleIsOutLow(LE *a_field, double a_user, int a_days, int a_max)
Generate a 'cattle_out_low' event for every day the cattle are on a_field.
Definition: farmfuncs.cpp:2018
void SimpleEvent(long a_date, int a_todo, bool a_lock)
Adds an event to this crop management.
Definition: farm.cpp:307
virtual bool CattleOutLowGrazing(LE *a_field, double a_user, int a_days)
Start a extensive grazing event on a_field today.
Definition: farmfuncs.cpp:1944
Definition: OCloverGrassGrazed2.h:39
Definition: OCloverGrassGrazed2.h:43
Definition: OCloverGrassGrazed2.h:37
Definition: OCloverGrassGrazed2.h:38
Farm * m_farm
Definition: farm.h:537
LE * m_field
Definition: farm.h:538
int m_todo
Definition: farm.h:469
Definition: OCloverGrassGrazed2.h:42
virtual bool Water(LE *a_field, double a_user, int a_days)
Carry out a watering on a_field.
Definition: farmfuncs.cpp:1717
int m_last_date
Definition: farm.h:542
Definition: OCloverGrassGrazed2.h:41
FarmEvent * m_ev
Definition: farm.h:539
virtual bool CattleOut(LE *a_field, double a_user, int a_days)
Start a grazing event on a_field today.
Definition: farmfuncs.cpp:1910
Definition: OCloverGrassGrazed2.h:40
virtual bool StubbleHarrowing(LE *a_field, double a_user, int a_days)
Carry out stubble harrowing on a_field.
Definition: farmfuncs.cpp:2209