Conditions in MDF #382
Replies: 3 comments 1 reply
-
@Monsurat-Onabajo Can you paste the relevant sections of the code here? @kmantel Any thoughts on this? |
Beta Was this translation helpful? Give feedback.
-
Thank you @pgleeson This is the condition i was trying to use in the graph i created And below it is the output i got, i expected numbers but i was getting 'None' |
Beta Was this translation helpful? Give feedback.
-
It's a bit difficult to tell without the model and code, but using AtEnvironmentStateUpdateStart as a termination condition for EnvironmentStateUpdate should terminate immediately, before running anything, which could explain the None values. As for AtEnvironmentStateUpdateNStart not terminating when also used as the EnvironmentStateUpdate termination condition, a hint could be the fact that a call to scheduler.run is the scope of a EnvironmentStateUpdate. This means that unless a batch of runs are being called, the value of the current EnvironmentStateUpdate should be 0, in which case any non-default value for n (for n != 0), this condition may never be reached. I think these sections of the scheduler docs might be helpful here, especially Time: https://kmantel.github.io/graph-scheduler/Time.html if it's still not clear, feedback on the docs is of course welcome, but looking at some test examples using these conditions might also be helpful: https://github.com/kmantel/graph-scheduler/blob/2f4d8764b7e0311e85c405515ab7d2bb9255f6a0/tests/scheduling/test_condition.py#L576 |
Beta Was this translation helpful? Give feedback.
-
Hello,
I was trying to create a condition in MDF using the Convenience condition 'AtEnvironmentStateUpdateStart' it ran when i evaluated it but when i checked the results of each nodes, i kept on getting None. When i changed the condition to 'AtEnvironmentStateUpdateNStart', it ran for hours and it didn't stop running until i canceled it. Is it that MDF doesn't support the convenience condition category or i am missing something?
Beta Was this translation helpful? Give feedback.
All reactions