1. A computer-implemented method for improving a lithographic process for imaging a portion of a design layout onto a substrate using a lithographic projection apparatus, the method comprising: defining a multi-variable cost function, the multi-variable cost function being a function of a stochastic effect of the lithographic process, the stochastic effect being a function of a plurality of design variables that are characteristics of the lithographic process; and reconfiguring one or more of the characteristics of the lithographic process by adjusting one or more of the design variables until a certain termination condition is satisfied.