Example - Intelligent Decomposition of Selected Expression


This applies

to the intelligent decomposition of the selected expression in a linearised Equation, and

to the decomposition of an expression selected from the RHS of a Formula.

You see separate terms in the decomposition for the different parts which are added, subtracted, multiplied or divided. The decomposition respects brackets and SUMs.

The last term in the decomposition shows the values of the expression you have selected. The toggle EXP is used for the whole expression.

Equation Example

Equation E_x3 # Source-specific commodity demands #

(all,c,COM)(all,s,SRC) x3(c,s) - a3(c,s) =

x3_s(c) - SIGMA3(c) * [p3(c,s) + a3(c,s) - p3_s(c)] ;

Suppose that you select the part of the RHS beginning with SIGMA3 and going to the closing ] (as shown in bold above) and then ask for the intelligent decomposition of this expression.

Because the intelligent decomposition of an expression respects brackets and SUMs and shows terms multiplied, you will see in the decomposition separate parts showing the values of

SIGMA3(c),

p3(c,s) + a3(c,s) - p3_s(c),

the whole expression SIGMA3(c) * [p3(c,s) + a3(c,s) - p3_s(c)].

The formulas you could see in the Evaluate memo on the AnalyseGE form are:

Formula (All,c,COM)(All,s,SRC) TempCoeff("SIGMA3",c,s) = SIGMA3(c) ;

Formula (All,c,COM)(All,s,SRC) TempCoeff("e1_p3",c,s) = p3(c,s) + a3(c,s) - p3_s(c) ;

Formula (All,c,COM)(All,s,SRC) TempCoeff("EXP",c,s) =

SIGMA3(c) * [p3(c,s) + a3(c,s) - p3_s(c)] ;

What you see is based on exactly what you select.

[If your selection began with the minus sign just before SIGMA3(c), the first and last terms in the decomposition would include this minus sign.]

AnalyseGE makes up toggle names (they are "SIGMA3", "e1_p3" and "EXP" above) based on the names of the Coefficients and Variables in the different expressions. The toggle names and their associated values are as follows:

TOGGLE

VALUE DISPLAYED EQUALS

SIGMA3

SIGMA3(c)

e1_p3

p3(c,s) + a3(c,s) - p3_s(c)

EXP

SIGMA3(c) * [p3(c,s) + a3(c,s) - p3_s(c)]

You might like to compare the above with what you would get if you asked for the complete decomposition of the same selected expression.

If, on the other hand, you select a3(c,s) - p3_s(c) from inside the [] term, you will see in the decomposition separate parts showing the values of

a3(c,s),

- p3_s(c),

the whole expression a3(c,s) - p3_s(c).

Formula Example

Formula A = (B + C) * D - E - (F * G / H) ;

Firstly suppose that you select (B+C)*D - E. Then you will see in the decomposition separate parts showing the values of

B + C,

D,

-E (not +E),

(B+C)*D - E (the whole expression).

[In this case the toggles will be e1_B, D, e1_E and EXP.]

Secondly suppose that you select F*G/H. Then you will see in the decomposition separate parts showing the values of

F,

G,

H,

F*G/H (the whole expression).

[In this case the toggles will be F, G, H and EXP.]

Thirdly suppose that you select E - (F*G/H). Then you will see in the decomposition separate parts showing the values of

E,

-(F*G/H),

E - F*G/H (the whole expression).

[In this case the toggles will be E, e1_F and EXP.]

Finally suppose that you select the whole RHS (B + C) * D - E - (F * G / H). Then you will see in the decomposition separate parts showing the values of

B + C,

D,

-E (not +E),

-(F*G /H),

(B + C) * D - E - (F * G / H) (the whole expression).

[In this case the toggles will be e1_B, D, e1_E, e1_F and EXP.]

You might like to contrast this last example with what you would see if you asked AnalyseGE to decompose the RHS of this Formula. In that case the decomposition only shows the different parts which are added or subtracted (not multiplied or divided) and so you will see in the decomposition separate parts showing the values of

(B + C) * D,

-E,

-(F * G / H).

Exactly What Are You Seeing?

As with all decompositions, if you are at all unsure exactly what values you are seeing in each toggle, you can look at the Exxx header on the ViewHAR form or in the Evaluate memo on the AnalyseGE form.

We are grateful to Steven Rose for helping us to formulate the way in which AnalyseGE shows the intelligent decomposition of a selected expression.



URL of this topic: www.copsmodels.com/webhelp/analysege/hc_decompint.htm

Link to full GEMPACK Manual

Link to GEMPACK homepage