Dec-12-2017, 07:20 PM
Okay so I know I post on this project a lot, but I'm very new to python coding, and this has been very helpful. Basically I have a new run time issue wherein I have my function subtracting from the total population as found in the last timestep. I know my problem is in the fact that I am multiplying each variable by the total, growing population, rather than the last population. Does anyone know how to call the last calculated y value using np.linspace?
x= np.linspace(0, 400, num=400000) ax.set_title('cumulative decrease in consumption') ax.set_xlabel('$Quarter$') ax.set_ylabel('$Percent of the Population$') ax.plot(x, ((initialPop * np.exp(popGrowth * (x/4)))-(newsDiscussion(1, 20, x, 0.0015, 0.003, 0.55)*(initialPop * np.exp(x/4)))-(Tax2(156, 160, x, 0.05775, 0.1155, 0.55)-(initialPop * np.exp(x/4)))-(Tax1(80, 84, x, 0.77, 0.154, 0.55)*(initialPop * np.exp(x/4)))-(runVeganuaryMain(x))*(initialPop * np.exp(x/4))), 'p-', lw=1, alpha=0.6, label='Major Graph')