It depends on what you are trying to do:
1) if you are using symbolic simulator and/or symbolic queries like A[], E<> etc, then the `select` statement as cited in stackoverflow post is the only valid solution (the next options won't work). The reason is that such "randomness" is actually non-determinism in disguise, and hence must be models as such.
I know it is inconvenient with many values, but such behavior quickly results in a state space explosion and hence discouraged. With many values it is better to try harder and find a better abstraction.
3) if you want to combine controller synthesis (timed games) with SMC or learning (optimization), then the only way is through `hybrid clock` variables, which can be used to store information about cost. Such cost variables cannot be read (used in guards etc) and they are abstracted away (i.e. ignored) in symbolic queries, thus does not seem to fit your scenario.
Best regards,
Marius