AgroEcoSim
Pre-releaseThis is the first release of the simulation and rendering. It targets creation and testing of the interface towards the machine learning component. Since the plants grow only small so far, there will be almost no shadowing.
How it works
A server listens on port 7215
for HTTP requests, runs simulations and returns the results.
Prerequisites
Usage
- Extract the archive files
- Run
sh deployDocker
(on windows you need to load the images manually) before starting the first time - Then, each time you want to start the simulation server just run
docker-compose up
ordocker compose up
(depending on the engine version) in the folder where you extracted the files.
API
Once the server is up and running, navigate your browser to explore the API to http://localhost:7215/swagger/index.html
A new simulation is started by a POST
request to http://localhost:7215/Simulation
. Please be patient, CPU irradiance rendering is really slow. To simulate 3 plants for one month, it takes 70 seconds
on a recent AMD Ryzen 9. Better keep the number of plants and time steps low. Here is an example of a configuration json sent in the POST
request:
{
"TicksPerHour": 1,
"TotalHours": 744,
"FieldResolution": 0.5,
"FieldSize": { "X": 10, "D": 4, "Z": 10 },
"Plants": [
{ "P": {"X": 2.5, "Y": -0.05, "Z": 5}},
{ "P": {"X": 5, "Y": -0.05, "Z": 5}},
{ "P": {"X": 7.5, "Y": -0.05, "Z": 5}}
]
}
The result is an array of plant volumes (in m³) at simulation end. The ordering is the same as in the input:
{
"plants": [
{ "V": 0.0017850252 },
{ "V": 0.0015580055 },
{ "V": 0.0016916988 }
]
}