Optimization and control techniques for cyber-physical systems: a new paradigm