ALMaSS Hare ODDox  1.1
The hare model description following ODdox protocol
Fodderbeet.h
Go to the documentation of this file.
1 //
2 // Fodderbeet.h
3 //
4 /*
5 *******************************************************************************************************
6 Copyright (c) 2011, Christopher John Topping, University of Aarhus
7 All rights reserved.
8 
9 Redistribution and use in source and binary forms, with or without modification, are permitted provided
10 that the following conditions are met:
11 
12 Redistributions of source code must retain the above copyright notice, this list of conditions and the
13 following disclaimer.
14 Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
15 the following disclaimer in the documentation and/or other materials provided with the distribution.
16 
17 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
18 IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
19 FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS
20 BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
21 BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
22 BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23 LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
24 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 ********************************************************************************************************
26 */
27 
28 #ifndef Fodderbeet_h
29 #define Fodderbeet_h
30 
31 #define FBeet_BASE 6100
32 
33 #define FB_DID_HARROW m_field->m_user[0]
34 #define FB_DID_NPKS_ONE m_field->m_user[1]
35 #define FB_DID_SLURRY m_field->m_user[2]
36 #define FB_SOW_DATE m_field->m_user[3]
37 
38 #define FB_DID_ROW_TWO m_field->m_user[0]
39 #define FB_DID_INSECT_ONE m_field->m_user[1]
40 #define FB_DID_NPKS_TWO m_field->m_user[2]
41 #define FB_DID_WATER_ONE m_field->m_user[3]
42 #define FB_TRULY_DID_WATER_ONE m_field->m_user[4]
43 #define FB_DECIDE_TO_HERB m_field->m_user[5]
44 #define FB_DECIDE_TO_FI m_field->m_user[6]
45 
46 typedef enum {
47  fb_start = 1, // Compulsory, start event must always be 1 (one).
68 } FBToDo;
69 
70 
71 
72 class Fodderbeet: public Crop
73 {
74 public:
75  bool Do( Farm *a_farm, LE *a_field, FarmEvent *a_ev );
77  {
78  m_first_date=g_date->DayInYear(11,10); // Was 1,10 - changed just for sake of getting year on year beet
79  }
80 };
81 
82 #endif // Fodderbeet_h
FBToDo
FBToDo
Definition: Fodderbeet.h:46
Fodderbeet
Definition: Fodderbeet.h:72
fb_fertnpks_one
Definition: Fodderbeet.h:53
Fodderbeet::Do
bool Do(Farm *a_farm, LE *a_field, FarmEvent *a_ev)
Definition: Fodderbeet.cpp:37
FarmEvent
A struct to hold the information required to trigger a farm event.
Definition: farm.h:463
fb_fertnpks_two
Definition: Fodderbeet.h:63
fb_spring_harrow
Definition: Fodderbeet.h:52
fb_fertslurry
Definition: Fodderbeet.h:54
fb_spring_sow
Definition: Fodderbeet.h:55
Crop::m_first_date
int m_first_date
Definition: farm.h:540
fb_insecticide_one
Definition: Fodderbeet.h:62
Crop
The base class for all crops.
Definition: farm.h:534
fb_herbicide_two
Definition: Fodderbeet.h:58
fb_spring_plough
Definition: Fodderbeet.h:50
fb_herbicide_three
Definition: Fodderbeet.h:59
fb_harvest
Definition: Fodderbeet.h:67
fb_insecticide_two
Definition: Fodderbeet.h:65
fb_autumn_plough
Definition: Fodderbeet.h:48
fb_row_cultivation_one
Definition: Fodderbeet.h:60
fb_start_threads_one
Definition: Fodderbeet.h:51
FBeet_BASE
#define FBeet_BASE
Definition: Fodderbeet.h:31
fb_spring_roll
Definition: Fodderbeet.h:56
Farm
The base class for all farm types.
Definition: farm.h:767
fb_row_cultivation_two
Definition: Fodderbeet.h:61
fb_fertmanure
Definition: Fodderbeet.h:49
fb_water_one
Definition: Fodderbeet.h:64
fb_water_two
Definition: Fodderbeet.h:66
Fodderbeet::Fodderbeet
Fodderbeet()
Definition: Fodderbeet.h:76
fb_herbicide_one
Definition: Fodderbeet.h:57
fb_start
Definition: Fodderbeet.h:47