Download An Integrated System Dynamics Model for
Transcript
Zero-Oil Condition Function File The zero-oil function file for MATLAB solves the one-period problem for the global model when a cut-off condition is satisfied. In response to price changes for a fossil fuel type, production of electricity can fall much faster than the depreciation of the capital stock used in production of electricity from that fuel type. As a result, the average total cost may increase very rapidly, and the non-linear equation solver can break down. This event almost always happens to electricity production from oil, and the zero-oil MATLAB function is a fix for that specific problem. When a threshold condition is reached, the value of electricity produced from oil remains fixed at a level close to zero. function z = energysect_glb_zo(y,par, par_ff,cap) %variables Y = y(1,1); E = y(1,2); Eh = y(1,3); El = y(1,4); Fh1 = y(1,5); Fh2 = y(1,6); Fh3 = y(1,7); Fe1 = y(1,8); Fe2 = y(1,9); Fe3 = y(1,10); r = y(1,11); w = y(1,12); Pe = y(1,13); Ph = y(1,14); Pel = y(1,15); e4 = y(1,16); e5 = y(1,17); FC1 = y(1,18); 89