ALMaSS Hare ODDox  1.1
The hare model description following ODdox protocol
NorwegianPotatoes.h
Go to the documentation of this file.
1 //
2 // NorwegianOats.h
3 //
4 /*
5 *******************************************************************************************************
6 Copyright (c) 2016, 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 NorwegianPotatoes_H
29 #define NorwegianPotatoes_H
30 
31 #define NPOTATOES_BASE 16900
32 #define NPOT_SLURRY_DATE m_field->m_user[0]
33 #define NPOT_HERBI_DATE m_field->m_user[1]
34 #define NPOT_STRIG_DATE m_field->m_user[2]
35 #define NPOT_HILL_DATE m_field->m_user[3]
36 #define NPOT_DID_TREAT m_field->m_user[4]
37 #define NPOT_DID_HILL m_field->m_user[5]
38 #define NPOT_WATER_DATE m_field->m_user[6]
39 #define NPOT_FUNGI_DATE m_field->m_user[7]
40 
41 typedef enum {
42  npe_start = 1, // Compulsory, start event must always be 1 (one).
69 
70 
71 
72 class NorwegianPotatoes : 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(1, 11);
79  m_ddegstoharvest = 1400; // this is hard coded for each crop that uses this
80  }
81 };
82 
83 #endif // NorwegianPotatoes_H
npe_harvest
Definition: NorwegianPotatoes.h:67
Crop::m_ddegstoharvest
int m_ddegstoharvest
Definition: farm.h:543
FarmEvent
A struct to hold the information required to trigger a farm event.
Definition: farm.h:463
npe_fa_slurry
Definition: NorwegianPotatoes.h:46
npe_fungi_one
Definition: NorwegianPotatoes.h:61
npe_strigling_one
Definition: NorwegianPotatoes.h:53
npe_fp_npk
Definition: NorwegianPotatoes.h:49
npe_herbi_three
Definition: NorwegianPotatoes.h:52
Crop::m_first_date
int m_first_date
Definition: farm.h:540
npe_spring_harrow
Definition: NorwegianPotatoes.h:45
Crop
The base class for all crops.
Definition: farm.h:534
npe_herbi_one
Definition: NorwegianPotatoes.h:50
NPOTATOES_BASE
#define NPOTATOES_BASE
Definition: NorwegianPotatoes.h:31
npe_growth_reg
Definition: NorwegianPotatoes.h:66
npe_fa_npk
Definition: NorwegianPotatoes.h:48
npe_fungi_two
Definition: NorwegianPotatoes.h:62
npe_fungi_four
Definition: NorwegianPotatoes.h:64
npe_strigling_three
Definition: NorwegianPotatoes.h:55
npe_insecticide
Definition: NorwegianPotatoes.h:57
NorwegianPotatoes
Definition: NorwegianPotatoes.h:72
npe_fungi_three
Definition: NorwegianPotatoes.h:63
npe_autumn_plough
Definition: NorwegianPotatoes.h:43
npe_water_three
Definition: NorwegianPotatoes.h:60
npe_spring_sow
Definition: NorwegianPotatoes.h:47
npe_hilling
Definition: NorwegianPotatoes.h:56
npe_water_two
Definition: NorwegianPotatoes.h:59
npe_fungi_five
Definition: NorwegianPotatoes.h:65
npe_start
Definition: NorwegianPotatoes.h:42
NorwegianPotatoes::Do
bool Do(Farm *a_farm, LE *a_field, FarmEvent *a_ev)
Definition: NorwegianPotatoes.cpp:38
npe_herbi_two
Definition: NorwegianPotatoes.h:51
Farm
The base class for all farm types.
Definition: farm.h:767
npe_spring_plough
Definition: NorwegianPotatoes.h:44
npe_strigling_two
Definition: NorwegianPotatoes.h:54
NorwegianPotatoesToDo
NorwegianPotatoesToDo
Definition: NorwegianPotatoes.h:41
npe_water_one
Definition: NorwegianPotatoes.h:58
NorwegianPotatoes::NorwegianPotatoes
NorwegianPotatoes()
Definition: NorwegianPotatoes.h:76