A computer program product comprising a non-transitory computer readable medium having instructions therein, the instructions, upon execution by a computer system, configured to cause the computer system to at least:
- compute a multi-variable cost function, the multi-variable cost function representing an interlayer characteristic relating to at least part of the design layout and representing a further characteristic relating to the design layout, the interlayer characteristic being a function of a plurality of design variables that represent one or more characteristics of a lithographic process of imaging a portion of a design layout onto a substrate using a lithographic apparatus and the interlayer characteristic being a characteristic of an aspect in one layer relative to another aspect in another different layer, and the interlayer characteristic having a different weighting than the further characteristic;
- and
- reconfigure one or more of the characteristics of the lithographic process by adjusting one or more of the design variables and compute the multi-variable cost function with the adjusted one or more design variables, until a certain termination condition is satisfied.