Currently I have these code:
Sub dt() ' calculate dwell time, peak hour=1, non-peak=0
If peaktime = 1 Then
dwelltime = 30 + 30 * Rnd
Else: dwelltime = 20 + 20 * Rnd
End If
End Sub
However, for each time the value of 'dwelltime' is the same (34.011) How can I randomize this value?
Quote:
Sub dt() ' calculate dwell time, peak hour=1, non-peak=0
If peaktime = 1 Then
dwelltime = 30 + 30 * Rnd
Else: dwelltime = 20 + 20 * Rnd
End If
End Sub