Question: How to simplify long analytical expressions by defining composite parameters?

I would like to express the decision variables Pn_W,w_W,Ce_W,i1_W,Pn_D,w_D,Ce_D...other variables...​ in a compact form. Since their analytical expressions are lengthy, I want to identify terms and define appropriate composite parameters to simplify their representation.

Q_shorten_1.mw

For example ,  Suppose the original expression is: q := ((Cn - a)^2 + (P - d - b)*x^2 + Cn - a - b)/y(Cn - a)^2

Lets say Cn - a =X , P - d - b =S

Then the expression can be rewritten as: q = (X^2 + S*x^2 + X - b)/yX^2

Please Wait...