ALMaSS Skylark ODDox
1.1
The skylark model description following ODdox protocol
|
#include <OWinterRape.h>
◆ OWinterRape()
OWinterRape::OWinterRape |
( |
| ) |
|
|
inline |
◆ Do()
bool OWinterRape::Do |
( |
Farm * |
a_farm, |
|
|
LE * |
a_field, |
|
|
FarmEvent * |
a_ev |
|
) |
| |
|
virtual |
Reimplemented from Crop.
49 m_field->SetMDates(0,0,g_date->DayInYear(1,8));
51 m_field->SetMDates(1,0,g_date->DayInYear(15,8));
59 g_msg->Warn( WARN_BUG,
"OWinterRape::Do(): "
60 "Harvest too late for the next crop to start!!!",
"" );
64 for (
int i=0; i<noDates; i++)
77 int today=g_date->Date();
79 d1 = g_date->OldDays() + g_date->DayInYear( 1,7 );
83 g_msg->Warn( WARN_BUG,
" OWinterRape::Do(): "
84 "Crop start attempt between 1st Jan & 1st July",
"" );
93 g_msg->Warn( WARN_BUG,
" OWinterRape::Do(): "
94 "Crop start attempt after last possible start date",
"" );
101 SimpleEvent( g_date->OldDays() + g_date->DayInYear(5,7 ),
109 if ( g_date->Date() > d1 ) {
125 g_date->DayInYear( 25, 8 ) - g_date->DayInYear())) {
137 g_date->DayInYear( 25, 8 ) - g_date->DayInYear())) {
147 g_date->DayInYear( 25, 8 ) -
148 g_date->DayInYear())) {
157 g_date->DayInYear( 27, 8 ) -
158 g_date->DayInYear())) {
162 SimpleEvent( g_date->OldDays() + g_date->DayInYear( 10, 8 ),
168 g_date->DayInYear( 27, 8 ) - g_date->DayInYear())) {
173 int d1 = g_date->Date() + 10;
174 if ( d1 < g_date->OldDays() + g_date->DayInYear( 20, 8 ))
175 d1 = g_date->OldDays() + g_date->DayInYear( 20, 8 );
182 g_date->DayInYear( 20, 9 ) -
183 g_date->DayInYear())) {
188 int d1 = g_date->Date() + 7;
189 if ( d1 < g_date->OldDays() + g_date->DayInYear( 28, 8 ))
190 d1 = g_date->OldDays() + g_date->DayInYear( 28, 8 );
197 g_date->DayInYear( 30, 9 ) -
198 g_date->DayInYear())) {
203 int d1 = g_date->OldDays() + g_date->DayInYear( 15, 3 ) + 365;
214 g_date->DayInYear( 15, 4 ) -
215 g_date->DayInYear())) {
220 int d1 = g_date->Date() + 1;
221 if ( d1 < g_date->OldDays() + g_date->DayInYear( 1, 4 ))
222 d1 = g_date->OldDays() + g_date->DayInYear( 1, 4 );
229 g_date->DayInYear( 15, 4 ) -
230 g_date->DayInYear())) {
235 int d1 = g_date->Date() + 1;
236 if ( d1 < g_date->OldDays() + g_date->DayInYear( 1, 4 ))
237 d1 = g_date->OldDays() + g_date->DayInYear( 1, 4 );
244 g_date->DayInYear( 30, 4 ) -
245 g_date->DayInYear())) {
249 SimpleEvent( g_date->OldDays() + g_date->DayInYear( 5, 7 ),
257 g_date->DayInYear( 25, 7 ) - g_date->DayInYear())) {
263 int d1 = g_date->Date() + 5;
264 if ( d1 < g_date->OldDays() + g_date->DayInYear( 10, 7 ))
265 d1 = g_date->OldDays() + g_date->DayInYear( 10, 7 );
272 g_date->DayInYear( 1, 8 ) -
273 g_date->DayInYear())) {
282 g_date->DayInYear( 1, 8 ) -
283 g_date->DayInYear())) {
288 int d1 = g_date->Date() + 1;
289 if ( d1 < g_date->OldDays() + g_date->DayInYear( 15, 7 ))
290 d1 = g_date->OldDays() + g_date->DayInYear( 15, 7 );
298 g_date->DayInYear( 15, 8 ) - g_date->DayInYear())) {
307 g_msg->Warn( WARN_BUG,
"OWinterRape::Do(): "
308 "Unknown event type! ",
"" );
References Farm::AutumnHarrow(), Farm::AutumnPlough(), Farm::AutumnSow(), Farm::DoIt(), Farm::FA_Manure(), Farm::FA_Slurry(), Farm::FP_Manure(), Farm::FP_Slurry(), Farm::Harvest(), 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, owr_autumn_harrow, owr_autumn_plough, owr_autumn_sow, owr_fa_manure, owr_fa_slurry, owr_fp_manure, owr_fp_slurry, owr_harvest, owr_row_cultivation_one, owr_row_cultivation_three, owr_row_cultivation_two, owr_start, owr_straw_chop, owr_stub_harrow, owr_swarth, Farm::RowCultivation(), Crop::SimpleEvent(), Farm::StrawChopping(), Farm::StubbleHarrowing(), and Farm::Swathing().
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
Definition: OWinterRape.h:50
bool IsStockFarmer(void)
Definition: farm.h:905
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
bool m_first_year
Definition: farm.h:467
Definition: OWinterRape.h:52
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: OWinterRape.h:53
int m_first_date
Definition: farm.h:540
int m_startday
Definition: farm.h:466
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
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: OWinterRape.h:46
Definition: OWinterRape.h:49
virtual bool StrawChopping(LE *a_field, double a_user, int a_days)
Carry out straw chopping on a_field.
Definition: farmfuncs.cpp:2132
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
virtual bool RowCultivation(LE *a_field, double a_user, int a_days)
Carry out a harrowing between crop rows on a_field.
Definition: farmfuncs.cpp:1510
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
Definition: OWinterRape.h:47
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: OWinterRape.h:51
Definition: OWinterRape.h:57
Definition: OWinterRape.h:43
Definition: OWinterRape.h:44
Definition: OWinterRape.h:56
virtual bool Swathing(LE *a_field, double a_user, int a_days)
Cut the crop on a_field and leave it lying (probably rape)
Definition: farmfuncs.cpp:1744
Definition: OWinterRape.h:45
FarmEvent * m_ev
Definition: farm.h:539
Definition: OWinterRape.h:55
Definition: OWinterRape.h:54
Definition: OWinterRape.h:48
virtual bool StubbleHarrowing(LE *a_field, double a_user, int a_days)
Carry out stubble harrowing on a_field.
Definition: farmfuncs.cpp:2209