ALMaSS Rabbit ODdox  1.1
The rabbit model description following ODdox protocol
DataForOptimisation Class Reference

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< TTypesOfCropsm_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< TTypesOfVegetationm_cropTypes_almass
 Crop types saved as enumarator types (ALMaSS crop mode). More...
 
vector< TTypesOfAnimalsm_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...
 

Detailed Description

Class for storing data for optimisation.

Definition at line 589 of file farm.h.

Constructor & Destructor Documentation

◆ DataForOptimisation()

DataForOptimisation::DataForOptimisation ( )

The constructor.

Definition at line 5050 of file farm.cpp.

5050  {
5051 
5052  int foobar = (cfg_OptimiseBedriftsmodelCrops.value())? (int)toc_Foobar : (int)tov_Undefined; //bedriftsmodel crops/almass crops
5053 
5054  m_cropParameters.resize(foobar*top_Foobar);
5055  m_alfa.resize(foobar*tos_Foobar);
5056  m_beta1.resize(foobar*tos_Foobar);
5057  m_beta2.resize(foobar*tos_Foobar);
5058  m_Nnorm.resize(foobar*tos_Foobar);
5059  m_biomass_factors.resize(foobar*tos_Foobar);
5060  m_fixed.resize(foobar*toof_Foobar);
5061  m_fodder.resize(foobar*toof_Foobar);
5062  m_FUKey.resize(foobar*toof_Foobar);
5063  m_sellingPrice.resize(foobar*toof_Foobar*tos_Foobar);
5067  m_winterMax.resize(toof_Foobar);
5069 
5071  //fill them with -1
5082  }
5083 }

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().

Member Function Documentation

◆ Get_alfa()

double DataForOptimisation::Get_alfa ( int  i)
inline

Definition at line 625 of file farm.h.

625 {return m_alfa[i];};

References m_alfa.

Referenced by OptimisingFarm::findResponse().

◆ Get_beta1()

double DataForOptimisation::Get_beta1 ( int  i)
inline

Definition at line 627 of file farm.h.

627 {return m_beta1[i];};

References m_beta1.

Referenced by OptimisingFarm::ActualProfit(), OptimisingFarm::findFertilizer(), and OptimisingFarm::findResponse().

◆ Get_beta2()

double DataForOptimisation::Get_beta2 ( int  i)
inline

Definition at line 629 of file farm.h.

629 {return m_beta2[i];};

References m_beta2.

Referenced by OptimisingFarm::ActualProfit(), OptimisingFarm::findFertilizer(), and OptimisingFarm::findResponse().

◆ Get_biomass_factor()

double DataForOptimisation::Get_biomass_factor ( int  i)
inline

Definition at line 660 of file farm.h.

660 { return m_biomass_factors[i];}

References m_biomass_factors.

Referenced by OptimisingFarm::ActualProfit().

◆ Get_cropArea()

double DataForOptimisation::Get_cropArea ( int  index)
inline

Definition at line 607 of file farm.h.

607 {return m_cropAreas[index];};

References m_cropAreas.

Referenced by OptimisingFarm::Initialize().

◆ Get_cropAreasSize()

int DataForOptimisation::Get_cropAreasSize ( )
inline

Definition at line 608 of file farm.h.

608 {return (int)m_cropAreas.size();};

References m_cropAreas.

Referenced by OptimisingFarm::Initialize().

◆ Get_cropParameter()

double DataForOptimisation::Get_cropParameter ( int  i)
inline

Definition at line 622 of file farm.h.

622 {return m_cropParameters[i];};

References m_cropParameters.

Referenced by OptimisingFarm::crop_parameter().

◆ Get_cropTypes()

TTypesOfCrops DataForOptimisation::Get_cropTypes ( int  i)
inline

Definition at line 600 of file farm.h.

600 {return m_cropTypes[i];};

References m_cropTypes.

Referenced by OptimisingFarm::Initialize().

◆ Get_cropTypes_almass()

◆ Get_cropTypes_almass_size()

int DataForOptimisation::Get_cropTypes_almass_size ( )
inline

Definition at line 664 of file farm.h.

664 {return (int)m_cropTypes_almass.size();};

References m_cropTypes_almass.

Referenced by OptimisingFarm::ActualProfit(), and FarmManager::Switch_rotation().

◆ Get_cropTypes_almass_str()

string DataForOptimisation::Get_cropTypes_almass_str ( int  i)
inline

◆ Get_cropTypes_str()

string DataForOptimisation::Get_cropTypes_str ( int  i)
inline

Definition at line 599 of file farm.h.

599 {return m_str_cropTypes[i];};

References m_str_cropTypes.

Referenced by FarmManager::OptimisationOutput(), and FarmManager::PrintOutput().

◆ Get_emaize_price()

double DataForOptimisation::Get_emaize_price ( int  i)
inline

Definition at line 672 of file farm.h.

672 {return m_energy_maize_price[i];};

References m_energy_maize_price.

◆ Get_farmType()

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.

5086  {
5087  for(int i=0; i< (int) m_farm_data.size(); i++){
5088  if(m_farm_data[i]->md_almass_no == a_almass_no) return m_farm_data[i] -> md_farmType;
5089  }
5090  g_msg->Warn( WARN_BUG, "almass_no from farms_data doesn't match any of the numbers from farmrefs file", "" );
5091  exit(0);
5092 }

References g_msg, m_farm_data, MapErrorMsg::Warn(), and WARN_BUG.

Referenced by FarmManager::CreateFarms().

◆ Get_fixed()

bool DataForOptimisation::Get_fixed ( int  i)
inline

Definition at line 638 of file farm.h.

638 {return m_fixed[i];};

References m_fixed.

Referenced by AnimalFarm::createFodderCrops(), and OptimisingFarm::createVariableCrops().

◆ Get_fodder()

◆ Get_FUKey()

◆ Get_livestockNumber()

int DataForOptimisation::Get_livestockNumber ( int  index)
inline

Definition at line 605 of file farm.h.

605 {return m_livestockNumbers[index];};

References m_livestockNumbers.

Referenced by OptimisingFarm::Initialize().

◆ Get_livestockNumbersSize()

int DataForOptimisation::Get_livestockNumbersSize ( )
inline

Definition at line 606 of file farm.h.

606 {return (int)m_livestockNumbers.size();};

References m_livestockNumbers.

Referenced by OptimisingFarm::Initialize().

◆ Get_livestockParameter()

double DataForOptimisation::Get_livestockParameter ( int  i)
inline

Definition at line 618 of file farm.h.

618 {return m_livestockParameters[i];};

References m_livestockParameters.

Referenced by OptimisingFarm::findFodderDemand(), and OptimisingFarm::findTotalNanim().

◆ Get_livestockTypes()

TTypesOfAnimals DataForOptimisation::Get_livestockTypes ( int  i)
inline

Definition at line 598 of file farm.h.

598 {return m_livestockTypes[i];};

References m_livestockTypes.

Referenced by OptimisingFarm::Initialize().

◆ Get_Nnorm()

double DataForOptimisation::Get_Nnorm ( int  i)
inline

Definition at line 631 of file farm.h.

631 {return m_Nnorm[i];};

References m_Nnorm.

Referenced by OptimisingFarm::findFertilizer().

◆ Get_noCrops()

◆ Get_rotationMax()

double DataForOptimisation::Get_rotationMax ( int  i)
inline

Definition at line 653 of file farm.h.

653 {return m_rotationMax[i];};

References m_rotationMax.

Referenced by OptimisingFarm::Initialize().

◆ Get_rotationMin()

double DataForOptimisation::Get_rotationMin ( int  i)
inline

Definition at line 655 of file farm.h.

655 {return m_rotationMin[i];};

References m_rotationMin.

Referenced by OptimisingFarm::Initialize().

◆ Get_sellingPrice()

double DataForOptimisation::Get_sellingPrice ( int  i)
inline

Definition at line 648 of file farm.h.

648 {return m_sellingPrice[i];};

References m_sellingPrice.

Referenced by OptimisingFarm::ActualProfit(), and OptimisingFarm::optimizeCrops().

◆ Get_sellingPrice_lastyr()

double DataForOptimisation::Get_sellingPrice_lastyr ( int  i)
inline

Definition at line 650 of file farm.h.

650 {return m_sellingPrice_lastyr[i];};

References m_sellingPrice_lastyr.

Referenced by OptimisingFarm::ActualProfit().

◆ Get_winterMax()

int DataForOptimisation::Get_winterMax ( int  i)
inline

◆ InitializeVector()

void DataForOptimisation::InitializeVector ( vector< double > &  vector)
protected

Initializes vector with -1 values.

Definition at line 5039 of file farm.cpp.

5039  {
5040 
5041  for(int i=0; i<(int)vector.size(); i++){
5042  vector[i] = -1;
5043  }
5044 }

Referenced by DataForOptimisation().

◆ Set_alfa()

void DataForOptimisation::Set_alfa ( double  a_value,
int  i 
)
inline

Definition at line 624 of file farm.h.

624 {m_alfa[i]=a_value;};

References m_alfa.

Referenced by FarmManager::ReadCropsData_perSoilType(), and FarmManager::ReadCropsData_perSoilType_almass().

◆ Set_beta1()

void DataForOptimisation::Set_beta1 ( double  a_value,
int  i 
)
inline

Definition at line 626 of file farm.h.

626 {m_beta1[i]=a_value;};

References m_beta1.

Referenced by FarmManager::ReadCropsData_perSoilType(), and FarmManager::ReadCropsData_perSoilType_almass().

◆ Set_beta2()

void DataForOptimisation::Set_beta2 ( double  a_value,
int  i 
)
inline

Definition at line 628 of file farm.h.

628 {m_beta2[i]=a_value;};

References m_beta2.

Referenced by FarmManager::ReadCropsData_perSoilType(), and FarmManager::ReadCropsData_perSoilType_almass().

◆ Set_biomass_factor()

void DataForOptimisation::Set_biomass_factor ( double  a_value,
int  i 
)
inline

Definition at line 659 of file farm.h.

659 {m_biomass_factors[i] = a_value;};

References m_biomass_factors.

Referenced by FarmManager::ReadCropsData_perSoilType_almass().

◆ Set_cropArea()

void DataForOptimisation::Set_cropArea ( double  a_area)
inline

Definition at line 604 of file farm.h.

604 {m_cropAreas.push_back(a_area);};

References m_cropAreas.

Referenced by FarmManager::ReadInitialCropAreas(), and FarmManager::ReadInitialCropAreas_almass().

◆ Set_cropParameter()

void DataForOptimisation::Set_cropParameter ( double  a_value,
int  i 
)
inline

Definition at line 621 of file farm.h.

621 {m_cropParameters[i]=a_value;};

References m_cropParameters.

Referenced by FarmManager::ReadCropsData(), and FarmManager::ReadCropsData_almass().

◆ Set_cropTypes()

void DataForOptimisation::Set_cropTypes ( TTypesOfCrops  crop_type)
inline

Definition at line 596 of file farm.h.

596 {m_cropTypes.push_back(crop_type);};

References m_cropTypes.

Referenced by FarmManager::ReadInitialCropAreas().

◆ Set_cropTypes_almass()

void DataForOptimisation::Set_cropTypes_almass ( TTypesOfVegetation  crop_type)
inline

Definition at line 662 of file farm.h.

662 {m_cropTypes_almass.push_back(crop_type);};

References m_cropTypes_almass.

Referenced by FarmManager::ReadInitialCropAreas_almass().

◆ Set_cropTypes_almass_str()

void DataForOptimisation::Set_cropTypes_almass_str ( string  crop_type)
inline

Definition at line 665 of file farm.h.

665 {m_str_cropTypes_almass.push_back(crop_type);};

References m_str_cropTypes_almass.

Referenced by FarmManager::ReadInitialCropAreas_almass().

◆ Set_cropTypes_str()

void DataForOptimisation::Set_cropTypes_str ( string  crop_type)
inline

Definition at line 597 of file farm.h.

597 {m_str_cropTypes.push_back(crop_type);};

References m_str_cropTypes.

Referenced by FarmManager::ReadInitialCropAreas().

◆ Set_emaize_price()

void DataForOptimisation::Set_emaize_price ( double  a_value)
inline

Definition at line 671 of file farm.h.

671 {m_energy_maize_price.push_back(a_value);};

References m_energy_maize_price.

Referenced by FarmManager::ReadEnergyMaizePrice().

◆ Set_fixed()

void DataForOptimisation::Set_fixed ( string  a_value,
int  i 
)
inline

Definition at line 634 of file farm.h.

634  {
635  if(a_value=="yes" || a_value=="YES" || a_value=="Yes" || a_value=="1"){m_fixed[i]=true;}
636  else {m_fixed[i]=false;}
637  };

References m_fixed.

Referenced by FarmManager::ReadCropsData_perFarmType(), and FarmManager::ReadCropsData_perFarmType_almass().

◆ Set_fodder()

void DataForOptimisation::Set_fodder ( string  a_value,
int  i 
)
inline

Definition at line 639 of file farm.h.

639  {
640  if(a_value=="yes" || a_value=="YES" || a_value=="Yes" || a_value=="1"){m_fodder[i]=true;}
641  else {m_fodder[i]=false;}
642  };

References m_fodder.

Referenced by FarmManager::ReadCropsData_perFarmType(), and FarmManager::ReadCropsData_perFarmType_almass().

◆ Set_FUKey()

void DataForOptimisation::Set_FUKey ( double  a_value,
int  i 
)
inline

Definition at line 644 of file farm.h.

644 {m_FUKey[i]=a_value;};

References m_FUKey.

Referenced by FarmManager::ReadCropsData_perFarmType(), and FarmManager::ReadCropsData_perFarmType_almass().

◆ Set_livestockNumber()

void DataForOptimisation::Set_livestockNumber ( int  a_number)
inline

Definition at line 603 of file farm.h.

603 {m_livestockNumbers.push_back(a_number);};

References m_livestockNumbers.

Referenced by FarmManager::ReadLivestockNumbers().

◆ Set_livestockParameter()

void DataForOptimisation::Set_livestockParameter ( double  a_value,
int  i 
)
inline

Definition at line 617 of file farm.h.

617 {m_livestockParameters[i]=a_value;};

References m_livestockParameters.

Referenced by FarmManager::ReadLivestockData().

◆ Set_livestockTypes()

void DataForOptimisation::Set_livestockTypes ( TTypesOfAnimals  livestock_type)
inline

Definition at line 595 of file farm.h.

595 {m_livestockTypes.push_back(livestock_type);};

References m_livestockTypes.

Referenced by FarmManager::ReadLivestockNumbers().

◆ Set_Nnorm()

void DataForOptimisation::Set_Nnorm ( double  a_value,
int  i 
)
inline

Definition at line 630 of file farm.h.

630 {m_Nnorm[i]=a_value;};

References m_Nnorm.

Referenced by FarmManager::ReadCropsData_perSoilType(), and FarmManager::ReadCropsData_perSoilType_almass().

◆ Set_noCrops()

void DataForOptimisation::Set_noCrops ( int  no)
inline

Definition at line 668 of file farm.h.

668 {m_noCrops = no;};

References m_noCrops.

Referenced by FarmManager::ReadInitialCropAreas_almass().

◆ 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

Definition at line 649 of file farm.h.

649 {m_sellingPrice_lastyr[i]=a_value;};

References m_sellingPrice_lastyr.

◆ Set_winterMax()

void DataForOptimisation::Set_winterMax ( int  a_value,
int  i 
)
inline

Definition at line 613 of file farm.h.

613 {m_winterMax[i]=a_value;};

References m_winterMax.

Referenced by FarmManager::ReadFarmsData_perFarmType().

Member Data Documentation

◆ m_alfa

vector<double> DataForOptimisation::m_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 728 of file farm.h.

Referenced by DataForOptimisation(), Get_alfa(), and Set_alfa().

◆ m_beta1

vector<double> DataForOptimisation::m_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 730 of file farm.h.

Referenced by DataForOptimisation(), Get_beta1(), and Set_beta1().

◆ m_beta2

vector<double> DataForOptimisation::m_beta2
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().

◆ 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.

Definition at line 737 of file farm.h.

Referenced by DataForOptimisation(), Get_biomass_factor(), and Set_biomass_factor().

◆ m_cropAreas

vector<double> DataForOptimisation::m_cropAreas
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().

◆ m_cropParameters

vector<double> DataForOptimisation::m_cropParameters
protected

Vector storing parameters of all crop types.

Definition at line 725 of file farm.h.

Referenced by DataForOptimisation(), Get_cropParameter(), and Set_cropParameter().

◆ m_cropTypes

vector<TTypesOfCrops> DataForOptimisation::m_cropTypes
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().

◆ m_cropTypes_almass

vector<TTypesOfVegetation> DataForOptimisation::m_cropTypes_almass
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().

◆ m_energy_maize_price

vector<double> DataForOptimisation::m_energy_maize_price
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().

◆ m_farm_data

vector<FarmData*> DataForOptimisation::m_farm_data

Definition at line 685 of file farm.h.

Referenced by Get_farmType(), OptimisingFarm::Initialize(), and FarmManager::ReadFarmsData().

◆ m_fixed

vector<bool> DataForOptimisation::m_fixed
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().

◆ m_fodder

vector<bool> DataForOptimisation::m_fodder
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().

◆ m_FUKey

vector<double> DataForOptimisation::m_FUKey
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().

◆ m_livestockNumbers

vector<int> DataForOptimisation::m_livestockNumbers
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().

◆ m_livestockParameters

vector<double> DataForOptimisation::m_livestockParameters
protected

Vector storing parameters of all livestock types.

Definition at line 720 of file farm.h.

Referenced by DataForOptimisation(), Get_livestockParameter(), and Set_livestockParameter().

◆ m_livestockTypes

vector<TTypesOfAnimals> DataForOptimisation::m_livestockTypes
protected

Livestock types saved as enumarator types.

Definition at line 709 of file farm.h.

Referenced by Get_livestockTypes(), and Set_livestockTypes().

◆ m_Nnorm

vector<double> DataForOptimisation::m_Nnorm
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().

◆ m_noCrops

int DataForOptimisation::m_noCrops
protected

Number of crops used in the simulation.

Definition at line 693 of file farm.h.

Referenced by Get_noCrops(), and Set_noCrops().

◆ m_rotationMax

vector<double> DataForOptimisation::m_rotationMax
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().

◆ m_rotationMin

vector<double> DataForOptimisation::m_rotationMin
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().

◆ m_sellingPrice

vector<double> DataForOptimisation::m_sellingPrice
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().

◆ m_sellingPrice_lastyr

vector<double> DataForOptimisation::m_sellingPrice_lastyr
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().

◆ m_str_cropTypes

vector<string> DataForOptimisation::m_str_cropTypes
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().

◆ m_str_cropTypes_almass

vector<string> DataForOptimisation::m_str_cropTypes_almass
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().

◆ m_winterMax

vector<int> DataForOptimisation::m_winterMax
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().


The documentation for this class was generated from the following files:
top_Foobar
Definition: farm.h:389
DataForOptimisation::m_Nnorm
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
DataForOptimisation::m_sellingPrice
vector< double > m_sellingPrice
Selling price of a crop [DKK/hkg]. Farm type specific and soil type specific.
Definition: farm.h:748
DataForOptimisation::m_sellingPrice_lastyr
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
DataForOptimisation::m_alfa
vector< double > m_alfa
Crop parameter for response (growth) function (resp = alfa + beta1*N + beta2*N^2; defines relationshi...
Definition: farm.h:728
tov_Undefined
Definition: tov_declaration.h:114
DataForOptimisation::m_cropTypes
vector< TTypesOfCrops > m_cropTypes
Crop types saved as enumarator types (Bedriftsmodel i.e. original crop optimization model crop mode).
Definition: farm.h:702
tofs_Foobar
Definition: farm.h:296
WARN_BUG
Definition: maperrormsg.h:34
DataForOptimisation::m_cropAreas
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
DataForOptimisation::m_energy_maize_price
vector< double > m_energy_maize_price
Vector with energy maize prices for each year of simulation.
Definition: farm.h:759
tos_Foobar
Definition: farm.h:290
g_msg
class MapErrorMsg * g_msg
Definition: maperrormsg.cpp:41
DataForOptimisation::m_winterMax
vector< int > m_winterMax
Maximal area taken by winter crops at a farm. [%].
Definition: farm.h:716
DataForOptimisation::m_beta2
vector< double > m_beta2
Crop parameter for response (growth) function (resp = alfa + beta1*N + beta2*N^2; defines relationshi...
Definition: farm.h:732
DataForOptimisation::m_fixed
vector< bool > m_fixed
Crop Boolean parameter - fixed/variable crop. Farm type specific.
Definition: farm.h:741
DataForOptimisation::m_cropTypes_almass
vector< TTypesOfVegetation > m_cropTypes_almass
Crop types saved as enumarator types (ALMaSS crop mode).
Definition: farm.h:707
MapErrorMsg::Warn
void Warn(MapErrorState a_level, std::string a_msg1, std::string a_msg2)
Definition: maperrormsg.cpp:59
DataForOptimisation::m_beta1
vector< double > m_beta1
Crop parameter for response (growth) function (resp = alfa + beta1*N + beta2*N^2; defines relationshi...
Definition: farm.h:730
DataForOptimisation::m_rotationMax
vector< double > m_rotationMax
Maximum acreage of a crop at a farm [%]. Farm type, soil type and farm size specific.
Definition: farm.h:753
DataForOptimisation::m_str_cropTypes_almass
vector< string > m_str_cropTypes_almass
Crop types saved in string format (ALMaSS crop mode).
Definition: farm.h:705
DataForOptimisation::m_biomass_factors
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
DataForOptimisation::m_FUKey
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
DataForOptimisation::m_fodder
vector< bool > m_fodder
Crop Boolean parameter - fodder/non-fodder crop. Farm type specific.
Definition: farm.h:743
toa_Foobar
Definition: farm.h:320
DataForOptimisation::m_farm_data
vector< FarmData * > m_farm_data
Definition: farm.h:685
DataForOptimisation::m_noCrops
int m_noCrops
Number of crops used in the simulation.
Definition: farm.h:693
tolp_Foobar
Definition: farm.h:396
DataForOptimisation::m_livestockParameters
vector< double > m_livestockParameters
Vector storing parameters of all livestock types.
Definition: farm.h:720
toc_Foobar
Definition: farm.h:367
DataForOptimisation::m_livestockNumbers
vector< int > m_livestockNumbers
Vector containing numbers of all livestock types at farms included in the simulation.
Definition: farm.h:713
DataForOptimisation::m_str_cropTypes
vector< string > m_str_cropTypes
Crop types saved in string format (Bedriftsmodel i.e. original crop optimization model crop mode).
Definition: farm.h:700
DataForOptimisation::m_cropParameters
vector< double > m_cropParameters
Vector storing parameters of all crop types.
Definition: farm.h:725
DataForOptimisation::m_rotationMin
vector< double > m_rotationMin
Minimum acreage of a crop at a farm [%]. Farm type, soil type and farm size specific.
Definition: farm.h:755
DataForOptimisation::m_livestockTypes
vector< TTypesOfAnimals > m_livestockTypes
Livestock types saved as enumarator types.
Definition: farm.h:709
toof_Foobar
Definition: farm.h:283
DataForOptimisation::InitializeVector
void InitializeVector(vector< double > &vector)
Initializes vector with -1 values.
Definition: farm.cpp:5039
cfg_OptimiseBedriftsmodelCrops
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...
CfgBool::value
bool value(void)
Definition: configurator.h:135