Modeling Control and Optimization of Complex Systems