Exemplo n.º 1
0
mod = Model(para, ch7=True, turn_off_env=True)
E_lambda = mod.chapter7_initialise()
print '============================================================'
print 'E_lambda: ' + str(E_lambda)
print '============================================================'

para.E_lambda_hat = E_lambda

#Truncated normal
E_lambda = truncnorm((0.01 - E_lambda) / 0.05, (0.99 - E_lambda) / 0.05,
                     loc=E_lambda,
                     scale=0.05).rvs()

print '============================================================'
print 'E_lambda: ' + str(E_lambda)
print '============================================================'

para.ch7['inflow_share'] = E_lambda
para.ch7['capacity_share'] = E_lambda
para.t_cost = para.t_cost / 2.0
para.aproximate_shares_ch7()

print '============================================================'
print 'Lambda high: ' + str(para.Lambda_high)
print 'Lambda high HL: ' + str(para.Lambda_high_HL)
print '============================================================'

with open(NCIhome + NCIfolder + str(run_no) + '_para.pkl', 'wb') as f:
    pickle.dump(para, f)
    f.close()
Exemplo n.º 2
0
mod = Model(para, ch7=True, turn_off_env=True)
E_lambda = mod.chapter7_initialise()
print '============================================================'
print 'E_lambda: ' + str(E_lambda)
print '============================================================'

para.E_lambda_hat = E_lambda

#Truncated normal
E_lambda = truncnorm((0.01 - E_lambda) / 0.05, (0.99 - E_lambda) / 0.05, loc=E_lambda, scale=0.05).rvs()

print '============================================================'
print 'E_lambda: ' + str(E_lambda)
print '============================================================'

para.ch7['inflow_share'] = E_lambda
para.ch7['capacity_share'] = E_lambda
para.t_cost = para.t_cost/2.0
para.aproximate_shares_ch7()

print '============================================================'
print 'Lambda high: ' + str(para.Lambda_high)
print 'Lambda high HL: ' + str(para.Lambda_high_HL)
print '============================================================'


with open(NCIhome + NCIfolder +  str(run_no) + '_para.pkl', 'wb') as f:
    pickle.dump(para, f)
    f.close()