Hi all!

I am running a dynamic CGE model. Until time t=16, the model finds feasible solutions for each period. However, in time t = 16, it returns the following error:

```
**** Exec Error at line 1112: rPower: FUNC DOMAIN: x**y, x < 0
**** Evaluation error(s) in equation "EQ7(agr,16)"
Problem in RHS evaluation
```

The equation associated with the error is:

```
EQ7(j,t)$KDCO(j)..
KDC(j,t) =e= B_KD(j)*SUM[k$KDO(k,j),beta_KD(k,j)*KD(k,j,t)
**(-rho_KD(j))]**(-1/rho_KD(j));
```

Where KDC is the industry j demand for composite capital, KD is the demand for type k capital by industry j, and rho_KD is the composite capital elasticity parameter, beta_KD is a share parameter, and B_KD is a scale parameter.

I understand the meaning of the error, and the fact that a variable x that is to the power of y has a negative value. In my specific case, it must be either beta_KD or KD. However, I have checked multiple times and there is no reason to believe those variables have a negative value. Therefore, I am in a bit of a dead end here. I guess my questions are:

- Has anyone else had the same issue where despite having the aforementioned error, there was no reason to believe the variable had a negative value? and
- Does anyone have an idea of something I might be missing here?

Thanks a lot in advance!