ALMaSS Skylark ODDox
1.1
The skylark model description following ODdox protocol
|
Class for storing data for optimisation.
More...
#include <farm.h>
|
class | FarmData |
| Class storing farm information: farm's number used in ALMaSS system, farm's soil type, farm's size (business or private) and farm's real ID number. More...
|
|
|
| DataForOptimisation () |
| The constructor. More...
|
|
void | Set_livestockTypes (TTypesOfAnimals livestock_type) |
|
void | Set_cropTypes (TTypesOfCrops crop_type) |
|
void | Set_cropTypes_str (string crop_type) |
|
TTypesOfAnimals | Get_livestockTypes (int i) |
|
string | Get_cropTypes_str (int i) |
|
TTypesOfCrops | Get_cropTypes (int i) |
|
void | Set_livestockNumber (int a_number) |
|
void | Set_cropArea (double a_area) |
|
int | Get_livestockNumber (int index) |
|
int | Get_livestockNumbersSize () |
|
double | Get_cropArea (int index) |
|
int | Get_cropAreasSize () |
|
TTypesOfOptFarms | Get_farmType (int a_almass_no) |
| Used by FarmManager::CreateFarms. Finds a matching almass number and returns farm's type. More...
|
|
void | Set_winterMax (int a_value, int i) |
|
int | Get_winterMax (int i) |
|
void | Set_livestockParameter (double a_value, int i) |
|
double | Get_livestockParameter (int i) |
|
void | Set_cropParameter (double a_value, int i) |
|
double | Get_cropParameter (int i) |
|
void | Set_alfa (double a_value, int i) |
|
double | Get_alfa (int i) |
|
void | Set_beta1 (double a_value, int i) |
|
double | Get_beta1 (int i) |
|
void | Set_beta2 (double a_value, int i) |
|
double | Get_beta2 (int i) |
|
void | Set_Nnorm (double a_value, int i) |
|
double | Get_Nnorm (int i) |
|
void | Set_fixed (string a_value, int i) |
|
bool | Get_fixed (int i) |
|
void | Set_fodder (string a_value, int i) |
|
bool | Get_fodder (int i) |
|
void | Set_FUKey (double a_value, int i) |
|
double | Get_FUKey (int i) |
|
void | Set_sellingPrice (double a_value, int i) |
|
double | Get_sellingPrice (int i) |
|
void | Set_sellingPrice_lastyr (double a_value, int i) |
|
double | Get_sellingPrice_lastyr (int i) |
|
void | Set_rotationMax (double a_value, int i) |
|
double | Get_rotationMax (int i) |
|
void | Set_rotationMin (double a_value, int i) |
|
double | Get_rotationMin (int i) |
|
void | Set_biomass_factor (double a_value, int i) |
|
double | Get_biomass_factor (int i) |
|
void | Set_cropTypes_almass (TTypesOfVegetation crop_type) |
|
TTypesOfVegetation | Get_cropTypes_almass (int i) |
|
int | Get_cropTypes_almass_size () |
|
void | Set_cropTypes_almass_str (string crop_type) |
|
string | Get_cropTypes_almass_str (int i) |
|
void | Set_noCrops (int no) |
|
int | Get_noCrops () |
|
void | Set_emaize_price (double a_value) |
|
double | Get_emaize_price (int i) |
|
Class for storing data for optimisation.
◆ DataForOptimisation()
DataForOptimisation::DataForOptimisation |
( |
| ) |
|
The constructor.
References cfg_OptimiseBedriftsmodelCrops(), InitializeVector(), m_alfa, m_beta1, m_beta2, m_biomass_factors, m_cropParameters, m_fixed, m_fodder, m_FUKey, m_livestockParameters, m_Nnorm, m_rotationMax, m_rotationMin, m_sellingPrice, m_sellingPrice_lastyr, m_winterMax, toa_Foobar, toc_Foobar, tofs_Foobar, tolp_Foobar, toof_Foobar, top_Foobar, tos_Foobar, and tov_Undefined.
◆ Get_alfa()
double DataForOptimisation::Get_alfa |
( |
int |
i | ) |
|
|
inline |
◆ Get_beta1()
double DataForOptimisation::Get_beta1 |
( |
int |
i | ) |
|
|
inline |
◆ Get_beta2()
double DataForOptimisation::Get_beta2 |
( |
int |
i | ) |
|
|
inline |
◆ Get_biomass_factor()
double DataForOptimisation::Get_biomass_factor |
( |
int |
i | ) |
|
|
inline |
◆ Get_cropArea()
double DataForOptimisation::Get_cropArea |
( |
int |
index | ) |
|
|
inline |
◆ Get_cropAreasSize()
int DataForOptimisation::Get_cropAreasSize |
( |
| ) |
|
|
inline |
◆ Get_cropParameter()
double DataForOptimisation::Get_cropParameter |
( |
int |
i | ) |
|
|
inline |
◆ Get_cropTypes()
◆ Get_cropTypes_almass()
◆ Get_cropTypes_almass_size()
int DataForOptimisation::Get_cropTypes_almass_size |
( |
| ) |
|
|
inline |
◆ Get_cropTypes_almass_str()
string DataForOptimisation::Get_cropTypes_almass_str |
( |
int |
i | ) |
|
|
inline |
◆ Get_cropTypes_str()
string DataForOptimisation::Get_cropTypes_str |
( |
int |
i | ) |
|
|
inline |
◆ Get_emaize_price()
double DataForOptimisation::Get_emaize_price |
( |
int |
i | ) |
|
|
inline |
◆ Get_farmType()
◆ Get_fixed()
bool DataForOptimisation::Get_fixed |
( |
int |
i | ) |
|
|
inline |
◆ Get_fodder()
bool DataForOptimisation::Get_fodder |
( |
int |
i | ) |
|
|
inline |
◆ Get_FUKey()
double DataForOptimisation::Get_FUKey |
( |
int |
i | ) |
|
|
inline |
References m_FUKey.
Referenced by OptimisingPigFarm::check_WRape_WBarley(), OptimisingCattleFarm::checkCattleRotation(), OptimisingCattleFarm::checkCattleRotation_almass(), AnimalFarm::checkWinterRotation1(), AnimalFarm::correctFodderDemand(), AnimalFarm::decreaseCrops(), AnimalFarm::determineFodderAreas(), AnimalFarm::determineMinFodder(), AnimalFarm::increaseCrops(), OptimisingFarm::optimizeCrops(), and OptimisingCattleFarm::setCattleCropsAtMin().
◆ Get_livestockNumber()
int DataForOptimisation::Get_livestockNumber |
( |
int |
index | ) |
|
|
inline |
◆ Get_livestockNumbersSize()
int DataForOptimisation::Get_livestockNumbersSize |
( |
| ) |
|
|
inline |
◆ Get_livestockParameter()
double DataForOptimisation::Get_livestockParameter |
( |
int |
i | ) |
|
|
inline |
◆ Get_livestockTypes()
◆ Get_Nnorm()
double DataForOptimisation::Get_Nnorm |
( |
int |
i | ) |
|
|
inline |
◆ Get_noCrops()
int DataForOptimisation::Get_noCrops |
( |
| ) |
|
|
inline |
◆ Get_rotationMax()
double DataForOptimisation::Get_rotationMax |
( |
int |
i | ) |
|
|
inline |
◆ Get_rotationMin()
double DataForOptimisation::Get_rotationMin |
( |
int |
i | ) |
|
|
inline |
◆ Get_sellingPrice()
double DataForOptimisation::Get_sellingPrice |
( |
int |
i | ) |
|
|
inline |
◆ Get_sellingPrice_lastyr()
double DataForOptimisation::Get_sellingPrice_lastyr |
( |
int |
i | ) |
|
|
inline |
◆ Get_winterMax()
int DataForOptimisation::Get_winterMax |
( |
int |
i | ) |
|
|
inline |
◆ InitializeVector()
void DataForOptimisation::InitializeVector |
( |
vector< double > & |
vector | ) |
|
|
protected |
◆ Set_alfa()
void DataForOptimisation::Set_alfa |
( |
double |
a_value, |
|
|
int |
i |
|
) |
| |
|
inline |
◆ Set_beta1()
void DataForOptimisation::Set_beta1 |
( |
double |
a_value, |
|
|
int |
i |
|
) |
| |
|
inline |
◆ Set_beta2()
void DataForOptimisation::Set_beta2 |
( |
double |
a_value, |
|
|
int |
i |
|
) |
| |
|
inline |
◆ Set_biomass_factor()
void DataForOptimisation::Set_biomass_factor |
( |
double |
a_value, |
|
|
int |
i |
|
) |
| |
|
inline |
◆ Set_cropArea()
void DataForOptimisation::Set_cropArea |
( |
double |
a_area | ) |
|
|
inline |
◆ Set_cropParameter()
void DataForOptimisation::Set_cropParameter |
( |
double |
a_value, |
|
|
int |
i |
|
) |
| |
|
inline |
◆ Set_cropTypes()
void DataForOptimisation::Set_cropTypes |
( |
TTypesOfCrops |
crop_type | ) |
|
|
inline |
◆ Set_cropTypes_almass()
◆ Set_cropTypes_almass_str()
void DataForOptimisation::Set_cropTypes_almass_str |
( |
string |
crop_type | ) |
|
|
inline |
◆ Set_cropTypes_str()
void DataForOptimisation::Set_cropTypes_str |
( |
string |
crop_type | ) |
|
|
inline |
◆ Set_emaize_price()
void DataForOptimisation::Set_emaize_price |
( |
double |
a_value | ) |
|
|
inline |
◆ Set_fixed()
void DataForOptimisation::Set_fixed |
( |
string |
a_value, |
|
|
int |
i |
|
) |
| |
|
inline |
◆ Set_fodder()
void DataForOptimisation::Set_fodder |
( |
string |
a_value, |
|
|
int |
i |
|
) |
| |
|
inline |
◆ Set_FUKey()
void DataForOptimisation::Set_FUKey |
( |
double |
a_value, |
|
|
int |
i |
|
) |
| |
|
inline |
◆ Set_livestockNumber()
void DataForOptimisation::Set_livestockNumber |
( |
int |
a_number | ) |
|
|
inline |
◆ Set_livestockParameter()
void DataForOptimisation::Set_livestockParameter |
( |
double |
a_value, |
|
|
int |
i |
|
) |
| |
|
inline |
◆ Set_livestockTypes()
void DataForOptimisation::Set_livestockTypes |
( |
TTypesOfAnimals |
livestock_type | ) |
|
|
inline |
◆ Set_Nnorm()
void DataForOptimisation::Set_Nnorm |
( |
double |
a_value, |
|
|
int |
i |
|
) |
| |
|
inline |
◆ Set_noCrops()
void DataForOptimisation::Set_noCrops |
( |
int |
no | ) |
|
|
inline |
◆ Set_rotationMax()
void DataForOptimisation::Set_rotationMax |
( |
double |
a_value, |
|
|
int |
i |
|
) |
| |
|
inline |
◆ Set_rotationMin()
void DataForOptimisation::Set_rotationMin |
( |
double |
a_value, |
|
|
int |
i |
|
) |
| |
|
inline |
◆ Set_sellingPrice()
void DataForOptimisation::Set_sellingPrice |
( |
double |
a_value, |
|
|
int |
i |
|
) |
| |
|
inline |
◆ Set_sellingPrice_lastyr()
void DataForOptimisation::Set_sellingPrice_lastyr |
( |
double |
a_value, |
|
|
int |
i |
|
) |
| |
|
inline |
◆ Set_winterMax()
void DataForOptimisation::Set_winterMax |
( |
int |
a_value, |
|
|
int |
i |
|
) |
| |
|
inline |
◆ m_alfa
vector<double> DataForOptimisation::m_alfa |
|
protected |
◆ m_beta1
vector<double> DataForOptimisation::m_beta1 |
|
protected |
◆ m_beta2
vector<double> DataForOptimisation::m_beta2 |
|
protected |
◆ m_biomass_factors
vector<double> DataForOptimisation::m_biomass_factors |
|
protected |
Factor used to determine actual response (yield per ha) based on crop biomass at a harvest. Factor is crop specific and is equal to a ratio of the response for optimal fertilizer amount in Bedriftsmodel (original farm optimization model) to the biomass at a harvest for the corresponding ALMaSS crop grown with optimal fertilizer input.
Referenced by DataForOptimisation(), Get_biomass_factor(), and Set_biomass_factor().
◆ m_cropAreas
vector<double> DataForOptimisation::m_cropAreas |
|
protected |
◆ m_cropParameters
vector<double> DataForOptimisation::m_cropParameters |
|
protected |
◆ m_cropTypes
◆ m_cropTypes_almass
◆ m_energy_maize_price
vector<double> DataForOptimisation::m_energy_maize_price |
|
protected |
◆ m_farm_data
◆ m_fixed
vector<bool> DataForOptimisation::m_fixed |
|
protected |
◆ m_fodder
vector<bool> DataForOptimisation::m_fodder |
|
protected |
◆ m_FUKey
vector<double> DataForOptimisation::m_FUKey |
|
protected |
◆ m_livestockNumbers
vector<int> DataForOptimisation::m_livestockNumbers |
|
protected |
◆ m_livestockParameters
vector<double> DataForOptimisation::m_livestockParameters |
|
protected |
◆ m_livestockTypes
◆ m_Nnorm
vector<double> DataForOptimisation::m_Nnorm |
|
protected |
◆ m_noCrops
int DataForOptimisation::m_noCrops |
|
protected |
◆ m_rotationMax
vector<double> DataForOptimisation::m_rotationMax |
|
protected |
◆ m_rotationMin
vector<double> DataForOptimisation::m_rotationMin |
|
protected |
◆ m_sellingPrice
vector<double> DataForOptimisation::m_sellingPrice |
|
protected |
◆ m_sellingPrice_lastyr
vector<double> DataForOptimisation::m_sellingPrice_lastyr |
|
protected |
◆ m_str_cropTypes
vector<string> DataForOptimisation::m_str_cropTypes |
|
protected |
◆ m_str_cropTypes_almass
vector<string> DataForOptimisation::m_str_cropTypes_almass |
|
protected |
◆ m_winterMax
vector<int> DataForOptimisation::m_winterMax |
|
protected |
The documentation for this class was generated from the following files:
- C:/Repo/ALMaSS_all/Landscape/farm.h
- C:/Repo/ALMaSS_all/Landscape/farm.cpp
vector< double > m_Nnorm
Maximum amount of fertilizer (N) that can be applied for a given crop [kg N/ha]. Soil specific.
Definition: farm.h:734
vector< double > m_sellingPrice
Selling price of a crop [DKK/hkg]. Farm type specific and soil type specific.
Definition: farm.h:748
vector< double > m_sellingPrice_lastyr
Selling price of a crop in a previous year [DKK/hkg]. Farm type specific and soil type specific.
Definition: farm.h:750
vector< double > m_alfa
Crop parameter for response (growth) function (resp = alfa + beta1*N + beta2*N^2; defines relationshi...
Definition: farm.h:728
Definition: tov_declaration.h:114
vector< TTypesOfCrops > m_cropTypes
Crop types saved as enumarator types (Bedriftsmodel i.e. original crop optimization model crop mode).
Definition: farm.h:702
CfgBool cfg_OptimiseBedriftsmodelCrops("OPTIMISE_BEDRIFTSMODEL_CROPS", CFG_CUSTOM, false)
If set to true, the original farm optimisation model's crop set is used in the farmer decision making...
vector< double > m_cropAreas
Vector containing values of initial (i.e. in year the data is taken for) crop areas at farms included...
Definition: farm.h:711
vector< double > m_energy_maize_price
Vector with energy maize prices for each year of simulation.
Definition: farm.h:759
vector< int > m_winterMax
Maximal area taken by winter crops at a farm. [%].
Definition: farm.h:716
vector< double > m_beta2
Crop parameter for response (growth) function (resp = alfa + beta1*N + beta2*N^2; defines relationshi...
Definition: farm.h:732
vector< bool > m_fixed
Crop Boolean parameter - fixed/variable crop. Farm type specific.
Definition: farm.h:741
vector< TTypesOfVegetation > m_cropTypes_almass
Crop types saved as enumarator types (ALMaSS crop mode).
Definition: farm.h:707
vector< double > m_beta1
Crop parameter for response (growth) function (resp = alfa + beta1*N + beta2*N^2; defines relationshi...
Definition: farm.h:730
vector< double > m_rotationMax
Maximum acreage of a crop at a farm [%]. Farm type, soil type and farm size specific.
Definition: farm.h:753
vector< string > m_str_cropTypes_almass
Crop types saved in string format (ALMaSS crop mode).
Definition: farm.h:705
vector< double > m_biomass_factors
Factor used to determine actual response (yield per ha) based on crop biomass at a harvest....
Definition: farm.h:737
vector< double > m_FUKey
Crop parameter: Fodder unit key, i.e. a number of fodder units obtained from a given crop [FU/hkg]....
Definition: farm.h:745
vector< bool > m_fodder
Crop Boolean parameter - fodder/non-fodder crop. Farm type specific.
Definition: farm.h:743
vector< FarmData * > m_farm_data
Definition: farm.h:685
int m_noCrops
Number of crops used in the simulation.
Definition: farm.h:693
vector< double > m_livestockParameters
Vector storing parameters of all livestock types.
Definition: farm.h:720
vector< int > m_livestockNumbers
Vector containing numbers of all livestock types at farms included in the simulation.
Definition: farm.h:713
vector< string > m_str_cropTypes
Crop types saved in string format (Bedriftsmodel i.e. original crop optimization model crop mode).
Definition: farm.h:700
vector< double > m_cropParameters
Vector storing parameters of all crop types.
Definition: farm.h:725
vector< double > m_rotationMin
Minimum acreage of a crop at a farm [%]. Farm type, soil type and farm size specific.
Definition: farm.h:755
vector< TTypesOfAnimals > m_livestockTypes
Livestock types saved as enumarator types.
Definition: farm.h:709
void InitializeVector(vector< double > &vector)
Initializes vector with -1 values.
Definition: farm.cpp:5039