ALMaSS Skylark ODDox
1.1
The skylark model description following ODdox protocol
|
#include <OBarleyPeaCloverGrass.h>
◆ OBarleyPeaCloverGrass()
OBarleyPeaCloverGrass::OBarleyPeaCloverGrass |
( |
| ) |
|
|
inline |
◆ Do()
bool OBarleyPeaCloverGrass::Do |
( |
Farm * |
a_farm, |
|
|
LE * |
a_field, |
|
|
FarmEvent * |
a_ev |
|
) |
| |
|
virtual |
Reimplemented from Crop.
50 m_field->SetMDates(0,0,g_date->DayInYear(25,7));
52 m_field->SetMDates(1,0,g_date->DayInYear(25,8));
53 m_field->SetMDates(0,1,g_date->DayInYear(10,10));
54 m_field->SetMDates(1,1,g_date->DayInYear(10,10));
55 m_field->SetMDates(0,2,g_date->DayInYear(25,7));
56 m_field->SetMDates(1,2,g_date->DayInYear(1,8));
64 g_msg->Warn( WARN_BUG,
"OBarleyPeaCloverGrass::Do(): "
65 "Harvest too late for the next crop to start!!!",
"" );
69 for (
int i=0; i<noDates; i++)
81 int today=g_date->Date();
87 g_msg->Warn( WARN_BUG,
"OBarleyPeaCloverGrass::Do(): "
88 "Crop start attempt after last possible start date",
"" );
100 g_date->DayInYear( 10, 4 ) - g_date->DayInYear()))
113 g_date->DayInYear( 10, 4 ) - g_date->DayInYear())) {
118 SimpleEvent( g_date->OldDays() + g_date->DayInYear( 15, 3 ),
124 g_date->DayInYear( 10, 4 ) - g_date->DayInYear())) {
133 g_date->DayInYear( 10, 4 ) - g_date->DayInYear())) {
142 g_date->DayInYear( 10, 4 ) - g_date->DayInYear())) {
146 SimpleEvent( g_date->OldDays() + g_date->DayInYear( 20, 3 ),
152 g_date->DayInYear( 12, 4 ) - g_date->DayInYear())) {
156 SimpleEvent( g_date->OldDays() + g_date->DayInYear( 20,3 ),
162 g_date->DayInYear( 12, 4 ) - g_date->DayInYear())) {
166 SimpleEvent( g_date->OldDays() + g_date->DayInYear( 5,6 ),
174 g_date->DayInYear( 15,6 ) - g_date->DayInYear())) {
179 SimpleEvent( g_date->OldDays() + g_date->DayInYear( 16,6 ),
184 SimpleEvent( g_date->OldDays() + g_date->DayInYear( 15,7 ),
190 g_date->DayInYear( 30,6 ) - g_date->DayInYear())) {
202 m_field->GetMDates(1,2) - g_date->DayInYear())) {
206 m_field->SetGrowthPhase( harvest1 );
209 if ((g_date->DayInYear( )+21)>=
m_field->GetMDates(0,1))
211 else d1=g_date->DayInYear( )+21;
222 m_field->GetMDates(1,0) - g_date->DayInYear())) {
228 if ((g_date->DayInYear( )+21)>=
m_field->GetMDates(0,1))
230 else d1=g_date->DayInYear( )+21;
239 m_field->GetMDates(0,1) - g_date->DayInYear())) {
246 m_field->GetMDates(0,1) - g_date->DayInYear())) {
263 m_field->GetMDates(1,1) - g_date->DayInYear(),
m_field->GetMDates(1,1)))
271 m_field->GetMDates(1,1) - g_date->DayInYear(),
m_field->GetMDates(1,1)))
282 g_msg->Warn( WARN_BUG,
"OBarleyPeaCloverGrass::Do(): "
283 "Unknown event type! ",
"" );
References Farm::CattleIsOut(), Farm::CattleIsOutLow(), Farm::CattleOut(), Farm::CattleOutLowGrazing(), cfg_organic_extensive, Farm::CutToSilage(), Farm::DoIt(), Farm::FA_Manure(), Farm::FA_Slurry(), Farm::Harvest(), 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, obpcg_cattle_is_out, obpcg_cattle_out, obpcg_cut_to_silage, obpcg_ferti_one, obpcg_ferti_zero, obpcg_harvest, obpcg_spring_harrow, obpcg_spring_plough, obpcg_spring_roll, obpcg_spring_sow1, obpcg_spring_sow2, obpcg_start, obpcg_water1, obpcg_water2, Crop::SimpleEvent(), Farm::SpringHarrow(), Farm::SpringPlough(), Farm::SpringRoll(), Farm::SpringSow(), and Farm::Water().
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
virtual bool SpringPlough(LE *a_field, double a_user, int a_days)
Carry out a ploughing event in the spring on a_field.
Definition: farmfuncs.cpp:444
Definition: OBarleyPeaCloverGrass.h:38
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
Definition: OBarleyPeaCloverGrass.h:37
Definition: OBarleyPeaCloverGrass.h:39
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
bool m_first_year
Definition: farm.h:467
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
CfgBool cfg_organic_extensive
Definition: OBarleyPeaCloverGrass.h:47
int m_first_date
Definition: farm.h:540
int m_startday
Definition: farm.h:466
Definition: OBarleyPeaCloverGrass.h:44
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: OBarleyPeaCloverGrass.h:41
Definition: OBarleyPeaCloverGrass.h:34
Definition: OBarleyPeaCloverGrass.h:45
Farm * m_farm
Definition: farm.h:537
LE * m_field
Definition: farm.h:538
int m_todo
Definition: farm.h:469
Definition: OBarleyPeaCloverGrass.h:40
Definition: OBarleyPeaCloverGrass.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
virtual bool SpringSow(LE *a_field, double a_user, int a_days)
Carry out a sowing event in the spring on a_field.
Definition: farmfuncs.cpp:546
Definition: OBarleyPeaCloverGrass.h:48
Definition: OBarleyPeaCloverGrass.h:36
Definition: OBarleyPeaCloverGrass.h:46
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: OBarleyPeaCloverGrass.h:35
virtual bool SpringHarrow(LE *a_field, double a_user, int a_days)
Carry out a harrow event in the spring on a_field.
Definition: farmfuncs.cpp:471