-
I am part of a group that has been using MIKE-URBAN 2020 with MOUSE to run a rather large, complex model with user-written controls. We are trying to migrate to MIKE+ 2021 with MIKE-1D. I’ve been attempting to convert our user-written controls from a dll that interacted with MOUSE_hd.dll to a python script that interacts with the various MIKE1D dlls. I am using the controller factory approach detailed in the MIKE Engine SDK MIKE 1D API section of https://docs.mikepoweredbydhi.com/engine_libraries/mike1d/mike1d_api/, more specifically corresponding to https://github.com/DHI/mike1d-sdk-examples/blob/master/DHI.Mike1D.Examples/RunExamples.cs with With MOUSE_hd.dll, we used
Does any one have an example (with a similar level of simplicity) of how that would be done? If that's not the right approach, is there an example (with a similar level of simplicity) of the appropriate method for doing this? I think the closest example in this repo to what I'm looking for is the HonmaCoefficients.cs, but I think it is setting a property of the weir rather than a state or flux variable value. When I set Thanks in advance for any thoughts on this topic. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
It is not possible to set structure values through the proxy system. That only goes for the HD part. For structures it is necessary to find the specific structure, looping like in StructureScripts.cs and searching
Then for each structure, the approach for controlling the structure is different. Pumps:
If you want the pump to take acceleration and deceleration speeds into account, things becomes slighly more complicated:
The pump must not be controlled by other RTC rules, because they will have precedense. Weir:
Again, if taking gate speed into account
And it works similarly for an
and if taking gate speed into account
Remember that build in RTC rules must be disabled, otherwise they will take over. |
Beta Was this translation helpful? Give feedback.
It is not possible to set structure values through the proxy system. That only goes for the HD part.
For structures it is necessary to find the specific structure, looping like in StructureScripts.cs and searching
Then for each structure, the approach for controlling the structure is different.
Pumps:
The easiest is to control pump with "constant" flow, by modifying the constant flow at regular intervals: