The generalized network approach to optimized decision making and planning