A method of controlling an environmental maintenance system that includes a plurality of actuators and a plurality of sensors, each sensor measuring a value of a physical condition of an environment, the method comprising: receiving sensor values S corresponding to the sensors; determining a potential change dU to operation levels U of the actuators; calculating, with a computer system, a first contribution to a penalty function by: applying a transfer model to dU to determine a predicted change dS in the sensor values S, the transfer model providing a relation between changing an operation level of an actuator and resulting changes in sensor values; determining new sensor values S New from the predicted change dS; using S New to determine the first contribution to the penalty function, the first contribution being based on a relationship of each new sensor value relative to one or more respective setpoint values; calculating, with the computer system, a second contribution to the penalty function by: determining new operation levels U new corresponding to the potential change dU to the operation levels U; for each new operation level, determining a cost of operating the corresponding actuator with the new operation level; aggregating the costs to obtain the second contribution; determining a first value of the penalty function based on the first and second contributions for the potential change dU; determining an optimal change to the operation levels U of the actuators based on values of the penalty functions for a plurality of potential changes to the operation levels U; determining an accuracy of the transfer model by comparing predicted sensor value with measured sensor values, setting the operation levels of the actuators based on the optimal change, wherein the setting includes: adjusting the optimal change based on the accuracy of the transfer model. receiving sensor values S corresponding to the sensors; determining a potential change dU to operation levels U of the actuators; calculating, with a computer system, a first contribution to a penalty function by: applying a transfer model to dU to determine a predicted change dS in the sensor values S, the transfer model providing a relation between changing an operation level of an actuator and resulting changes in sensor values; determining new sensor values S New from the predicted change dS; using S New to determine the first contribution to the penalty function, the first contribution being based on a relationship of each new sensor value relative to one or more respective setpoint values; applying a transfer model to dU to determine a predicted change dS in the sensor values S, the transfer model providing a relation between changing an operation level of an actuator and resulting changes in sensor values; determining new sensor values S New from the predicted change dS; using S New to determine the first contribution to the penalty function, the first contribution being based on a relationship of each new sensor value relative to one or more respective setpoint values; calculating, with the computer system, a second contribution to the penalty function by: determining new operation levels U new corresponding to the potential change dU to the operation levels U; for each new operation level, determining a cost of operating the corresponding actuator with the new operation level; aggregating the costs to obtain the second contribution; determining new operation levels U new corresponding to the potential change dU to the operation levels U; for each new operation level, determining a cost of operating the corresponding actuator with the new operation level; aggregating the costs to obtain the second contribution; determining a first value of the penalty function based on the first and second contributions for the potential change dU; determining an optimal change to the operation levels U of the actuators based on values of the penalty functions for a plurality of potential changes to the operation levels U; determining an accuracy of the transfer model by comparing predicted sensor value with measured sensor values, setting the operation levels of the actuators based on the optimal change, wherein the setting includes: adjusting the optimal change based on the accuracy of the transfer model.