An apparatus for minimizing power consumption in a cooling system comprising: one or more processors; one or more sensors (120, 130, 1306), coupled to the one or more processors, associated with one or more regulated environments and one or more chillers (1302-1, 1302-2, 1302-N) that regulate temperature of the one or more regulated environments; and a storage device, coupled to the one or more processors, storing instructions that when executed by the one or more processors performs a method comprising: gathering readings from the one or more sensors (120, 130, 1306); determining a cost and power consumption associated with setting values for a plurality of control variables associated with the one or more chillers (1302-1, 1302-2, 1302-N); selecting values for the control variables with a minimum cost as optimized control variable values, wherein selecting values comprises: fitting a plurality of historically recorded values for the plurality of control variables to a function for cost minimization; computing a rank of a predictor matrix used in the function for cost minimization; and selecting a value of a control variable that will improve rank of the predictor matrix when the predictor matrix is rank-deficient due to insufficient sampling; and applying the optimized control variable values to the plurality of control variables to minimize power consumption of the cooling system. one or more processors; one or more sensors (120, 130, 1306), coupled to the one or more processors, associated with one or more regulated environments and one or more chillers (1302-1, 1302-2, 1302-N) that regulate temperature of the one or more regulated environments; and a storage device, coupled to the one or more processors, storing instructions that when executed by the one or more processors performs a method comprising: gathering readings from the one or more sensors (120, 130, 1306); determining a cost and power consumption associated with setting values for a plurality of control variables associated with the one or more chillers (1302-1, 1302-2, 1302-N); selecting values for the control variables with a minimum cost as optimized control variable values, wherein selecting values comprises: fitting a plurality of historically recorded values for the plurality of control variables to a function for cost minimization; computing a rank of a predictor matrix used in the function for cost minimization; and selecting a value of a control variable that will improve rank of the predictor matrix when the predictor matrix is rank-deficient due to insufficient sampling; and applying the optimized control variable values to the plurality of control variables to minimize power consumption of the cooling system. gathering readings from the one or more sensors (120, 130, 1306); determining a cost and power consumption associated with setting values for a plurality of control variables associated with the one or more chillers (1302-1, 1302-2, 1302-N); selecting values for the control variables with a minimum cost as optimized control variable values, wherein selecting values comprises: fitting a plurality of historically recorded values for the plurality of control variables to a function for cost minimization; computing a rank of a predictor matrix used in the function for cost minimization; and selecting a value of a control variable that will improve rank of the predictor matrix when the predictor matrix is rank-deficient due to insufficient sampling; and applying the optimized control variable values to the plurality of control variables to minimize power consumption of the cooling system. fitting a plurality of historically recorded values for the plurality of control variables to a function for cost minimization; computing a rank of a predictor matrix used in the function for cost minimization; and selecting a value of a control variable that will improve rank of the predictor matrix when the predictor matrix is rank-deficient due to insufficient sampling; and applying the optimized control variable values to the plurality of control variables to minimize power consumption of the cooling system.