ALMaSS Rabbit ODdox  1.00
The rabbit model description following ODdox protocol
Classes | Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
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 505 of file farm.h.

Constructor & Destructor Documentation

DataForOptimisation::DataForOptimisation ( )

The constructor.

Definition at line 4573 of file farm.cpp.

References cfg_OptimiseBedriftsmodelCrops, toa_Foobar, toc_Foobar, tofs_Foobar, tolp_Foobar, toof_Foobar, top_Foobar, tos_Foobar, tov_Undefined, and CfgBool::value().

4573  {
4574 
4575  int foobar = (cfg_OptimiseBedriftsmodelCrops.value())? (int)toc_Foobar : (int)tov_Undefined; //bedriftsmodel crops/almass crops
4576 
4577  m_cropParameters.resize(foobar*top_Foobar);
4578  m_alfa.resize(foobar*tos_Foobar);
4579  m_beta1.resize(foobar*tos_Foobar);
4580  m_beta2.resize(foobar*tos_Foobar);
4581  m_Nnorm.resize(foobar*tos_Foobar);
4582  m_biomass_factors.resize(foobar*tos_Foobar);
4583  m_fixed.resize(foobar*toof_Foobar);
4584  m_fodder.resize(foobar*toof_Foobar);
4585  m_FUKey.resize(foobar*toof_Foobar);
4586  m_sellingPrice.resize(foobar*toof_Foobar*tos_Foobar);
4587  m_sellingPrice_lastyr.resize(foobar*toof_Foobar*tos_Foobar);
4588  m_rotationMax.resize(foobar*toof_Foobar*tos_Foobar*tofs_Foobar);
4589  m_rotationMin.resize(foobar*toof_Foobar*tos_Foobar*tofs_Foobar);
4590  m_winterMax.resize(toof_Foobar);
4592 
4594  //fill them with -1
4605  }
4606 }
vector< double > m_cropParameters
Vector storing parameters of all crop types.
Definition: farm.h:641
vector< bool > m_fixed
Crop Boolean parameter - fixed/variable crop. Farm type specific.
Definition: farm.h:657
vector< double > m_beta2
Crop parameter for response (growth) function (resp = alfa + beta1*N + beta2*N^2; defines relationshi...
Definition: farm.h:648
vector< int > m_winterMax
Maximal area taken by winter crops at a farm. [%].
Definition: farm.h:632
CfgBool cfg_OptimiseBedriftsmodelCrops("OPTIMISE_BEDRIFTSMODEL_CROPS", CFG_CUSTOM, false)
If set to true, the original farm optimisation model&#39;s crop set is used in the farmer decision making...
bool value(void)
Definition: configurator.h:123
vector< double > m_beta1
Crop parameter for response (growth) function (resp = alfa + beta1*N + beta2*N^2; defines relationshi...
Definition: farm.h:646
vector< bool > m_fodder
Crop Boolean parameter - fodder/non-fodder crop. Farm type specific.
Definition: farm.h:659
vector< double > m_rotationMin
Minimum acreage of a crop at a farm [%]. Farm type, soil type and farm size specific.
Definition: farm.h:671
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:661
vector< double > m_rotationMax
Maximum acreage of a crop at a farm [%]. Farm type, soil type and farm size specific.
Definition: farm.h:669
vector< double > m_biomass_factors
Factor used to determine actual response (yield per ha) based on crop biomass at a harvest...
Definition: farm.h:653
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:650
vector< double > m_livestockParameters
Vector storing parameters of all livestock types.
Definition: farm.h:636
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:666
vector< double > m_alfa
Crop parameter for response (growth) function (resp = alfa + beta1*N + beta2*N^2; defines relationshi...
Definition: farm.h:644
void InitializeVector(vector< double > &vector)
Initializes vector with -1 values.
Definition: farm.cpp:4562
vector< double > m_sellingPrice
Selling price of a crop [DKK/hkg]. Farm type specific and soil type specific.
Definition: farm.h:664

Member Function Documentation

double DataForOptimisation::Get_alfa ( int  i)
inline

Definition at line 541 of file farm.h.

Referenced by OptimisingFarm::findResponse().

541 {return m_alfa[i];};
vector< double > m_alfa
Crop parameter for response (growth) function (resp = alfa + beta1*N + beta2*N^2; defines relationshi...
Definition: farm.h:644
double DataForOptimisation::Get_beta1 ( int  i)
inline

Definition at line 543 of file farm.h.

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

543 {return m_beta1[i];};
vector< double > m_beta1
Crop parameter for response (growth) function (resp = alfa + beta1*N + beta2*N^2; defines relationshi...
Definition: farm.h:646
double DataForOptimisation::Get_beta2 ( int  i)
inline

Definition at line 545 of file farm.h.

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

545 {return m_beta2[i];};
vector< double > m_beta2
Crop parameter for response (growth) function (resp = alfa + beta1*N + beta2*N^2; defines relationshi...
Definition: farm.h:648
double DataForOptimisation::Get_biomass_factor ( int  i)
inline

Definition at line 576 of file farm.h.

Referenced by OptimisingFarm::ActualProfit().

576 { return m_biomass_factors[i];}
vector< double > m_biomass_factors
Factor used to determine actual response (yield per ha) based on crop biomass at a harvest...
Definition: farm.h:653
double DataForOptimisation::Get_cropArea ( int  index)
inline

Definition at line 523 of file farm.h.

Referenced by OptimisingFarm::Initialize().

523 {return m_cropAreas[index];};
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:627
int DataForOptimisation::Get_cropAreasSize ( )
inline

Definition at line 524 of file farm.h.

Referenced by OptimisingFarm::Initialize().

524 {return (int)m_cropAreas.size();};
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:627
double DataForOptimisation::Get_cropParameter ( int  i)
inline

Definition at line 538 of file farm.h.

Referenced by OptimisingFarm::crop_parameter().

538 {return m_cropParameters[i];};
vector< double > m_cropParameters
Vector storing parameters of all crop types.
Definition: farm.h:641
TTypesOfCrops DataForOptimisation::Get_cropTypes ( int  i)
inline

Definition at line 516 of file farm.h.

Referenced by OptimisingFarm::Initialize().

516 {return m_cropTypes[i];};
vector< TTypesOfCrops > m_cropTypes
Crop types saved as enumarator types (Bedriftsmodel i.e. original crop optimization model crop mode)...
Definition: farm.h:618
TTypesOfVegetation DataForOptimisation::Get_cropTypes_almass ( int  i)
inline

Definition at line 579 of file farm.h.

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

579 {return m_cropTypes_almass[i];};
vector< TTypesOfVegetation > m_cropTypes_almass
Crop types saved as enumarator types (ALMaSS crop mode).
Definition: farm.h:623
int DataForOptimisation::Get_cropTypes_almass_size ( )
inline

Definition at line 580 of file farm.h.

Referenced by OptimisingFarm::ActualProfit().

580 {return (int)m_cropTypes_almass.size();};
vector< TTypesOfVegetation > m_cropTypes_almass
Crop types saved as enumarator types (ALMaSS crop mode).
Definition: farm.h:623
string DataForOptimisation::Get_cropTypes_almass_str ( int  i)
inline

Definition at line 582 of file farm.h.

582 {return m_str_cropTypes_almass[i];};
vector< string > m_str_cropTypes_almass
Crop types saved in string format (ALMaSS crop mode).
Definition: farm.h:621
string DataForOptimisation::Get_cropTypes_str ( int  i)
inline

Definition at line 515 of file farm.h.

515 {return m_str_cropTypes[i];};
vector< string > m_str_cropTypes
Crop types saved in string format (Bedriftsmodel i.e. original crop optimization model crop mode)...
Definition: farm.h:616
double DataForOptimisation::Get_emaize_price ( int  i)
inline

Definition at line 588 of file farm.h.

588 {return m_energy_maize_price[i];};
vector< double > m_energy_maize_price
Vector with energy maize prices for each year of simulation.
Definition: farm.h:675
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 4609 of file farm.cpp.

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

4609  {
4610  for(int i=0; i< (int) m_farm_data.size(); i++){
4611  if(m_farm_data[i]->md_almass_no == a_almass_no) return m_farm_data[i] -> md_farmType;
4612  }
4613  g_msg->Warn( WARN_BUG, "almass_no from farms_data doesn't match any of the numbers from farmrefs file", "" );
4614  exit(0);
4615 }
class MapErrorMsg * g_msg
Definition: maperrormsg.cpp:38
void Warn(MapErrorState a_level, std::string a_msg1, std::string a_msg2)
Definition: maperrormsg.cpp:56
vector< FarmData * > m_farm_data
Definition: farm.h:601
bool DataForOptimisation::Get_fixed ( int  i)
inline

Definition at line 554 of file farm.h.

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

554 {return m_fixed[i];};
vector< bool > m_fixed
Crop Boolean parameter - fixed/variable crop. Farm type specific.
Definition: farm.h:657
bool DataForOptimisation::Get_fodder ( int  i)
inline
double DataForOptimisation::Get_FUKey ( int  i)
inline
int DataForOptimisation::Get_livestockNumber ( int  index)
inline

Definition at line 521 of file farm.h.

Referenced by OptimisingFarm::Initialize().

521 {return m_livestockNumbers[index];};
vector< int > m_livestockNumbers
Vector containing numbers of all livestock types at farms included in the simulation.
Definition: farm.h:629
int DataForOptimisation::Get_livestockNumbersSize ( )
inline

Definition at line 522 of file farm.h.

Referenced by OptimisingFarm::Initialize().

522 {return (int)m_livestockNumbers.size();};
vector< int > m_livestockNumbers
Vector containing numbers of all livestock types at farms included in the simulation.
Definition: farm.h:629
double DataForOptimisation::Get_livestockParameter ( int  i)
inline

Definition at line 534 of file farm.h.

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

534 {return m_livestockParameters[i];};
vector< double > m_livestockParameters
Vector storing parameters of all livestock types.
Definition: farm.h:636
TTypesOfAnimals DataForOptimisation::Get_livestockTypes ( int  i)
inline

Definition at line 514 of file farm.h.

Referenced by OptimisingFarm::Initialize().

514 {return m_livestockTypes[i];};
vector< TTypesOfAnimals > m_livestockTypes
Livestock types saved as enumarator types.
Definition: farm.h:625
double DataForOptimisation::Get_Nnorm ( int  i)
inline

Definition at line 547 of file farm.h.

Referenced by OptimisingFarm::findFertilizer().

547 {return m_Nnorm[i];};
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:650
int DataForOptimisation::Get_noCrops ( )
inline

Definition at line 585 of file farm.h.

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

585 {return m_noCrops;};
int m_noCrops
Number of crops used in the simulation.
Definition: farm.h:609
double DataForOptimisation::Get_rotationMax ( int  i)
inline

Definition at line 569 of file farm.h.

Referenced by OptimisingFarm::Initialize().

569 {return m_rotationMax[i];};
vector< double > m_rotationMax
Maximum acreage of a crop at a farm [%]. Farm type, soil type and farm size specific.
Definition: farm.h:669
double DataForOptimisation::Get_rotationMin ( int  i)
inline

Definition at line 571 of file farm.h.

Referenced by OptimisingFarm::Initialize().

571 {return m_rotationMin[i];};
vector< double > m_rotationMin
Minimum acreage of a crop at a farm [%]. Farm type, soil type and farm size specific.
Definition: farm.h:671
double DataForOptimisation::Get_sellingPrice ( int  i)
inline

Definition at line 564 of file farm.h.

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

564 {return m_sellingPrice[i];};
vector< double > m_sellingPrice
Selling price of a crop [DKK/hkg]. Farm type specific and soil type specific.
Definition: farm.h:664
double DataForOptimisation::Get_sellingPrice_lastyr ( int  i)
inline

Definition at line 566 of file farm.h.

Referenced by OptimisingFarm::ActualProfit().

566 {return m_sellingPrice_lastyr[i];};
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:666
int DataForOptimisation::Get_winterMax ( int  i)
inline

Definition at line 530 of file farm.h.

Referenced by OptimisingPigFarm::check_WRape_WBarley(), AnimalFarm::checkWinterCrops(), and NonAnimalFarm::checkWinterCrops().

530 {return m_winterMax[i];};
vector< int > m_winterMax
Maximal area taken by winter crops at a farm. [%].
Definition: farm.h:632
void DataForOptimisation::InitializeVector ( vector< double > &  vector)
protected

Initializes vector with -1 values.

Definition at line 4562 of file farm.cpp.

4562  {
4563 
4564  for(int i=0; i<(int)vector.size(); i++){
4565  vector[i] = -1;
4566  }
4567 }
void DataForOptimisation::Set_alfa ( double  a_value,
int  i 
)
inline

Definition at line 540 of file farm.h.

540 {m_alfa[i]=a_value;};
vector< double > m_alfa
Crop parameter for response (growth) function (resp = alfa + beta1*N + beta2*N^2; defines relationshi...
Definition: farm.h:644
void DataForOptimisation::Set_beta1 ( double  a_value,
int  i 
)
inline

Definition at line 542 of file farm.h.

542 {m_beta1[i]=a_value;};
vector< double > m_beta1
Crop parameter for response (growth) function (resp = alfa + beta1*N + beta2*N^2; defines relationshi...
Definition: farm.h:646
void DataForOptimisation::Set_beta2 ( double  a_value,
int  i 
)
inline

Definition at line 544 of file farm.h.

544 {m_beta2[i]=a_value;};
vector< double > m_beta2
Crop parameter for response (growth) function (resp = alfa + beta1*N + beta2*N^2; defines relationshi...
Definition: farm.h:648
void DataForOptimisation::Set_biomass_factor ( double  a_value,
int  i 
)
inline

Definition at line 575 of file farm.h.

575 {m_biomass_factors[i] = a_value;};
vector< double > m_biomass_factors
Factor used to determine actual response (yield per ha) based on crop biomass at a harvest...
Definition: farm.h:653
void DataForOptimisation::Set_cropArea ( double  a_area)
inline

Definition at line 520 of file farm.h.

520 {m_cropAreas.push_back(a_area);};
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:627
void DataForOptimisation::Set_cropParameter ( double  a_value,
int  i 
)
inline

Definition at line 537 of file farm.h.

537 {m_cropParameters[i]=a_value;};
vector< double > m_cropParameters
Vector storing parameters of all crop types.
Definition: farm.h:641
void DataForOptimisation::Set_cropTypes ( TTypesOfCrops  crop_type)
inline

Definition at line 512 of file farm.h.

512 {m_cropTypes.push_back(crop_type);};
vector< TTypesOfCrops > m_cropTypes
Crop types saved as enumarator types (Bedriftsmodel i.e. original crop optimization model crop mode)...
Definition: farm.h:618
void DataForOptimisation::Set_cropTypes_almass ( TTypesOfVegetation  crop_type)
inline

Definition at line 578 of file farm.h.

578 {m_cropTypes_almass.push_back(crop_type);};
vector< TTypesOfVegetation > m_cropTypes_almass
Crop types saved as enumarator types (ALMaSS crop mode).
Definition: farm.h:623
void DataForOptimisation::Set_cropTypes_almass_str ( string  crop_type)
inline

Definition at line 581 of file farm.h.

581 {m_str_cropTypes_almass.push_back(crop_type);};
vector< string > m_str_cropTypes_almass
Crop types saved in string format (ALMaSS crop mode).
Definition: farm.h:621
void DataForOptimisation::Set_cropTypes_str ( string  crop_type)
inline

Definition at line 513 of file farm.h.

513 {m_str_cropTypes.push_back(crop_type);};
vector< string > m_str_cropTypes
Crop types saved in string format (Bedriftsmodel i.e. original crop optimization model crop mode)...
Definition: farm.h:616
void DataForOptimisation::Set_emaize_price ( double  a_value)
inline

Definition at line 587 of file farm.h.

587 {m_energy_maize_price.push_back(a_value);};
vector< double > m_energy_maize_price
Vector with energy maize prices for each year of simulation.
Definition: farm.h:675
void DataForOptimisation::Set_fixed ( string  a_value,
int  i 
)
inline

Definition at line 550 of file farm.h.

550  {
551  if(a_value=="yes" || a_value=="YES" || a_value=="Yes" || a_value=="1"){m_fixed[i]=true;}
552  else {m_fixed[i]=false;}
553  };
vector< bool > m_fixed
Crop Boolean parameter - fixed/variable crop. Farm type specific.
Definition: farm.h:657
void DataForOptimisation::Set_fodder ( string  a_value,
int  i 
)
inline

Definition at line 555 of file farm.h.

555  {
556  if(a_value=="yes" || a_value=="YES" || a_value=="Yes" || a_value=="1"){m_fodder[i]=true;}
557  else {m_fodder[i]=false;}
558  };
vector< bool > m_fodder
Crop Boolean parameter - fodder/non-fodder crop. Farm type specific.
Definition: farm.h:659
void DataForOptimisation::Set_FUKey ( double  a_value,
int  i 
)
inline

Definition at line 560 of file farm.h.

560 {m_FUKey[i]=a_value;};
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:661
void DataForOptimisation::Set_livestockNumber ( int  a_number)
inline

Definition at line 519 of file farm.h.

519 {m_livestockNumbers.push_back(a_number);};
vector< int > m_livestockNumbers
Vector containing numbers of all livestock types at farms included in the simulation.
Definition: farm.h:629
void DataForOptimisation::Set_livestockParameter ( double  a_value,
int  i 
)
inline

Definition at line 533 of file farm.h.

533 {m_livestockParameters[i]=a_value;};
vector< double > m_livestockParameters
Vector storing parameters of all livestock types.
Definition: farm.h:636
void DataForOptimisation::Set_livestockTypes ( TTypesOfAnimals  livestock_type)
inline

Definition at line 511 of file farm.h.

511 {m_livestockTypes.push_back(livestock_type);};
vector< TTypesOfAnimals > m_livestockTypes
Livestock types saved as enumarator types.
Definition: farm.h:625
void DataForOptimisation::Set_Nnorm ( double  a_value,
int  i 
)
inline

Definition at line 546 of file farm.h.

546 {m_Nnorm[i]=a_value;};
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:650
void DataForOptimisation::Set_noCrops ( int  no)
inline

Definition at line 584 of file farm.h.

584 {m_noCrops = no;};
int m_noCrops
Number of crops used in the simulation.
Definition: farm.h:609
void DataForOptimisation::Set_rotationMax ( double  a_value,
int  i 
)
inline

Definition at line 568 of file farm.h.

568 {m_rotationMax[i]=a_value;};
vector< double > m_rotationMax
Maximum acreage of a crop at a farm [%]. Farm type, soil type and farm size specific.
Definition: farm.h:669
void DataForOptimisation::Set_rotationMin ( double  a_value,
int  i 
)
inline

Definition at line 570 of file farm.h.

570 {m_rotationMin[i]=a_value;};
vector< double > m_rotationMin
Minimum acreage of a crop at a farm [%]. Farm type, soil type and farm size specific.
Definition: farm.h:671
void DataForOptimisation::Set_sellingPrice ( double  a_value,
int  i 
)
inline

Definition at line 563 of file farm.h.

563 {m_sellingPrice[i]=a_value;};
vector< double > m_sellingPrice
Selling price of a crop [DKK/hkg]. Farm type specific and soil type specific.
Definition: farm.h:664
void DataForOptimisation::Set_sellingPrice_lastyr ( double  a_value,
int  i 
)
inline

Definition at line 565 of file farm.h.

565 {m_sellingPrice_lastyr[i]=a_value;};
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:666
void DataForOptimisation::Set_winterMax ( int  a_value,
int  i 
)
inline

Definition at line 529 of file farm.h.

529 {m_winterMax[i]=a_value;};
vector< int > m_winterMax
Maximal area taken by winter crops at a farm. [%].
Definition: farm.h:632

Member Data Documentation

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 644 of file farm.h.

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 646 of file farm.h.

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 648 of file farm.h.

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 653 of file farm.h.

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 627 of file farm.h.

vector<double> DataForOptimisation::m_cropParameters
protected

Vector storing parameters of all crop types.

Definition at line 641 of file farm.h.

vector<TTypesOfCrops> DataForOptimisation::m_cropTypes
protected

Crop types saved as enumarator types (Bedriftsmodel i.e. original crop optimization model crop mode).

Definition at line 618 of file farm.h.

vector<TTypesOfVegetation> DataForOptimisation::m_cropTypes_almass
protected

Crop types saved as enumarator types (ALMaSS crop mode).

Definition at line 623 of file farm.h.

vector<double> DataForOptimisation::m_energy_maize_price
protected

Vector with energy maize prices for each year of simulation.

Definition at line 675 of file farm.h.

vector<FarmData*> DataForOptimisation::m_farm_data

Definition at line 601 of file farm.h.

Referenced by OptimisingFarm::Initialize().

vector<bool> DataForOptimisation::m_fixed
protected

Crop Boolean parameter - fixed/variable crop. Farm type specific.

Definition at line 657 of file farm.h.

vector<bool> DataForOptimisation::m_fodder
protected

Crop Boolean parameter - fodder/non-fodder crop. Farm type specific.

Definition at line 659 of file farm.h.

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 661 of file farm.h.

vector<int> DataForOptimisation::m_livestockNumbers
protected

Vector containing numbers of all livestock types at farms included in the simulation.

Definition at line 629 of file farm.h.

vector<double> DataForOptimisation::m_livestockParameters
protected

Vector storing parameters of all livestock types.

Definition at line 636 of file farm.h.

vector<TTypesOfAnimals> DataForOptimisation::m_livestockTypes
protected

Livestock types saved as enumarator types.

Definition at line 625 of file farm.h.

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 650 of file farm.h.

int DataForOptimisation::m_noCrops
protected

Number of crops used in the simulation.

Definition at line 609 of file farm.h.

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 669 of file farm.h.

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 671 of file farm.h.

vector<double> DataForOptimisation::m_sellingPrice
protected

Selling price of a crop [DKK/hkg]. Farm type specific and soil type specific.

Definition at line 664 of file farm.h.

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 666 of file farm.h.

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 616 of file farm.h.

vector<string> DataForOptimisation::m_str_cropTypes_almass
protected

Crop types saved in string format (ALMaSS crop mode).

Definition at line 621 of file farm.h.

vector<int> DataForOptimisation::m_winterMax
protected

Maximal area taken by winter crops at a farm. [%].

Definition at line 632 of file farm.h.


The documentation for this class was generated from the following files: