ALMaSS Hare ODDox  1.1
The hare model description following ODdox protocol
Triticale.h
Go to the documentation of this file.
1 //
2 // Triticale.h
3 //
4 /*
5 *******************************************************************************************************
6 Copyright (c) 2011, Christopher John Topping, Aarhus University
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 Triticale_H
29 #define Triticale_H
30 
31 #define TRITICALE_BASE 7400
32 
33 #define TRI_OCCUP_DATE m_field->m_user[0]
34 #define TRI_WATER_DATE m_field->m_user[1]
35 #define TRI_DECIDE_TO_HERB m_field->m_user[2]
36 
37 
38 typedef enum {
39  tri_start = 1, // Compulsory, start event must always be 1 (one).
62 
63 
64 
65 class Triticale: public Crop
66 {
67 public:
68  bool Do( Farm *a_farm, LE *a_field, FarmEvent *a_ev );
70  {
71  m_first_date=g_date->DayInYear(5,10);
72  }
73 };
74 
75 #endif // Triticale_H
tri_chopping
Definition: Triticale.h:57
TRITICALE_BASE
#define TRITICALE_BASE
Definition: Triticale.h:31
tri_herbi_one
Definition: Triticale.h:45
FarmEvent
A struct to hold the information required to trigger a farm event.
Definition: farm.h:463
tri_spring_roll
Definition: Triticale.h:46
tri_fa_manure
Definition: Triticale.h:40
Triticale
Definition: Triticale.h:65
tri_herbi_two
Definition: Triticale.h:49
Crop::m_first_date
int m_first_date
Definition: farm.h:540
tri_insecticide
Definition: Triticale.h:55
Crop
The base class for all crops.
Definition: farm.h:534
tri_water
Definition: Triticale.h:53
Triticale::Do
bool Do(Farm *a_farm, LE *a_field, FarmEvent *a_ev)
Definition: Triticale.cpp:37
tri_fungicide
Definition: Triticale.h:54
tri_hay_bailing
Definition: Triticale.h:59
tri_fa_npk
Definition: Triticale.h:47
Triticale::Triticale
Triticale()
Definition: Triticale.h:69
tri_start
Definition: Triticale.h:39
tri_strigling
Definition: Triticale.h:50
tri_fa_slurry
Definition: Triticale.h:48
tri_stubble_harrow
Definition: Triticale.h:60
tri_autumn_plough
Definition: Triticale.h:41
TriticaleToDo
TriticaleToDo
Definition: Triticale.h:38
Farm
The base class for all farm types.
Definition: farm.h:767
tri_GR_one
Definition: Triticale.h:51
tri_GR_two
Definition: Triticale.h:52
tri_autumn_roll
Definition: Triticale.h:44
tri_autumn_sow
Definition: Triticale.h:43
tri_autumn_harrow
Definition: Triticale.h:42
tri_hay_turning
Definition: Triticale.h:58
tri_harvest
Definition: Triticale.h:56