skip to main content
Rulebased Simulation
Hypothetical Simulation
A new palette function called HypotheticalSimulation is available on the Rule Palette. This function accepts a lists of user input values and then simulates a portion of the model, defined in a subbasin, without setting slots or having any other effects on the actual model. The function returns a list of NUMERICs, which are the output slots from the hypothetical simulation. The user defines the list of the slot values that are returned from the function. This function is useful in a rule where the user needs to see the downstream affects of a reservoir release, for example, without actually setting the release and waiting for RiverWare to simulate. The hypothetical simulation takes place during the execution of the rule that calls this function, so decisions can be made based on the returned results. If the model has lagged reaches, the user is able to access the downstream affects of a release as well as the future affects of a release. The hypothetical simulation portion of the function exactly replicates the actual simulation that would take place in RiverWare if the input values, specified by the user, were actually set.
The HypotheticalSimulation function takes three arguments. The first argument is a STRING which specifies the subbasin to simulate. Only those objects that are in the subbasin are hypothetically simulated. The second argument is a LIST of LISTS. Each list includes the slot, value, and timestep that the user want to us as input to the hypothetical simulation. Any values that already exist on the objects will also be used. The third argument is also a LIST of LISTS. Each list includes the slot and the date for all required return values. The function returns a LIST of the values for the specified slots at the specified times. Details on the use of this function and the syntax involved are available in the Rulebased Simulation documentation online.
Revised: 12/06/2024