Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Making SimpleCrop PyMT compatibible #4

Open
cpritcha opened this issue Jul 23, 2020 · 0 comments
Open

Making SimpleCrop PyMT compatibible #4

cpritcha opened this issue Jul 23, 2020 · 0 comments

Comments

@cpritcha
Copy link
Collaborator

cpritcha commented Jul 23, 2020

In the Main.f03 of simplecrop you can see that models mutate state used by other models in the rate and integ phases. This makes adopting PyMTs single update method and getter/setter interface more difficult because each model wants to change each others state part way through their respective update methods (assuming that the rate and integ methods are inside the update method). We could get around this by more closing the following a Moore machine model (add a separate output method or using getters at the beginning of the step) instead of just an update method (the Mealy machine model). Following a Moore machine model would result in a slightly different simulation but it would also ensure that each component is receiving messages from its current time slice.

Since SimpleCrop has a CLI it would benefit from some multi-step optimizations from coupled models where the model relationships form a DAG (if the coupled model is a DAG then data across all time-steps to the SimpleCrop model at once). Should be as easy as providing support for giving a years worth of irrigation and weather data to the model.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant