Stochastic Activity Networks: Structure, Behavior, and Application