systems modelling dynamic programming