Optimizing Thermal Chemical and Environmental Systems