Neural network based optimal control of HVAC&R systems