ALMaSS Hare ODDox  1.1
The hare model description following ODdox protocol
SpringBarleySpr.h
Go to the documentation of this file.
1 //
2 // SpringBarley.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 SpringBarleySpr_H
29 #define SpringBarleySpr_H
30 
31 #define SSPRBARLEY_BASE 4725
32 #define SBSPR_SLURRY_DONE m_field->m_user[0]
33 #define SBSPR_MANURE_DONE m_field->m_user[1]
34 #define SBSPR_SLURRY_EXEC m_field->m_user[2]
35 #define SBSPR_MANURE_EXEC m_field->m_user[3]
36 #define SBSPR_DID_AUTUMN_PLOUGH m_field->m_user[4]
37 
38 #define SBSPR_HERBI_DATE m_field->m_user[0]
39 #define SBSPR_GR_DATE m_field->m_user[1]
40 #define SBSPR_FUNGI_DATE m_field->m_user[2]
41 #define SBSPR_WATER_DATE m_field->m_user[3]
42 #define SBSPR_INSECT_DATE m_field->m_user[4]
43 #define SBSPR_DECIDE_TO_HERB m_field->m_user[5]
44 #define SBSPR_DECIDE_TO_FI m_field->m_user[6]
45 
46 typedef enum {
47  sbspr_start = 1, // Compulsory, start event must always be 1 (one).
71 } SBSPRToDo;
72 
73 
74 
75 class SpringBarleySpr: public Crop
76 {
77 public:
78  bool Do( Farm *a_farm, LE *a_field, FarmEvent *a_ev );
80  {
81  m_first_date=g_date->DayInYear(1,4);
82  }
83 };
84 
85 #endif // SpringBarleySpr_H
sbspr_spring_sow
Definition: SpringBarleySpr.h:55
FarmEvent
A struct to hold the information required to trigger a farm event.
Definition: farm.h:463
sbspr_fungicide_one
Definition: SpringBarleySpr.h:63
sbspr_spring_plough
Definition: SpringBarleySpr.h:48
sbspr_fungicide_two
Definition: SpringBarleySpr.h:64
sbspr_fertnpk_stock
Definition: SpringBarleySpr.h:54
sbspr_straw_chopping
Definition: SpringBarleySpr.h:68
SBSPRToDo
SBSPRToDo
Definition: SpringBarleySpr.h:46
sbspr_water_one
Definition: SpringBarleySpr.h:65
SpringBarleySpr
Definition: SpringBarleySpr.h:75
sbspr_start
Definition: SpringBarleySpr.h:47
Crop::m_first_date
int m_first_date
Definition: farm.h:540
sbspr_herbicide_two
Definition: SpringBarleySpr.h:58
sbspr_fertpk_plant
Definition: SpringBarleySpr.h:52
sbspr_hay_baling
Definition: SpringBarleySpr.h:69
Crop
The base class for all crops.
Definition: farm.h:534
sbspr_herbicide_one
Definition: SpringBarleySpr.h:57
sbspr_fertmanure_plant
Definition: SpringBarleySpr.h:50
sbspr_harvest
Definition: SpringBarleySpr.h:67
sbspr_spring_harrow
Definition: SpringBarleySpr.h:49
sbspr_GR
Definition: SpringBarleySpr.h:59
sbspr_insecticide3
Definition: SpringBarleySpr.h:62
sbspr_spring_roll
Definition: SpringBarleySpr.h:56
Farm
The base class for all farm types.
Definition: farm.h:767
sbspr_insecticide2
Definition: SpringBarleySpr.h:61
sbspr_stubble_harrow
Definition: SpringBarleySpr.h:70
sbspr_water_two
Definition: SpringBarleySpr.h:66
SpringBarleySpr::Do
bool Do(Farm *a_farm, LE *a_field, FarmEvent *a_ev)
Definition: SpringBarleySpr.cpp:42
sbspr_fertlnh3_plant
Definition: SpringBarleySpr.h:51
SSPRBARLEY_BASE
#define SSPRBARLEY_BASE
Definition: SpringBarleySpr.h:31
SpringBarleySpr::SpringBarleySpr
SpringBarleySpr()
Definition: SpringBarleySpr.h:79
sbspr_insecticide1
Definition: SpringBarleySpr.h:60
sbspr_fertmanure_stock_two
Definition: SpringBarleySpr.h:53