'Simulate time series of state transitions, where the states are
annotated with their values (if `state_values` is not None).
Parameters
ts_length : scalar(int)
Length of each simulation.
init : scalar or array_like, optional(default=None)
Initial state values(s). If None, the initial state is
randomly drawn.
num_reps : scalar(int), optional(default=None)
Number of repetitions of simulation.
random_state : int or np.random.RandomState, optional
Random seed (integer) or np.random.RandomState instance to
set the initial state of the random number generator for
reproducibility. If None, a randomly initialized RandomState
is used.
Returns
X : ndarray(ndim=1 or 2)
Array containing the state values of the sample path(s). See
the `simulate` method for more information.'

def simulate(self, ts_length, init=None, num_reps=None, random_state=None):

    if (init is not None):
        init_idx = self.get_index(init)
    else:
        init_idx = None
    X = self.simulate_indices(ts_length, init=init_idx, num_reps=num_reps, random_state=random_state)
    if (self.state_values is not None):
        X = self.state_values[X]
    return X
