Hi

You haven’t checked your SAM. The SAM shows imbalances

```
parameter checkrow(v), checkcol(u), checkbal(u);
checkrow(u) = sum(v, sam(v,u));
checkcol(v) = sum(u, sam(v,u));
checkbal(u) = checkcol(u) - checkrow(u);
display checkbal;
```

shows this:

```
---- 42 PARAMETER checkbal
AGRI 0.004, MANU -0.010, SERV -0.010, FINA -0.010
CAP 0.007, IDT 1.000000E-5, TRF 1.000000E-5, GOV 0.016
INV -0.007, EXT 0.010
```

I resolved this by manually editing (in excel) the SAM. Then I ran the model with iteration limit (which I call the 3 am question: If I wake you up, and I ask you “What is the most important check before you run any simulation?”, you should answer “Set the iteration limit of my model to zero”. If you set the iteration limit to zero, GAMS stops after plugging in the start values for your variables. If you use the correct values from your SAM, the correct benchmark prices and levels, GAMS will return a solution. If not, the infeasibilities show you which equations might have problems due to the formulation or to wrong start values.

As soon as everything is fine, you can reset it to 1000 for your simulations.

```
stdcge.iterlim = 0;
```

I also added a start value for your objective:

```
UU.L = prod(i, Xp.L(i)**alpha(i));
```

so this will not give an infeasibility.

```
**** REPORT SUMMARY : 0 NONOPT
0 INFEASIBLE
0 UNBOUNDED
0 ERRORS
29 PROJECTED
```

The next thing you should do is set all the starting values of your prices, transfers, savings, incomes to twice the value, run the model with iteration limit set to 0 and see if you have infeasibilities.

If they show up, look at the equation that has this infeasibility.

For example, in this equation from your listing file, you see an infeasibility:

```
eqE(MANU).. - (0.0908222232333804)*Z(MANU) + E(MANU) + (279.44)*pz(MANU)
- (279.44)*pe(MANU) =E= 0 ;
(LHS = -1.13686837721616E-13, INFES = 1.13686837721616E-13 ****)/code]
This infeasibility is, however, not relevant as it is small enough (1.13E-13). If you have a mistake in this equation, because you used a wrong starting value or made a mistake in the formulation, a bigger infeasibility will show up.
If there are no infeasibilities left, your model might be correct (there still might be errors that do not depend on the start data, like instead of dividing the variable P by its benchmark value, you divide it the other way around: still a benchmark, but your model is incorrect).
Hope this helps
Cheers
Renger
Here is the corrected SAM (but you might want to do it yourself, so you see what is wrong with the original one).
[code]
AGRI MANU SERV FINA CAP LAB IDT TRF HOH GOV INV EXT
AGRI 16.7100 81.1100 7.4700 0.0008 0.0000 0.0000 0.0000 0.0000 22.5600 6.0662 4.6300 1.1400
MANU 30.8100 960.7700 137.4100 4.8300 0.0000 0.0000 0.0000 0.0000 133.6200 0.0100 320.7200 139.7200
SERV 4.2400 182.4800 147.0400 24.5100 0.0000 0.0000 0.0000 0.0000 140.9700 113.4200 40.6400 34.7300
FINA 1.3100 44.4200 33.9700 7.1600 0.0000 0.0000 0.0000 0.0000 19.4600 0.1998 0.0010 0.6600
CAP 3.9970 129.4200 120.0300 39.6900 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
LAB 76.3400 140.1900 188.1600 20.9500 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
IDT 0.0000 66.3100 31.1400 8.6500 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
TRF 0.0000 1.9500 1.0000 0.2800 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
HOH 0.0000 0.0000 0.0000 0.0000 293.1370 425.6400 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
GOV 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 106.1000 3.2300 10.3670 0.0000 0.0000 0.0000
INV 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 391.8000 0.0010 0.0000 -25.8100
EXT 6.2800 121.2400 21.8100 1.1100 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
```