ALMaSS Hare ODDox
1.1
The hare model description following ODdox protocol
Potatoes.h
Go to the documentation of this file.
1
//
2
// Potatoes.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 POTATOESEAT_H
29
#define POTATOESEAT_H
30
31
#define POTATOESEAT_BASE 16900
32
#define POT_SLURRY_DATE m_field->m_user[0]
33
#define POT_HERBI_DATE m_field->m_user[1]
34
#define POT_STRIG_DATE m_field->m_user[2]
35
#define POT_HILL_DATE m_field->m_user[3]
36
#define POT_DID_TREAT m_field->m_user[4]
37
#define POT_DID_HILL m_field->m_user[5]
38
#define POT_WATER_DATE m_field->m_user[6]
39
#define POT_FUNGI_DATE m_field->m_user[7]
40
41
typedef
enum
{
42
pe_start
= 1,
// Compulsory, start event must always be 1 (one).
43
pe_autumn_plough
=
POTATOESEAT_BASE
,
44
pe_spring_plough
,
45
pe_spring_harrow
,
46
pe_fa_slurry
,
47
pe_spring_sow
,
48
pe_fa_npk
,
49
pe_fp_npk
,
50
pe_herbi_one
,
51
pe_herbi_two
,
52
pe_herbi_three
,
53
pe_strigling_one
,
54
pe_strigling_two
,
55
pe_strigling_three
,
56
pe_hilling
,
57
pe_insecticide
,
58
pe_water_one
,
59
pe_water_two
,
60
pe_water_three
,
61
pe_fungi_one
,
62
pe_fungi_two
,
63
pe_fungi_three
,
64
pe_fungi_four
,
65
pe_fungi_five
,
66
pe_growth_reg
,
67
pe_harvest
68
}
PotatoesEatToDo
;
69
70
71
72
class
Potatoes
:
public
Crop
73
{
74
public
:
75
bool
Do
(
Farm
*a_farm, LE *a_field,
FarmEvent
*a_ev );
76
Potatoes
()
77
{
78
m_first_date
=g_date->DayInYear(1,11);
79
}
80
};
81
82
#endif // POTATOESEAT_H
pe_start
Definition:
Potatoes.h:42
pe_spring_harrow
Definition:
Potatoes.h:45
pe_strigling_one
Definition:
Potatoes.h:53
pe_herbi_three
Definition:
Potatoes.h:52
FarmEvent
A struct to hold the information required to trigger a farm event.
Definition:
farm.h:463
pe_fa_slurry
Definition:
Potatoes.h:46
pe_fungi_five
Definition:
Potatoes.h:65
pe_fa_npk
Definition:
Potatoes.h:48
Potatoes
Definition:
Potatoes.h:72
PotatoesEatToDo
PotatoesEatToDo
Definition:
Potatoes.h:41
pe_spring_sow
Definition:
Potatoes.h:47
Crop::m_first_date
int m_first_date
Definition:
farm.h:540
pe_spring_plough
Definition:
Potatoes.h:44
Crop
The base class for all crops.
Definition:
farm.h:534
pe_water_two
Definition:
Potatoes.h:59
pe_harvest
Definition:
Potatoes.h:67
pe_fungi_two
Definition:
Potatoes.h:62
pe_strigling_two
Definition:
Potatoes.h:54
Potatoes::Potatoes
Potatoes()
Definition:
Potatoes.h:76
pe_fungi_four
Definition:
Potatoes.h:64
pe_hilling
Definition:
Potatoes.h:56
pe_growth_reg
Definition:
Potatoes.h:66
pe_water_one
Definition:
Potatoes.h:58
pe_fp_npk
Definition:
Potatoes.h:49
pe_autumn_plough
Definition:
Potatoes.h:43
Farm
The base class for all farm types.
Definition:
farm.h:767
pe_fungi_three
Definition:
Potatoes.h:63
pe_insecticide
Definition:
Potatoes.h:57
POTATOESEAT_BASE
#define POTATOESEAT_BASE
Definition:
Potatoes.h:31
pe_water_three
Definition:
Potatoes.h:60
pe_fungi_one
Definition:
Potatoes.h:61
pe_strigling_three
Definition:
Potatoes.h:55
pe_herbi_two
Definition:
Potatoes.h:51
pe_herbi_one
Definition:
Potatoes.h:50
Potatoes::Do
bool Do(Farm *a_farm, LE *a_field, FarmEvent *a_ev)
Definition:
Potatoes.cpp:38
Repo
ALMaSS_all
Landscape
cropprogs
Potatoes.h
Generated on Wed Oct 2 2019 11:11:21 for ALMaSS Hare ODDox by
1.8.16