ALMaSS Hare ODDox
1.1
The hare model description following ODdox protocol
setaside.h
Go to the documentation of this file.
1
/*
2
*******************************************************************************************************
3
Copyright (c) 2011, Christopher John Topping, University of Aarhus
4
All rights reserved.
5
6
Redistribution and use in source and binary forms, with or without modification, are permitted provided
7
that the following conditions are met:
8
9
Redistributions of source code must retain the above copyright notice, this list of conditions and the
10
following disclaimer.
11
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
12
the following disclaimer in the documentation and/or other materials provided with the distribution.
13
14
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
15
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
16
FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS
17
BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
18
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
19
BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
20
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
21
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
22
********************************************************************************************************
23
*/
37
//
38
// setaside.h
39
//
40
41
#ifndef SETASIDE_H
42
#define SETASIDE_H
43
44
#define SETASIDE_BASE 600
45
48
typedef
enum
{
49
sa_start
= 1,
// Compulsory, start event must always be 1 (one).
50
sa_cut_to_hay
=
SETASIDE_BASE
,
51
sa_cattle_out
,
52
sa_cattle_is_out
,
53
sa_cut_to_silage
,
54
sa_wait
55
}
SetAsideToDo
;
56
57
58
69
class
SetAside
:
public
Crop
70
{
71
public
:
72
bool
Do
(
Farm
*a_farm, LE *a_field,
FarmEvent
*a_ev );
73
SetAside
()
74
{
75
m_first_date
=g_date->DayInYear(1,7);
76
}
77
78
};
79
80
#endif // SETASIDE_H
sa_start
Definition:
setaside.h:49
FarmEvent
A struct to hold the information required to trigger a farm event.
Definition:
farm.h:463
SetAside
Rotational set-aside management class .
Definition:
setaside.h:69
Crop::m_first_date
int m_first_date
Definition:
farm.h:540
sa_cut_to_hay
Definition:
setaside.h:50
Crop
The base class for all crops.
Definition:
farm.h:534
SetAsideToDo
SetAsideToDo
Definition:
setaside.h:48
sa_cattle_is_out
Definition:
setaside.h:52
sa_cattle_out
Definition:
setaside.h:51
SetAside::SetAside
SetAside()
Definition:
setaside.h:73
SETASIDE_BASE
#define SETASIDE_BASE
Definition:
setaside.h:44
sa_cut_to_silage
Definition:
setaside.h:53
SetAside::Do
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:
setaside.cpp:86
sa_wait
Definition:
setaside.h:54
Farm
The base class for all farm types.
Definition:
farm.h:767
Repo
ALMaSS_all
Landscape
cropprogs
setaside.h
Generated on Wed Oct 2 2019 11:11:21 for ALMaSS Hare ODDox by
1.8.16