ALMaSS Partridge ODdox
1.1
The partridge model description following ODdox protocol
|
#include <calendar.h>
Public Member Functions | |
void | Reset (void) |
bool | TickMinute (void) |
bool | TickMinute10 (void) |
bool | TickHour (void) |
void | Tick (void) |
long | Date (void) |
int | DayInYear (void) |
long | OldDays (void) |
long | GlobalDate (int a_day, int a_month, int a_year) |
int | DayLength (void) |
int | DayLength (int a_day_in_year) |
int | GetFirstYear (void) |
int | GetLastYear (void) |
int | GetYear (void) |
int | GetYearNumber (void) |
int | GetMonth (void) |
int | GetMinute (void) |
int | GetHour (void) |
int | GetDayInMonth (void) |
double | GetDaylightProportion (void) |
bool | JanFirst (void) |
bool | MarchFirst (void) |
void | SetFirstYear (int a_year) |
void | SetLastYear (int a_year) |
bool | ValidDate (int a_day, int a_month) |
int | DayInYear (int a_day, int a_month) |
Calendar (void) | |
Private Attributes | |
long | m_date |
long | m_olddays |
int | m_firstyear |
int | m_lastyear |
int | m_day_in_month |
int | m_day_in_year |
int | m_month |
int | m_year |
int | m_simulationyear |
int | m_todayslength |
double | m_daylightproportion |
int | m_minutes |
int | m_hours |
bool | m_janfirst |
bool | m_marchfirst |
Static Private Attributes | |
static int | m_daylength [] |
The length of the day between sun up and sun down im minutes (DK - Jutland) More... | |
Definition at line 38 of file calendar.h.
Calendar::Calendar | ( | void | ) |
|
inline |
Definition at line 57 of file calendar.h.
References m_date.
Referenced by Farm::BulbHarvest(), Farm::BurnStrawStubble(), Farm::CheckRotationManagementLoop(), Farm::CutToHay(), VegElement::DoDevelopment(), UnsprayedFieldMargin::DoDevelopment(), Weather::GetSnow(), Farm::HandleEvents(), OptimisingFarm::HandleEvents(), Farm::Harvest(), OptimisingFarm::Harvest(), Farm::HarvestLong(), Farm::HayBailing(), Farm::HayTurning(), Farm::InitiateManagement(), Farm::RowCultivation(), VegElement::SetGrowthPhase(), Farm::StrawChopping(), Farm::Strigling(), Farm::StriglingSow(), Farm::StubbleHarrowing(), Landscape::SupplyGlobalDate(), and Weather::Tick().
int Calendar::DayInYear | ( | int | a_day, |
int | a_month | ||
) |
Definition at line 96 of file calendar.cpp.
|
inline |
Definition at line 58 of file calendar.h.
References m_day_in_year.
Referenced by VegElement::CalcGooseForageResources(), Farm::CattleIsOut(), Farm::CattleIsOutLow(), Crop::ChooseNextCrop(), RoadsideVerge::DoDevelopment(), WaterBufferZone::DoDevelopment(), Orchard::DoDevelopment(), OrchardBand::DoDevelopment(), MownGrass::DoDevelopment(), Landscape::DumpMapInfoByArea(), VegElement::ForceGrowthInitialize(), VegElement::ForceGrowthTest(), LE::GetGooseNos(), LE::GetGooseNosToday(), LE::GetGooseNosTodayTimed(), LE::GetGooseSpNosToday(), LE::GetGooseSpNosTodayTimed(), LE::GetQuarryNos(), GlobalDate(), VegElement::PollenNectarPhenologyCalculation(), VegElement::ReduceVeg_Extended(), VegElement::ResetGeese(), Landscape::SupplyDayInYear(), Landscape::Tick(), and Weather::Tick().
int Calendar::DayLength | ( | int | a_day_in_year | ) |
Definition at line 67 of file calendar.cpp.
References g_msg, m_daylength, MapErrorMsg::Warn(), and WARN_BUG.
|
inline |
Definition at line 63 of file calendar.h.
References m_todayslength.
Referenced by Landscape::SupplyDaylength().
|
inline |
Definition at line 72 of file calendar.h.
References m_day_in_month.
Referenced by Landscape::SupplyDayInMonth(), and Landscape::Tick().
|
inline |
Definition at line 73 of file calendar.h.
References m_daylightproportion.
Referenced by Landscape::SupplyDaylightProp(), and Landscape::SupplyNightProp().
|
inline |
|
inline |
Definition at line 71 of file calendar.h.
References m_hours.
Referenced by LargeRoad::GetTrafficLoad(), SmallRoad::GetTrafficLoad(), and Landscape::SupplyHour().
|
inline |
|
inline |
Definition at line 70 of file calendar.h.
References m_minutes.
Referenced by Landscape::SupplyMinute().
|
inline |
Definition at line 69 of file calendar.h.
References m_month.
Referenced by Pond::CalcLarvalFood(), RoadsideVerge::DoDevelopment(), PesticideMap::DumpPMap(), LargeRoad::GetTrafficLoad(), SmallRoad::GetTrafficLoad(), and Landscape::SupplyMonth().
|
inline |
Definition at line 67 of file calendar.h.
References m_year.
Referenced by PesticideMap::DumpPMap(), Landscape::SupplyYear(), and Landscape::VegDump().
|
inline |
Definition at line 68 of file calendar.h.
References m_simulationyear.
Referenced by OptimisingFarm::ActualProfit(), OptimisingFarm::ChooseDecisionMode(), Crop::ChooseNextCrop(), FarmManager::PrintFinalResults(), Landscape::SupplyYearNumber(), and Landscape::Tick().
long Calendar::GlobalDate | ( | int | a_day, |
int | a_month, | ||
int | a_year | ||
) |
Definition at line 61 of file calendar.cpp.
References DayInYear(), and m_olddays.
|
inline |
Definition at line 74 of file calendar.h.
References m_janfirst.
Referenced by RoadsideVerge::DoDevelopment(), WaterBufferZone::DoDevelopment(), Orchard::DoDevelopment(), MownGrass::DoDevelopment(), and Landscape::Tick().
|
inline |
|
inline |
Definition at line 60 of file calendar.h.
References m_olddays.
Referenced by Landscape::DumpMapInfoByArea().
void Calendar::Reset | ( | void | ) |
Definition at line 40 of file calendar.cpp.
References m_date, m_day_in_month, m_day_in_year, m_firstyear, m_hours, m_janfirst, m_marchfirst, m_minutes, m_month, m_olddays, m_simulationyear, and m_year.
Referenced by Calendar(), Landscape::Landscape(), and Weather::Weather().
|
inline |
|
inline |
void Calendar::Tick | ( | void | ) |
Definition at line 141 of file calendar.cpp.
References m_date, m_day_in_month, m_day_in_year, m_daylength, m_daylightproportion, m_hours, m_janfirst, m_marchfirst, m_minutes, m_month, m_olddays, m_simulationyear, m_todayslength, and m_year.
Referenced by Landscape::Tick().
bool Calendar::TickHour | ( | void | ) |
bool Calendar::TickMinute | ( | void | ) |
bool Calendar::TickMinute10 | ( | void | ) |
bool Calendar::ValidDate | ( | int | a_day, |
int | a_month | ||
) |
Definition at line 79 of file calendar.cpp.
|
private |
Definition at line 86 of file calendar.h.
|
private |
Definition at line 90 of file calendar.h.
Referenced by GetDayInMonth(), Reset(), and Tick().
|
private |
Definition at line 91 of file calendar.h.
Referenced by DayInYear(), Reset(), and Tick().
|
staticprivate |
The length of the day between sun up and sun down im minutes (DK - Jutland)
Definition at line 102 of file calendar.h.
Referenced by DayLength(), and Tick().
|
private |
Definition at line 96 of file calendar.h.
Referenced by GetDaylightProportion(), and Tick().
|
private |
Definition at line 88 of file calendar.h.
Referenced by GetFirstYear(), Reset(), and SetFirstYear().
|
private |
Definition at line 98 of file calendar.h.
Referenced by GetHour(), Reset(), Tick(), and TickHour().
|
private |
Definition at line 99 of file calendar.h.
Referenced by JanFirst(), Reset(), and Tick().
|
private |
Definition at line 89 of file calendar.h.
Referenced by GetLastYear(), and SetLastYear().
|
private |
Definition at line 100 of file calendar.h.
Referenced by MarchFirst(), Reset(), and Tick().
|
private |
Definition at line 97 of file calendar.h.
Referenced by GetMinute(), Reset(), Tick(), TickHour(), TickMinute(), and TickMinute10().
|
private |
Definition at line 92 of file calendar.h.
Referenced by GetMonth(), Reset(), and Tick().
|
private |
Definition at line 87 of file calendar.h.
Referenced by GlobalDate(), OldDays(), Reset(), and Tick().
|
private |
Definition at line 94 of file calendar.h.
Referenced by GetYearNumber(), Reset(), and Tick().
|
private |
Definition at line 95 of file calendar.h.
Referenced by DayLength(), and Tick().
|
private |
Definition at line 93 of file calendar.h.