Adding new components and turning them on/off?




  • Official comment
    Rick Kossik


    You have the right idea. Doing what you describe will require two things: 

    1) First, put the parts of the model that may or may not be turned off in a conditional Container.  Use a Data element (defined as a Condition, and named something like Model_Wetland") to turn it on or off at the beginning of the simulation.  

    2) That conditional Container will still have outputs.  If it is turned off, you obviously do not want to use them (they will output their initial value since by definition the elements in the conditional Container will not have been updated at all during the simulation).  Hence, you then use an If statement (or Selector) utilizing the same Data element to deal with those outputs appropriately (e.g., set to zero, or reference some other output).

    And of course, the Data element can be set to True or False when defining scenarios.

    Comment actions Permalink
  • Avatar
    Charles Ikenberry

    Thanks, Rick.  That makes sense.  The trick may be keeping the components I don't want turned off out of the conditional Container.  In other words, making sure elements that reflect or calculate a flux in or out of the wetland must be outside the conditional "wetland" Container so the pathways I'm simulating are not affected.  As is nearly always the case with models, it's seeing the end from the beginning and organizing accordingly from the outset.  Easy to say, tougher to do.  Thanks again!

    Comment actions Permalink

Please sign in to leave a comment.