Run multiple crops - first work on engine#124
Conversation
SarahAlidoost
left a comment
There was a problem hiding this comment.
@fnattino thanks! 👍 it looks good. I left two comments. The main one is to test the multiple crops with the test data. Since models can support vectors, we can pass two different crops to one model. I suggest using phenology model. If this needs too much changes, it can be implemented in a different PR.
|
Thanks for having a look @SarahAlidoost! Concerning the new test on multiple crops, I think it would be easier to implement it when other pieces of the engine will be there (e.g. the weather provider with support for tensors), because the two crops will need different weather data as well (working on #131) |
|
Thanks. Then feel free to merge this one. |



Addressing first few points of the work on engine in #60 (comment), in particular:
The crop instance is now created when the engine is setup and kept alive for the full length of the simulation.
One can now use a plain dictionary as parameter provider. Note that a dict-like access is now expected for the parameter provider, which is currently not supported by PCSE. A PR should fix this (ajwdewit/pcse#121), until that moment I have added a temporary implementation here.
We can actually already run an almost empty agromanagement, only start date and end date are necessarily extracted from it. So an agromanagement like the following works for now:
[{datetime.date(2010, 4, 16): None}, {datetime.date(2010, 12, 31): None}]. We should probably improve the interface a bit, and maybe we could consider making the agromanagement optional if start date and end date are provided as separate input arguments. Also this, should be improved as a separate PR.What is definitely missing here and should be implemented as a separate PR is the tensor-based weather data provider.