ALMaSS Hare ODDox  1.1
The hare model description following ODdox protocol
SpringBarleySKManagement.h
Go to the documentation of this file.
1 //
2 // SpringBarleySKManagement.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 SpringBarleySKManagement_H
29 #define SpringBarleySKManagement_H
30 
31 #define SBARLEYSKM_BASE 4750
32 #define SBSKM_SLURRY_DONE m_field->m_user[0]
33 #define SBSKM_MANURE_DONE m_field->m_user[1]
34 #define SBSKM_SLURRY_EXEC m_field->m_user[2]
35 #define SBSKM_MANURE_EXEC m_field->m_user[3]
36 #define SBSKM_DID_AUTUMN_PLOUGH m_field->m_user[4]
37 
38 #define SBSKM_HERBI_DATE m_field->m_user[0]
39 #define SBSKM_GR_DATE m_field->m_user[1]
40 #define SBSKM_FUNGI_DATE m_field->m_user[2]
41 #define SBSKM_WATER_DATE m_field->m_user[3]
42 #define SBSKM_INSECT_DATE m_field->m_user[4]
43 
44 typedef enum {
45  sbskm_start = 1, // Compulsory, start event must always be 1 (one).
70 } SBSKMToDo;
71 
72 
73 
75 {
76 public:
77  bool Do( Farm *a_farm, LE *a_field, FarmEvent *a_ev );
79  {
80  m_first_date=g_date->DayInYear(2,11);
81  }
82 };
83 
84 #endif // SpringBarleySKManagement_H
85 
SpringBarleySKManagement::SpringBarleySKManagement
SpringBarleySKManagement()
Definition: SpringBarleySKManagement.h:78
sbskm_autumn_plough
Definition: SpringBarleySKManagement.h:46
sbskm_herbicide_two
Definition: SpringBarleySKManagement.h:59
sbskm_water_two
Definition: SpringBarleySKManagement.h:65
FarmEvent
A struct to hold the information required to trigger a farm event.
Definition: farm.h:463
sbskm_fertmanure_stock_one
Definition: SpringBarleySKManagement.h:48
sbskm_water_one
Definition: SpringBarleySKManagement.h:64
sbskm_GR
Definition: SpringBarleySKManagement.h:60
sbskm_spring_harrow
Definition: SpringBarleySKManagement.h:50
SBSKMToDo
SBSKMToDo
Definition: SpringBarleySKManagement.h:44
Crop::m_first_date
int m_first_date
Definition: farm.h:540
Crop
The base class for all crops.
Definition: farm.h:534
sbskm_start
Definition: SpringBarleySKManagement.h:45
sbskm_fertmanure_stock_two
Definition: SpringBarleySKManagement.h:54
sbskm_fertslurry_stock
Definition: SpringBarleySKManagement.h:47
sbskm_herbicide_one
Definition: SpringBarleySKManagement.h:58
sbskm_fertpk_plant
Definition: SpringBarleySKManagement.h:53
sbskm_insecticide
Definition: SpringBarleySKManagement.h:62
sbskm_stubble_harrow
Definition: SpringBarleySKManagement.h:69
SpringBarleySKManagement
Definition: SpringBarleySKManagement.h:74
SpringBarleySKManagement::Do
bool Do(Farm *a_farm, LE *a_field, FarmEvent *a_ev)
Definition: SpringBarleySKManagement.cpp:37
SBARLEYSKM_BASE
#define SBARLEYSKM_BASE
Definition: SpringBarleySKManagement.h:31
sbskm_spring_roll
Definition: SpringBarleySKManagement.h:57
sbskm_fertlnh3_plant
Definition: SpringBarleySKManagement.h:52
Farm
The base class for all farm types.
Definition: farm.h:767
sbskm_fungicide_two
Definition: SpringBarleySKManagement.h:63
sbskm_fungicide_one
Definition: SpringBarleySKManagement.h:61
sbskm_fertnpk_stock
Definition: SpringBarleySKManagement.h:55
sbskm_fertmanure_plant
Definition: SpringBarleySKManagement.h:51
sbskm_straw_chopping
Definition: SpringBarleySKManagement.h:67
sbskm_hay_baling
Definition: SpringBarleySKManagement.h:68
sbskm_harvest
Definition: SpringBarleySKManagement.h:66
sbskm_spring_plough
Definition: SpringBarleySKManagement.h:49
sbskm_spring_sow
Definition: SpringBarleySKManagement.h:56