ALMaSS Skylark ODDox
1.1
The skylark model description following ODdox protocol
|
#include <SpringBarleyCloverGrassStrigling.h>
◆ SpringBarleyCloverGrassStrigling()
SpringBarleyCloverGrassStrigling::SpringBarleyCloverGrassStrigling |
( |
| ) |
|
|
inline |
◆ Do()
bool SpringBarleyCloverGrassStrigling::Do |
( |
Farm * |
a_farm, |
|
|
LE * |
a_field, |
|
|
FarmEvent * |
a_ev |
|
) |
| |
|
virtual |
Reimplemented from Crop.
59 m_field->SetMDates(0,0,g_date->DayInYear(1,8));
61 m_field->SetMDates(1,0,g_date->DayInYear(25,8));
62 m_field->SetMDates(0,1,g_date->DayInYear(5,8));
63 m_field->SetMDates(1,1,g_date->DayInYear(30,8));
64 m_field->SetMDates(0,2,g_date->DayInYear(1,9));
65 m_field->SetMDates(1,2,g_date->DayInYear(15,10));
73 g_msg->Warn( WARN_BUG,
"SpringBarleyCloverGrass::Do(): "
74 "Harvest too late for the next crop to start!!!",
"" );
78 for (
int i=0; i<noDates; i++)
90 d1 = g_date->OldDays() + g_date->DayInYear( 1,7 );
91 if (g_date->Date() < d1)
94 g_msg->Warn( WARN_BUG,
"SpringBarleyCloverGrass::Do(): "
95 "Crop start attempt between 1st Jan & 1st July",
"" );
101 if (g_date->Date() > d1)
104 g_msg->Warn( WARN_BUG,
"SpringBarleyCloverGrass::Do(): "
105 "Crop start attempt after last possible start date",
"" );
113 SimpleEvent( g_date->OldDays() + g_date->DayInYear( 15,3 ),
120 d1 = g_date->OldDays() + g_date->DayInYear( 1, 11 );
121 if (g_date->Date() >= d1) d1 += 365;
130 g_date->DayInYear( 30,11 ) - g_date->DayInYear())) {
137 SimpleEvent( g_date->OldDays() + g_date->DayInYear( 15,3 )+365,
139 SimpleEvent( g_date->OldDays() + g_date->DayInYear( 15,3 )+365,
147 g_date->DayInYear( 15, 4 ) - g_date->DayInYear())) {
154 SimpleEvent( g_date->OldDays() + g_date->DayInYear( 15,3 ),
162 g_date->DayInYear( 15, 4 ) - g_date->DayInYear()))
179 g_date->DayInYear( 10, 4 ) - g_date->DayInYear())) {
184 SimpleEvent( g_date->OldDays() + g_date->DayInYear( 25,3 ),
190 g_date->DayInYear( 10,4 ) - g_date->DayInYear())) {
201 g_date->DayInYear( 10, 4 ) - g_date->DayInYear()))
207 SimpleEvent( g_date->OldDays() + g_date->DayInYear( 25,3 ),
213 g_date->DayInYear( 20,4 ) - g_date->DayInYear())) {
224 g_date->DayInYear( 21,4 ) - g_date->DayInYear())) {
229 SimpleEvent( g_date->OldDays() + g_date->DayInYear( 20,3 ),
231 SimpleEvent( g_date->OldDays() + g_date->DayInYear( 25,3 ),
239 g_date->DayInYear( 20,4 ) - g_date->DayInYear())) {
250 g_date->DayInYear( 30,4 ) - g_date->DayInYear())) {
256 SimpleEvent( g_date->OldDays() + g_date->DayInYear( 10,5 ),
258 SimpleEvent( g_date->OldDays() + g_date->DayInYear( 10,5 ),
260 SimpleEvent( g_date->OldDays() + g_date->DayInYear( 1,6 ),
270 g_date->DayInYear( 25,5 ) - g_date->DayInYear())) {
282 g_date->DayInYear( 15,6 ) - g_date->DayInYear()))
288 if (g_date->DayInYear()+5<g_date->DayInYear( 16,6 ))
289 SimpleEvent( g_date->OldDays() + g_date->DayInYear( 16,6 ),
300 g_date->DayInYear( 1,7 ) - g_date->DayInYear()))
314 g_date->DayInYear( 25,5 ) - g_date->DayInYear())) {
324 SimpleEvent( g_date->OldDays() + g_date->DayInYear( 15,5 ),
333 g_date->DayInYear( 10,6 ) - g_date->DayInYear())) {
339 SimpleEvent( g_date->OldDays() + g_date->DayInYear( 1,8 ),
345 m_field->GetMDates(1,0) - g_date->DayInYear())) {
355 m_field->GetMDates(1,1) - g_date->DayInYear()))
362 if (
m_field->GetMDates(1,2)-
m_field->GetMDates(0,2)<14) done=
true;
374 m_field->GetMDates(1,2) - g_date->DayInYear()))
384 m_field->GetMDates(1,2) - g_date->DayInYear(),
m_field->GetMDates(1,2)))
394 g_msg->Warn( WARN_BUG,
"SpringBarleyCloverGrass::Do(): "
395 "Unknown event type! ",
"" );
References Farm::AutumnPlough(), Farm::CattleIsOut(), Farm::CattleOut(), cfg_greg_app_prop, cfg_herbi_app_prop, cfg_ins_app_prop1, cfg_strigling_prop, Farm::DoIt(), Farm::FA_Manure(), Farm::FA_NPK(), Farm::FA_Slurry(), Farm::FungicideTreat(), Farm::GrowthRegulator(), Farm::Harvest(), Farm::HayBailing(), Farm::InsecticideTreat(), 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, sbcgs_autumn_plough, sbcgs_cattle_is_out, sbcgs_cattle_out, SBCGS_FERTI_DONE, sbcgs_ferti_s1, sbcgs_ferti_s2, sbcgs_ferti_s3, sbcgs_fungicide, sbcgs_GR, sbcgs_harvest, sbcgs_hay_baling, sbcgs_insecticide, SBCGS_ISAUTUMNPLOUGH, SBCGS_SPRAY, sbcgs_spring_harrow, sbcgs_spring_plough, sbcgs_spring_roll, sbcgs_spring_sow, sbcgs_start, sbcgs_strigling1, sbcgs_strigling_sow, sbcgs_water1, sbcgs_water2, Crop::SimpleEvent(), Farm::SpringHarrow(), Farm::SpringPlough(), Farm::SpringRoll(), Farm::SpringSow(), Farm::Strigling(), Farm::StriglingSow(), 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: SpringBarleyCloverGrassStrigling.h:49
Definition: SpringBarleyCloverGrassStrigling.h:42
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: SpringBarleyCloverGrassStrigling.h:51
Definition: SpringBarleyCloverGrassStrigling.h:54
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: SpringBarleyCloverGrassStrigling.h:53
CfgFloat cfg_herbi_app_prop
Definition: SpringBarleyCloverGrassStrigling.h:38
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
bool DoIt(double a_probability)
Return chance out of 0 to 100.
Definition: farm.cpp:800
Definition: SpringBarleyCloverGrassStrigling.h:39
bool m_first_year
Definition: farm.h:467
CfgFloat cfg_strigling_prop
CfgFloat cfg_greg_app_prop
Definition: SpringBarleyCloverGrassStrigling.h:37
Definition: SpringBarleyCloverGrassStrigling.h:41
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
#define SBCGS_SPRAY
Definition: SpringBarleyCloverGrassStrigling.h:34
Definition: SpringBarleyCloverGrassStrigling.h:48
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
Definition: SpringBarleyCloverGrassStrigling.h:44
Definition: SpringBarleyCloverGrassStrigling.h:47
virtual bool HayBailing(LE *a_field, double a_user, int a_days)
Carry out hay bailing on a_field.
Definition: farmfuncs.cpp:2184
CfgFloat cfg_ins_app_prop1
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
Definition: SpringBarleyCloverGrassStrigling.h:52
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 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 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: SpringBarleyCloverGrassStrigling.h:43
Definition: SpringBarleyCloverGrassStrigling.h:50
Definition: SpringBarleyCloverGrassStrigling.h:40
Definition: SpringBarleyCloverGrassStrigling.h:45
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: SpringBarleyCloverGrassStrigling.h:46
Definition: SpringBarleyCloverGrassStrigling.h:55
virtual bool GrowthRegulator(LE *a_field, double a_user, int a_days)
Apply growth regulator to a_field.
Definition: farmfuncs.cpp:1250
#define SBCGS_ISAUTUMNPLOUGH
Definition: SpringBarleyCloverGrassStrigling.h:32
#define SBCGS_FERTI_DONE
Definition: SpringBarleyCloverGrassStrigling.h:33
Definition: SpringBarleyCloverGrassStrigling.h:56
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
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