joaomacalos / sfcr

Simulate Stock-Flow Consistent Models
Other
23 stars 10 forks source link

Error inv() matrix is singular in input-output SFC model #8

Open valentinroussarie opened 1 year ago

valentinroussarie commented 1 year ago

I am trying to do a simulation in a SFC input-output model with ecological restoration of environmental impacts. Nonetheless, whenever I try to run it, it always displays : error inv(): matrix is singular.

I attach the file. Does someone have a hint how to find where the problem comes from ? (I mean, what explains that the Jacobian matrix cannot be inverted).

I would be hugely thankful

Yours faithfully, Roussarie Valentin Script.txt

Codo-der-Dritte commented 5 months ago

Hey,

if you use the "Newton" method in the sfcr_baseline (sfcr_baseline(eqs, external, periods = 60, method = "Newton")) function the model is solveable, however not stable. I think that you need to add some initial values.