HasFlag

This function returns whether the specified slot on the given timestep has the specified flag.

Description

Use to test the flag status of a slot at a given datetime.

Type

BOOLEAN

Arguments

Type

Meaning

1

SLOT

The slot to test

2

DATETIME

The datetime at which to test

3

STRING

The flag to test. The flag is specified by string, which can be the single letter version of the flag or the full flag name:

O Output B Best Efficiency

I Input M Maximum Capacity

R Rules S Surcharge Release

i Iterative MRM G Regulation Discharge

Z DMI Input D Drift

U Unit Values m Method

T Target A Account

TB Target-Begin P Propagated

tb Target-Begin-RiverWare

Evaluation

The function returns whether or not the slot has the flag at that date.

If the slot does not have a value at the date then the function returns that an invalid value was found (which will cause the calling block to terminate early).

Comments

An error is returned if the slot is not a Series Slot or if the date is not a legal timestep for that slot.

See also the IsInput function, See IsInput which is a more limited function used to test for the “I” or “Z” flag. Note, unlike this function, it returns FALSE when the slot does not have a value.

 
HasFlag($”Mead.Outflow”, @”24:00 December 31, 1999", “R”)
HasFlag($”Powell.Storage”, @”24:00 March 31, 2006", “Target”)
 
TRUE or FALSE