ALMaSS Hare ODDox
1.1
The hare model description following ODdox protocol
WinterWheat.h
Go to the documentation of this file.
1
15
//
16
// WinterWheat.h
17
//
18
/*
19
20
Copyright (c) 2003, National Environmental Research Institute, Denmark (NERI)
21
22
All rights reserved.
23
24
25
Redistribution and use in source and binary forms, with or without
26
modification, are permitted provided that the following conditions are met:
27
28
*) Redistributions of source code must retain the above copyright notice, this
29
list of conditions and the following disclaimer.
30
*) Redistributions in binary form must reproduce the above copyright notice,
31
this list of conditions and the following disclaimer in the documentation
32
and/or other materials provided with the distribution.
33
*) Neither the name of the NERI nor the names of its contributors
34
may be used to endorse or promote products derived from this software without
35
specific prior written permission.
36
37
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
38
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
39
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
40
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
41
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
42
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
43
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
44
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
45
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
46
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
47
POSSIBILITY OF SUCH DAMAGE.
48
49
*/
50
51
#ifndef WINTERWHEAT_H
52
#define WINTERWHEAT_H
53
54
#define WINTERWHEAT_BASE 5100
55
58
#define WW_AUTUMN_PLOUGH a_field->m_user[1]
59
#define WW_DECIDE_TO_HERB a_field->m_user[2]
60
#define WW_DECIDE_TO_FI a_field->m_user[3]
61
62
68
typedef
enum
{
69
ww_start
= 1,
// Compulsory, must always be 1 (one).
70
ww_sleep_all_day
=
WINTERWHEAT_BASE
,
71
ww_ferti_p1
,
72
ww_ferti_s1
,
73
ww_ferti_s2
,
74
ww_autumn_plough
,
75
ww_autumn_harrow
,
76
ww_stubble_harrow1
,
77
ww_autumn_sow
,
78
ww_autumn_roll
,
79
ww_ferti_p2
,
80
ww_herbicide1
,
81
ww_spring_roll
,
82
ww_herbicide2
,
83
ww_GR
,
84
ww_fungicide
,
85
ww_fungicide2
,
86
ww_insecticide1
,
87
ww_insecticide2
,
88
ww_insecticide3
,
89
ww_strigling1
,
90
ww_strigling2
,
91
ww_water1
,
92
ww_water2
,
93
ww_ferti_p3
,
94
ww_ferti_p4
,
95
ww_ferti_p5
,
96
ww_ferti_s3
,
97
ww_ferti_s4
,
98
ww_ferti_s5
,
99
ww_harvest
,
100
ww_straw_chopping
,
101
ww_hay_turning
,
102
ww_hay_baling
,
103
ww_stubble_harrow2
,
104
ww_grubning
,
105
}
WinterWheatToDo
;
106
107
116
class
WinterWheat
:
public
Crop
117
{
118
public
:
119
virtual
bool
Do
(
Farm
*a_farm, LE *a_field,
FarmEvent
*a_ev );
120
WinterWheat
()
121
{
122
// When we start it off, the first possible date for a farm operation is 1st October
123
// This information is used by other crops when they decide how much post processing of
124
// the management is allowed after harvest before the next crop starts.
125
m_first_date
=g_date->DayInYear( 1,10 );
126
}
127
};
128
129
#endif // WINTERWHEAT_H
130
ww_hay_baling
Definition:
WinterWheat.h:102
ww_ferti_p1
Definition:
WinterWheat.h:71
ww_start
Definition:
WinterWheat.h:69
FarmEvent
A struct to hold the information required to trigger a farm event.
Definition:
farm.h:463
ww_herbicide2
Definition:
WinterWheat.h:82
WinterWheat
WinterWheat class .
Definition:
WinterWheat.h:116
ww_stubble_harrow2
Definition:
WinterWheat.h:103
Crop::m_first_date
int m_first_date
Definition:
farm.h:540
ww_harvest
Definition:
WinterWheat.h:99
ww_grubning
Definition:
WinterWheat.h:104
Crop
The base class for all crops.
Definition:
farm.h:534
ww_insecticide3
Definition:
WinterWheat.h:88
ww_ferti_s1
Definition:
WinterWheat.h:72
ww_fungicide2
Definition:
WinterWheat.h:85
ww_hay_turning
Definition:
WinterWheat.h:101
WinterWheat::Do
virtual bool Do(Farm *a_farm, LE *a_field, FarmEvent *a_ev)
The one and only method for a crop management plan. All farm actions go through here.
Definition:
WinterWheat.cpp:101
ww_ferti_s5
Definition:
WinterWheat.h:98
ww_strigling1
Definition:
WinterWheat.h:89
ww_spring_roll
Definition:
WinterWheat.h:81
ww_insecticide2
Definition:
WinterWheat.h:87
ww_GR
Definition:
WinterWheat.h:83
ww_ferti_p3
Definition:
WinterWheat.h:93
ww_sleep_all_day
Definition:
WinterWheat.h:70
WinterWheatToDo
WinterWheatToDo
Definition:
WinterWheat.h:68
WINTERWHEAT_BASE
#define WINTERWHEAT_BASE
Definition:
WinterWheat.h:54
ww_ferti_p2
Definition:
WinterWheat.h:79
ww_autumn_roll
Definition:
WinterWheat.h:78
ww_herbicide1
Definition:
WinterWheat.h:80
ww_autumn_sow
Definition:
WinterWheat.h:77
ww_fungicide
Definition:
WinterWheat.h:84
ww_stubble_harrow1
Definition:
WinterWheat.h:76
ww_ferti_s4
Definition:
WinterWheat.h:97
ww_insecticide1
Definition:
WinterWheat.h:86
Farm
The base class for all farm types.
Definition:
farm.h:767
ww_strigling2
Definition:
WinterWheat.h:90
ww_ferti_p4
Definition:
WinterWheat.h:94
WinterWheat::WinterWheat
WinterWheat()
Definition:
WinterWheat.h:120
ww_autumn_plough
Definition:
WinterWheat.h:74
ww_water1
Definition:
WinterWheat.h:91
ww_ferti_s2
Definition:
WinterWheat.h:73
ww_ferti_p5
Definition:
WinterWheat.h:95
ww_straw_chopping
Definition:
WinterWheat.h:100
ww_ferti_s3
Definition:
WinterWheat.h:96
ww_autumn_harrow
Definition:
WinterWheat.h:75
ww_water2
Definition:
WinterWheat.h:92
Repo
ALMaSS_all
Landscape
cropprogs
WinterWheat.h
Generated on Wed Oct 2 2019 11:11:21 for ALMaSS Hare ODDox by
1.8.16