ALMaSS Hare ODDox
1.1
The hare model description following ODdox protocol
CloverGrassGrazed2.h
Go to the documentation of this file.
1
//
2
// CloverGrassGrazed2.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 CloverGrassGrazed2H
29
#define CloverGrassGrazed2H
30
31
#define CGG2_CUT_DATE m_field->m_user[0]
32
#define CGG2_WATER_DATE m_field->m_user[1]
33
#define CGG2_DO_STUBBLE m_field->m_user[2]
34
#define CGG2_STOP_CATTLE m_field->m_user[3]
35
#define CGG2_BASE 4350
36
37
typedef
enum
{
38
cgg2_start
= 1,
// Compulsory, start event must always be 1 (one).
39
cgg2_ferti_zero
=
CGG2_BASE
,
40
cgg2_ferti_one
,
41
cgg2_ferti_two
,
42
cgg2_cut_to_silage
,
43
cgg2_water_zero
,
44
cgg2_water_one
,
45
cgg2_cattle_out
,
46
cgg2_cattle_is_out
,
47
cgg2_stubble_harrow
,
48
cgg2_productapplic_one
49
}
CloverGrassGrazed2ToDo
;
50
51
52
53
class
CloverGrassGrazed2
:
public
Crop
54
{
55
public
:
56
bool
Do
(
Farm
*a_farm, LE *a_field,
FarmEvent
*a_ev );
57
CloverGrassGrazed2
()
58
{
59
m_first_date
=g_date->DayInYear(1,3);
60
}
61
};
62
63
#endif
64
// CloverGrassGrazed2.H
65
66
67
68
69
70
71
72
73
74
75
76
77
CGG2_BASE
#define CGG2_BASE
Definition:
CloverGrassGrazed2.h:35
CloverGrassGrazed2::CloverGrassGrazed2
CloverGrassGrazed2()
Definition:
CloverGrassGrazed2.h:57
FarmEvent
A struct to hold the information required to trigger a farm event.
Definition:
farm.h:463
Crop::m_first_date
int m_first_date
Definition:
farm.h:540
CloverGrassGrazed2ToDo
CloverGrassGrazed2ToDo
Definition:
CloverGrassGrazed2.h:37
Crop
The base class for all crops.
Definition:
farm.h:534
cgg2_cattle_is_out
Definition:
CloverGrassGrazed2.h:46
cgg2_ferti_two
Definition:
CloverGrassGrazed2.h:41
cgg2_water_zero
Definition:
CloverGrassGrazed2.h:43
CloverGrassGrazed2
Definition:
CloverGrassGrazed2.h:53
cgg2_stubble_harrow
Definition:
CloverGrassGrazed2.h:47
cgg2_water_one
Definition:
CloverGrassGrazed2.h:44
cgg2_cattle_out
Definition:
CloverGrassGrazed2.h:45
cgg2_productapplic_one
Definition:
CloverGrassGrazed2.h:48
Farm
The base class for all farm types.
Definition:
farm.h:767
cgg2_ferti_one
Definition:
CloverGrassGrazed2.h:40
cgg2_ferti_zero
Definition:
CloverGrassGrazed2.h:39
cgg2_start
Definition:
CloverGrassGrazed2.h:38
CloverGrassGrazed2::Do
bool Do(Farm *a_farm, LE *a_field, FarmEvent *a_ev)
Definition:
CloverGrassGrazed2.cpp:40
cgg2_cut_to_silage
Definition:
CloverGrassGrazed2.h:42
Repo
ALMaSS_all
Landscape
cropprogs
CloverGrassGrazed2.h
Generated on Wed Oct 2 2019 11:11:19 for ALMaSS Hare ODDox by
1.8.16