Example: MAKE sets and mappings


In the following extended example we have some industries producing several commodities and some commodities that are made by several industries. The MAKE matrix shows the pattern of output. However, most of the industries and commodities are unique; meaning the commodity in question is made by just one industry, which in turn produces nothing else. The following code deduces from the MAKE matrix which are the unique industries and commodities and defines one-to-one mappings between these two sets. Note that we do not assume that the name of each unique industry matches that of the corresponding unique commodities, nor do we assume that the two unique sets are ordered the same.

Coefficient

(all,i,COM)(all,j,IND) MAKE(i,j)# value of com i produced by ind j #;

(integer) (all,i,COM) PRODUCERS(i)# no of inds making com i #;

(integer) (all,j,IND) PRODUCTS(j) # no of coms made by ind j #;

Read MAKE from file FLOWS header (all,i,COM)(all,j,IND) MAKE(i,j)#national MAKE #;

Formula

(all,i,COM)(all,j,IND) MAKE(i,j) = sum{q,REGDEST,MAKE(i,j,q)};

(all,i,COM) PRODUCERS(i) = sum{j,IND: MAKE(i,j)>0.0,1};

(all,j,IND) PRODUCTS(j) = sum{i,COM: MAKE(i,j)>0.0,1};

Set SPIND # industries making just one commodity #

= (all,j,IND: PRODUCTS(j) = 1);

Set SPCOM # commodities made by just one industry #

= (all,i,COM: PRODUCERS(i) = 1);

Set UPCOM # unique product commodities #

! these are commodities made by just one industry, which makes nothing else !

= (all,i,SPCOM: 1=sum{j,SPIND: MAKE(i,j)>0.0,1});

Set UPIND # unique product industries #

! these are industries making just one commodity, made by no other ind !

= (all,j,SPIND: 1=sum{i,SPCOM: MAKE(i,j)>0.0,1});

Set JPCOM # joint product commodities # = COM - UPCOM;

Set JPIND # joint product industries # = IND - UPIND;

Mapping (onto) COM2IND from UPCOM to UPIND;

Formula (all,i,UPCOM) COM2IND(i) = sum{j,UPIND:MAKE(i,j)>0.0, $POS(j,UPIND)};

Mapping (onto) IND2COM from UPIND to UPCOM;

Formula (all,j,UPIND) IND2COM(j) = sum{i,UPCOM:MAKE(i,j)>0.0, $POS(i,UPCOM)};

 

back to TABLO language contents



URL of this topic: www.copsmodels.com/webhelp/tabmate/hc_makesets.htm

Link to full GEMPACK Manual

Link to GEMPACK homepage