Created by Julien Pireaud
This file is to guide you through compile VarroaPop simulator on Linux / macOS
Run setup.py to prepare the Linux folder to be ready to build
For C++ dependency management we use Hunter package manager.
To compile in release:
- create a directory FOO
- move in FOO directory
- execute
python ../setup.py
to generate appropriate CMakeLists.txt file for datamodel - prepare cmake folder
cmake -DCMAKE_BUILD_TYPE=Release ..
- cd to parent of FOO directory
- call
cmake --build FOO --target VarroaPop -- -j <number of threads>
- call program
./FOO/VarroaPop -h
To time an execution you can use:
- On Linux:
time ./<build>/VarroaPop -d VarroaPop/files/ -v exe/default.vrp -o output/vp_output_linux.txt -i input/vp_linux.txt -f
- On Windows (PowerShell):
Measure-Command {start-process Release\VarroaPop.exe -argumentlist "exe\default.vrp /b /or output\vp_output_win.txt /i input\vp_input.txt" -wait}
The options that we keep for now are:
-f
to force overwriting existing files-v simplified.vrp
minimal VRP file-i rcp85-input.txt
--binaryWeatherFileFormat Rcp85
specifies the binary format of the weather file Observed|Modeled|Rcp85|Rcp45-w data_46.03125_-118.34375
weather file-o output.txt
output file--forageDayNoTemp --hourlyTemperaturesEstimation --adultsAgingBasedOnForageInc --adultsAgingBasedOnLaidEggs --applyLifespanReduction=false --inOutEvents
options to properly run the simulations with the selected aging model
run-simulations.py
will run simulations for omak, wenatchee, walla-walla with historical and future weather simulations. Make sure the path to executable in the script is correct.scripts/plots.py
sample script which aim to automate plots generation, this is out of date but is a good source of inspirationscripts/simulations.py
sample script to call VarroaPop simulations with different sets of options
- ObservedHistorical (1/1/1979 - 12/31/2016)
- ModeledHistorical (1/1/1950 - 12/31/2005)
- Rcp85 starting (1/1/2006 - 12/31/2099)
- Rcp45 starting (1/1/2006 - 12/31/2099)
- Adult
- Changed current age from being an Integer to a Float number. Currently the m_CurrentAge attribute is not used, but it would be useful if we want to use it and age Adults with a portion of a day;
- Added missing attributes initialisation in constructors.
- Bee
- Added missing attributes initialisation in constructor.
- Colony
- Added a CAdultList::Add method to be able to add new Adults to the first box card without making other Adults age;
- Added InOutEvent structure to add addtional output data on what's moved from one aging structure to the other;
- Changed Foragers aging structure with
--foragerAgingBasedOnHourlyTemperatureEstimate
. - Changed Adult aging structure with
--adultsAgingBasedOnLaidEggs
option.
- Queen
- Extracted L daylight hours based component of the egg laying equation in CQueen::ComputeL method.
- VarroaPopSession
- Enhanced output formating by extracting parameter specification and adding delimiter afterwards.
- WeatherEvents
- Added ability to load binary data from WSU grid weather data;
- Added a common utility function UpdateForageAttributeForEvent to set m_ForageDay and m_ForageInc with the same logic for all types of input weather data;
- Added functionnality to CEvent GetTemp, GetMaxTemp, GetMinTemp, IsForageDay and GetForageInc methods to behave correctly in the case we activated the CColdStorageSimulator;
- Fixed bad interpretation of Rainfall and Windspeed for WSU grid weather files;
- Made Windspeed and Rainfall threasholds customizable.
- GlobalOptions
- Singleton object used to set global parameters used to control behavior of simulation.
- ColdStorageSimulator
- Singleton object used to simulate cold storage.
- WeatherGridData
- Class used to load different WSU weather grid data files.
- Walla Walla: 46.03125,-118.34375
- Richland: 46.28125, -119.34375
- Wenatchee: 47.40625, -120.34375
- Omak: 48.40625, -119.53125
- Refactor to remove dependency on port code to make the VarroaPop library solely based on standard library (using Poco libraries as a base framework)
- Enhance Binary serialization feedback to reject invalid files (check if eof is reached in >> operators)
- Introduce endianess support to the binary serialization
- Add a logger to have several logging levels INFO/WARNING/ERROR so that it can be easily disabled