ALMaSS Rabbit ODdox
1.1
The rabbit model description following ODdox protocol
|
Class for storing data for optimisation. More...
#include <farm.h>
Classes | |
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... | |
Public Member Functions | |
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) |
Public Attributes | |
vector< FarmData * > | m_farm_data |
Protected Member Functions | |
void | InitializeVector (vector< double > &vector) |
Initializes vector with -1 values. More... | |
Protected Attributes | |
int | m_noCrops |
Number of crops used in the simulation. More... | |
vector< string > | m_str_cropTypes |
Crop types saved in string format (Bedriftsmodel i.e. original crop optimization model crop mode). More... | |
vector< TTypesOfCrops > | m_cropTypes |
Crop types saved as enumarator types (Bedriftsmodel i.e. original crop optimization model crop mode). More... | |
vector< string > | m_str_cropTypes_almass |
Crop types saved in string format (ALMaSS crop mode). More... | |
vector< TTypesOfVegetation > | m_cropTypes_almass |
Crop types saved as enumarator types (ALMaSS crop mode). More... | |
vector< TTypesOfAnimals > | m_livestockTypes |
Livestock types saved as enumarator types. More... | |
vector< double > | m_cropAreas |
Vector containing values of initial (i.e. in year the data is taken for) crop areas at farms included in the simulation. More... | |
vector< int > | m_livestockNumbers |
Vector containing numbers of all livestock types at farms included in the simulation. More... | |
vector< int > | m_winterMax |
Maximal area taken by winter crops at a farm. [%]. More... | |
vector< double > | m_livestockParameters |
Vector storing parameters of all livestock types. More... | |
vector< double > | m_cropParameters |
Vector storing parameters of all crop types. More... | |
vector< double > | m_alfa |
Crop parameter for response (growth) function (resp = alfa + beta1*N + beta2*N^2; defines relationship between yield and fertilizer). Soil type specific. More... | |
vector< double > | m_beta1 |
Crop parameter for response (growth) function (resp = alfa + beta1*N + beta2*N^2; defines relationship between yield and fertilizer). Soil type specific. More... | |
vector< double > | m_beta2 |
Crop parameter for response (growth) function (resp = alfa + beta1*N + beta2*N^2; defines relationship between yield and fertilizer). Soil type specific. More... | |
vector< double > | m_Nnorm |
Maximum amount of fertilizer (N) that can be applied for a given crop [kg N/ha]. Soil specific. More... | |
vector< double > | m_biomass_factors |
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. More... | |
vector< bool > | m_fixed |
Crop Boolean parameter - fixed/variable crop. Farm type specific. More... | |
vector< bool > | m_fodder |
Crop Boolean parameter - fodder/non-fodder crop. Farm type specific. More... | |
vector< double > | m_FUKey |
Crop parameter: Fodder unit key, i.e. a number of fodder units obtained from a given crop [FU/hkg]. Farm type specific. More... | |
vector< double > | m_sellingPrice |
Selling price of a crop [DKK/hkg]. Farm type specific and soil type specific. More... | |
vector< double > | m_sellingPrice_lastyr |
Selling price of a crop in a previous year [DKK/hkg]. Farm type specific and soil type specific. More... | |
vector< double > | m_rotationMax |
Maximum acreage of a crop at a farm [%]. Farm type, soil type and farm size specific. More... | |
vector< double > | m_rotationMin |
Minimum acreage of a crop at a farm [%]. Farm type, soil type and farm size specific. More... | |
vector< double > | m_energy_maize_price |
Vector with energy maize prices for each year of simulation. More... | |
DataForOptimisation::DataForOptimisation | ( | ) |
The constructor.
Definition at line 5050 of file farm.cpp.
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, tov_Undefined, and CfgBool::value().
|
inline |
Definition at line 625 of file farm.h.
References m_alfa.
Referenced by OptimisingFarm::findResponse().
|
inline |
Definition at line 627 of file farm.h.
References m_beta1.
Referenced by OptimisingFarm::ActualProfit(), OptimisingFarm::findFertilizer(), and OptimisingFarm::findResponse().
|
inline |
Definition at line 629 of file farm.h.
References m_beta2.
Referenced by OptimisingFarm::ActualProfit(), OptimisingFarm::findFertilizer(), and OptimisingFarm::findResponse().
|
inline |
Definition at line 660 of file farm.h.
References m_biomass_factors.
Referenced by OptimisingFarm::ActualProfit().
|
inline |
Definition at line 607 of file farm.h.
References m_cropAreas.
Referenced by OptimisingFarm::Initialize().
|
inline |
Definition at line 608 of file farm.h.
References m_cropAreas.
Referenced by OptimisingFarm::Initialize().
|
inline |
Definition at line 622 of file farm.h.
References m_cropParameters.
Referenced by OptimisingFarm::crop_parameter().
|
inline |
Definition at line 600 of file farm.h.
References m_cropTypes.
Referenced by OptimisingFarm::Initialize().
|
inline |
Definition at line 663 of file farm.h.
References m_cropTypes_almass.
Referenced by OptimisingFarm::ActualProfit(), FarmManager::FarmManager(), OptimisingFarm::Initialize(), FarmManager::ReadCropsData_almass(), FarmManager::ReadCropsData_perFarm_and_Soil_almass(), FarmManager::ReadCropsData_perFarm_and_Soil_and_Size_almass(), FarmManager::ReadCropsData_perFarmType_almass(), FarmManager::ReadCropsData_perSoilType_almass(), and FarmManager::Switch_rotation().
|
inline |
Definition at line 664 of file farm.h.
References m_cropTypes_almass.
Referenced by OptimisingFarm::ActualProfit(), and FarmManager::Switch_rotation().
|
inline |
Definition at line 666 of file farm.h.
References m_str_cropTypes_almass.
Referenced by FarmManager::OptimisationOutput(), FarmManager::PrintFinalResults(), and FarmManager::PrintOutput().
|
inline |
Definition at line 599 of file farm.h.
References m_str_cropTypes.
Referenced by FarmManager::OptimisationOutput(), and FarmManager::PrintOutput().
|
inline |
TTypesOfOptFarms DataForOptimisation::Get_farmType | ( | int | a_almass_no | ) |
Used by FarmManager::CreateFarms. Finds a matching almass number and returns farm's type.
Definition at line 5086 of file farm.cpp.
References g_msg, m_farm_data, MapErrorMsg::Warn(), and WARN_BUG.
Referenced by FarmManager::CreateFarms().
|
inline |
Definition at line 638 of file farm.h.
References m_fixed.
Referenced by AnimalFarm::createFodderCrops(), and OptimisingFarm::createVariableCrops().
|
inline |
Definition at line 643 of file farm.h.
References m_fodder.
Referenced by OptimisingFarm::ActualProfit(), OptimisingCattleFarm::checkCattleRotation(), AnimalFarm::checkWinterRotation1(), AnimalFarm::createFodderCrops(), AnimalFarm::decreaseCrops(), OptimisingFarm::determineAreas(), OptimisingFarm::findGrossMargin(), AnimalFarm::increaseCrops(), OptimisingFarm::optimizeCrops(), and OptimisingCattleFarm::setCattleCropsAtMin().
|
inline |
Definition at line 645 of file farm.h.
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().
|
inline |
Definition at line 605 of file farm.h.
References m_livestockNumbers.
Referenced by OptimisingFarm::Initialize().
|
inline |
Definition at line 606 of file farm.h.
References m_livestockNumbers.
Referenced by OptimisingFarm::Initialize().
|
inline |
Definition at line 618 of file farm.h.
References m_livestockParameters.
Referenced by OptimisingFarm::findFodderDemand(), and OptimisingFarm::findTotalNanim().
|
inline |
Definition at line 598 of file farm.h.
References m_livestockTypes.
Referenced by OptimisingFarm::Initialize().
|
inline |
Definition at line 631 of file farm.h.
References m_Nnorm.
Referenced by OptimisingFarm::findFertilizer().
|
inline |
Definition at line 669 of file farm.h.
References m_noCrops.
Referenced by OptimisingFarm::ActualProfit(), FarmManager::CropDistribution(), FarmManager::FarmManager(), OptimisingFarm::Initialize(), FarmManager::OptimisationOutput(), FarmManager::PrintFinalResults(), and FarmManager::PrintOutput().
|
inline |
Definition at line 653 of file farm.h.
References m_rotationMax.
Referenced by OptimisingFarm::Initialize().
|
inline |
Definition at line 655 of file farm.h.
References m_rotationMin.
Referenced by OptimisingFarm::Initialize().
|
inline |
Definition at line 648 of file farm.h.
References m_sellingPrice.
Referenced by OptimisingFarm::ActualProfit(), and OptimisingFarm::optimizeCrops().
|
inline |
Definition at line 650 of file farm.h.
References m_sellingPrice_lastyr.
Referenced by OptimisingFarm::ActualProfit().
|
inline |
Definition at line 614 of file farm.h.
References m_winterMax.
Referenced by OptimisingPigFarm::check_WRape_WBarley(), AnimalFarm::checkWinterCrops(), and NonAnimalFarm::checkWinterCrops().
|
protected |
Initializes vector with -1 values.
Definition at line 5039 of file farm.cpp.
Referenced by DataForOptimisation().
|
inline |
Definition at line 624 of file farm.h.
References m_alfa.
Referenced by FarmManager::ReadCropsData_perSoilType(), and FarmManager::ReadCropsData_perSoilType_almass().
|
inline |
Definition at line 626 of file farm.h.
References m_beta1.
Referenced by FarmManager::ReadCropsData_perSoilType(), and FarmManager::ReadCropsData_perSoilType_almass().
|
inline |
Definition at line 628 of file farm.h.
References m_beta2.
Referenced by FarmManager::ReadCropsData_perSoilType(), and FarmManager::ReadCropsData_perSoilType_almass().
|
inline |
Definition at line 659 of file farm.h.
References m_biomass_factors.
Referenced by FarmManager::ReadCropsData_perSoilType_almass().
|
inline |
Definition at line 604 of file farm.h.
References m_cropAreas.
Referenced by FarmManager::ReadInitialCropAreas(), and FarmManager::ReadInitialCropAreas_almass().
|
inline |
Definition at line 621 of file farm.h.
References m_cropParameters.
Referenced by FarmManager::ReadCropsData(), and FarmManager::ReadCropsData_almass().
|
inline |
Definition at line 596 of file farm.h.
References m_cropTypes.
Referenced by FarmManager::ReadInitialCropAreas().
|
inline |
Definition at line 662 of file farm.h.
References m_cropTypes_almass.
Referenced by FarmManager::ReadInitialCropAreas_almass().
|
inline |
Definition at line 665 of file farm.h.
References m_str_cropTypes_almass.
Referenced by FarmManager::ReadInitialCropAreas_almass().
|
inline |
Definition at line 597 of file farm.h.
References m_str_cropTypes.
Referenced by FarmManager::ReadInitialCropAreas().
|
inline |
Definition at line 671 of file farm.h.
References m_energy_maize_price.
Referenced by FarmManager::ReadEnergyMaizePrice().
|
inline |
Definition at line 634 of file farm.h.
References m_fixed.
Referenced by FarmManager::ReadCropsData_perFarmType(), and FarmManager::ReadCropsData_perFarmType_almass().
|
inline |
Definition at line 639 of file farm.h.
References m_fodder.
Referenced by FarmManager::ReadCropsData_perFarmType(), and FarmManager::ReadCropsData_perFarmType_almass().
|
inline |
Definition at line 644 of file farm.h.
References m_FUKey.
Referenced by FarmManager::ReadCropsData_perFarmType(), and FarmManager::ReadCropsData_perFarmType_almass().
|
inline |
Definition at line 603 of file farm.h.
References m_livestockNumbers.
Referenced by FarmManager::ReadLivestockNumbers().
|
inline |
Definition at line 617 of file farm.h.
References m_livestockParameters.
Referenced by FarmManager::ReadLivestockData().
|
inline |
Definition at line 595 of file farm.h.
References m_livestockTypes.
Referenced by FarmManager::ReadLivestockNumbers().
|
inline |
Definition at line 630 of file farm.h.
References m_Nnorm.
Referenced by FarmManager::ReadCropsData_perSoilType(), and FarmManager::ReadCropsData_perSoilType_almass().
|
inline |
Definition at line 668 of file farm.h.
References m_noCrops.
Referenced by FarmManager::ReadInitialCropAreas_almass().
|
inline |
Definition at line 652 of file farm.h.
References m_rotationMax.
Referenced by FarmManager::ReadCropsData_perFarm_and_Soil_and_Size(), and FarmManager::ReadCropsData_perFarm_and_Soil_and_Size_almass().
|
inline |
Definition at line 654 of file farm.h.
References m_rotationMin.
Referenced by FarmManager::ReadCropsData_perFarm_and_Soil_and_Size(), and FarmManager::ReadCropsData_perFarm_and_Soil_and_Size_almass().
|
inline |
Definition at line 647 of file farm.h.
References m_sellingPrice.
Referenced by FarmManager::ReadCropsData_perFarm_and_Soil(), and FarmManager::ReadCropsData_perFarm_and_Soil_almass().
|
inline |
|
inline |
Definition at line 613 of file farm.h.
References m_winterMax.
Referenced by FarmManager::ReadFarmsData_perFarmType().
|
protected |
Crop parameter for response (growth) function (resp = alfa + beta1*N + beta2*N^2; defines relationship between yield and fertilizer). Soil type specific.
Definition at line 728 of file farm.h.
Referenced by DataForOptimisation(), Get_alfa(), and Set_alfa().
|
protected |
Crop parameter for response (growth) function (resp = alfa + beta1*N + beta2*N^2; defines relationship between yield and fertilizer). Soil type specific.
Definition at line 730 of file farm.h.
Referenced by DataForOptimisation(), Get_beta1(), and Set_beta1().
|
protected |
Crop parameter for response (growth) function (resp = alfa + beta1*N + beta2*N^2; defines relationship between yield and fertilizer). Soil type specific.
Definition at line 732 of file farm.h.
Referenced by DataForOptimisation(), Get_beta2(), and Set_beta2().
|
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.
Definition at line 737 of file farm.h.
Referenced by DataForOptimisation(), Get_biomass_factor(), and Set_biomass_factor().
|
protected |
Vector containing values of initial (i.e. in year the data is taken for) crop areas at farms included in the simulation.
Definition at line 711 of file farm.h.
Referenced by Get_cropArea(), Get_cropAreasSize(), and Set_cropArea().
|
protected |
Vector storing parameters of all crop types.
Definition at line 725 of file farm.h.
Referenced by DataForOptimisation(), Get_cropParameter(), and Set_cropParameter().
|
protected |
Crop types saved as enumarator types (Bedriftsmodel i.e. original crop optimization model crop mode).
Definition at line 702 of file farm.h.
Referenced by Get_cropTypes(), and Set_cropTypes().
|
protected |
Crop types saved as enumarator types (ALMaSS crop mode).
Definition at line 707 of file farm.h.
Referenced by Get_cropTypes_almass(), Get_cropTypes_almass_size(), and Set_cropTypes_almass().
|
protected |
Vector with energy maize prices for each year of simulation.
Definition at line 759 of file farm.h.
Referenced by Get_emaize_price(), and Set_emaize_price().
vector<FarmData*> DataForOptimisation::m_farm_data |
Definition at line 685 of file farm.h.
Referenced by Get_farmType(), OptimisingFarm::Initialize(), and FarmManager::ReadFarmsData().
|
protected |
Crop Boolean parameter - fixed/variable crop. Farm type specific.
Definition at line 741 of file farm.h.
Referenced by DataForOptimisation(), Get_fixed(), and Set_fixed().
|
protected |
Crop Boolean parameter - fodder/non-fodder crop. Farm type specific.
Definition at line 743 of file farm.h.
Referenced by DataForOptimisation(), Get_fodder(), and Set_fodder().
|
protected |
Crop parameter: Fodder unit key, i.e. a number of fodder units obtained from a given crop [FU/hkg]. Farm type specific.
Definition at line 745 of file farm.h.
Referenced by DataForOptimisation(), Get_FUKey(), and Set_FUKey().
|
protected |
Vector containing numbers of all livestock types at farms included in the simulation.
Definition at line 713 of file farm.h.
Referenced by Get_livestockNumber(), Get_livestockNumbersSize(), and Set_livestockNumber().
|
protected |
Vector storing parameters of all livestock types.
Definition at line 720 of file farm.h.
Referenced by DataForOptimisation(), Get_livestockParameter(), and Set_livestockParameter().
|
protected |
Livestock types saved as enumarator types.
Definition at line 709 of file farm.h.
Referenced by Get_livestockTypes(), and Set_livestockTypes().
|
protected |
Maximum amount of fertilizer (N) that can be applied for a given crop [kg N/ha]. Soil specific.
Definition at line 734 of file farm.h.
Referenced by DataForOptimisation(), Get_Nnorm(), and Set_Nnorm().
|
protected |
Number of crops used in the simulation.
Definition at line 693 of file farm.h.
Referenced by Get_noCrops(), and Set_noCrops().
|
protected |
Maximum acreage of a crop at a farm [%]. Farm type, soil type and farm size specific.
Definition at line 753 of file farm.h.
Referenced by DataForOptimisation(), Get_rotationMax(), and Set_rotationMax().
|
protected |
Minimum acreage of a crop at a farm [%]. Farm type, soil type and farm size specific.
Definition at line 755 of file farm.h.
Referenced by DataForOptimisation(), Get_rotationMin(), and Set_rotationMin().
|
protected |
Selling price of a crop [DKK/hkg]. Farm type specific and soil type specific.
Definition at line 748 of file farm.h.
Referenced by DataForOptimisation(), Get_sellingPrice(), and Set_sellingPrice().
|
protected |
Selling price of a crop in a previous year [DKK/hkg]. Farm type specific and soil type specific.
Definition at line 750 of file farm.h.
Referenced by DataForOptimisation(), Get_sellingPrice_lastyr(), and Set_sellingPrice_lastyr().
|
protected |
Crop types saved in string format (Bedriftsmodel i.e. original crop optimization model crop mode).
Definition at line 700 of file farm.h.
Referenced by Get_cropTypes_str(), and Set_cropTypes_str().
|
protected |
Crop types saved in string format (ALMaSS crop mode).
Definition at line 705 of file farm.h.
Referenced by Get_cropTypes_almass_str(), and Set_cropTypes_almass_str().
|
protected |
Maximal area taken by winter crops at a farm. [%].
Definition at line 716 of file farm.h.
Referenced by DataForOptimisation(), Get_winterMax(), and Set_winterMax().