74 #include "../../Landscape/ls.h"
75 #include "../../Landscape/cropprogs/setaside.h"
104 m_field->SetMDates(0,0,g_date->DayInYear(30,6));
106 m_field->SetMDates(1,0,g_date->DayInYear(25,8));
107 m_field->SetMDates(0,1,g_date->DayInYear(1,9));
108 m_field->SetMDates(1,1,g_date->DayInYear(15,9));
109 m_field->SetMDates(0,2,g_date->DayInYear(1,9));
110 m_field->SetMDates(1,2,g_date->DayInYear(10,10));
120 g_msg->Warn( WARN_BUG,
"Setaside::Do(): "
121 "Harvest too late for the next crop to start!!!",
"" );
125 for (
int i=0; i<noDates; i++) {
139 d1 = g_date->OldDays() + g_date->DayInYear( 1,7 );
140 if (g_date->Date() < d1) {
142 g_msg->Warn( WARN_BUG,
"Setaside::Do(): "
143 "Crop start attempt between 1st Jan & 1st July",
"" );
147 if (g_date->Date() > d1) {
149 g_msg->Warn( WARN_BUG,
"SetAside::Do(): "
150 "Crop start attempt after last possible start date",
164 if ( g_date->Date() > d1 ) {
195 if (
m_field->GetMConstants(1)==0) {
197 g_msg->Warn( WARN_BUG,
"Setaside::Do(): failure in 'CattleOut' execution",
"" );
214 if (
m_field->GetMConstants(2)==0) {
217 if(g_date->Date() ==
m_field->GetMDates(1,2)){
218 g_msg->Warn( WARN_BUG,
"Setaside::Do(): failure in 'CattleIsOut' execution",
"" );
236 if (
m_field->GetMConstants(0)==0) {
238 g_msg->Warn( WARN_BUG,
"Setaside::Do(): failure in 'CutToSilage' execution",
"" );
258 if ((g_date->DayInYear()-
m_field->GetMDates(1,2))>=0)
262 m_field->SetVegPatchy(
false );
270 g_msg->Warn( WARN_BUG,
"SetAside::Do(): "
271 "Unknown event type! ",
"" );