Skip to content

MIKE1D SDK stepping through simulation and setting new values #18

Answered by JesperGr
lizaclark asked this question in Q&A
Discussion options

You must be logged in to vote

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

      foreach (IStructure structure in mike1DData.Network.StructureCollection.Structures)
      {
        if (structure.ID == "someId")
        {
          [Do stuff]

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:

      IStructure structure = [...];
      IPump pump = structure as IPump;
      // Every timestep, or when necessary to…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by JesperGr
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants