An approach for transforming the order of magnitude relation between two variables into an algebraic equality or inequality constraint is provided. In order to derive the order of magnitude relation between any two variables, a nonlinear optimization problem is solved for the minimum and maximum values of the ratio between the two variables, subject to two classes of constraints. The first class of constraints corresponds to the quantitative model and the second class of constraints corresponds to the qualitative model. The optimization approach is shown to provide more precise inferences as compared to the conventional constraint satisfaction approaches. Moreover, this approach provides a crucial step in developing unified frameworks that allow the incorporation of qualitative information at various levels of abstraction into numerical frameworks used for reasoning with quantitative models.