Problems with deterministic simulation

Dear all.

We are proceeding with our project. However, there are some problems with deterministic simulation.

The error message is given:
Simulation terminated with NaN or Inf in the residuals or endogenous variables. There is most likely something wrong with your model.

our mod file is here
example.mod (18.2 KB)

is there any possible solution?

Thank you.
Sincerely.

You did not provide all files to run the model.

Sorry, we were confused the file.
The assigned file is here:
benchmark.mod (24.4 KB)

Sincerely.
Thanks.

There are still files missing, e.g. go_calibrate.

we tried to incorporate capital on the baseline model.
However, the error message is given:
Simulation terminated with NaN or Inf in the residuals or endogenous variables. There is most likely something wrong with your model.

These files are for the baseline model:
ert_testing.mod (21.8 KB) go_calibrate.m (769 Bytes)

And those following files are for the model that incorporates capital:
ert_testing3.mod (25.1 KB) go_calibrate.m (769 Bytes)

As you see, the baseline model proceeds well, however, the latter mod file is not operated.

we would really appreciate you if you gave us some answers to the errors.

Sincerely.
Thanks

Now the calibrate.m is missing.

we apologize for the repeated mistakes.

we tried to incorporate capital on the baseline model.
However, the error message is given:
Simulation terminated with NaN or Inf in the residuals or endogenous variables. There is most likely something wrong with your model.

These files are for the baseline model:
ert_testing.mod (21.8 KB)
calibrate.m (904 Bytes)go_calibrate.m (769 Bytes) plot_results.m (4.0 KB)

And those following files are for the model that incorporates capital:
ert_testing3.mod (24.8 KB)
calibrate.m (904 Bytes) go_calibrate.m (769 Bytes) plot_results.m (4.5 KB)

As you see, the baseline model proceeds well, however, the latter mod file is not operated.

we would really appreciate you if you gave us some answers to the errors.

Sincerely.
Thanks

Are you sure that some values like phiu=0 make sense?

we set that the investment adjustment cost as like below:

//adjustment cost
phiu=kj/2*(xu/xu(-1)-1)^2;

So that, at the steady state,

phiu=0;

And we set the initial value of phiu as the steady state(pre-infection).
are we wrong?