TwoStageOptimalControl.state_PDE_solver
— Functionstate_PDE_solver(Con::Array{Float64,3},
Stat::Array{Float64,3},
Con_dist::Array{Float64,3},
Stat_dist::Array{Float64,3},
Stat_agg::Array{Float64,3},
Para::Dict)
state_PDE_solver solves the dynamic system of state equations with given initial conditions and control variables.
TwoStageOptimalControl.HeunODE
— FunctionHeunODE(Con::Array{Float64,3},Stat::Array{Float64,3},Para::Dict)
HeunODEco solves the state dynamics in the first stage forward in time using the Heun-method for ordinary differential equations.
TwoStageOptimalControl.RK4ODE
— FunctionRK4ODE(Con::Array{Float64,3},Stat::Array{Float64,3},Para::Dict)
RK4ODE solves the state dynamics in the first stage forward in time using a 4th-order Runge-Kutta method for ordinary differential equations.
TwoStageOptimalControl.HeunPDE
— FunctionHeunPDE(jj,Con_dist::Array{Float64,3},Stat_dist::Array{Float64,3},Para::Dict)
HeunODEco solves the state dynamics for vintage jj in the second stage forward in time using the Heun-method for ordinary differential equations.
TwoStageOptimalControl.costate_PDE_solver
— Functioncostate_PDE_solver(Con::Array{Float64,3},
Stat::Array{Float64,3},
Con_dist::Array{Float64,3},
Stat_dist::Array{Float64,3},
Stat_agg::Array{Float64,3},
CoStat::Array{Float64,3},
CoStat_dist::Array{Float64,3},
CoStat_agg::Array{Float64,3},
Para::Dict)
costate_PDE_solver solves the dynamic system of co-state equations backwards with given endvalues for given controls and state variables. For the special case of endconstraints for the STATE-variables, we use the FOC to derive the respective value of CO-STATE variable.
TwoStageOptimalControl.HeunODEco
— FunctionHeunODEco(Con::Array{Float64,3},
Stat::Array{Float64,3},
CoStat::Array{Float64,3},
CoStat_dist::Array{Float64,3},
Para::Dict)
HeunODEco solves the costate dynamics in the first stage backwards in time using the Heun-method for ordinary differential equations.
TwoStageOptimalControl.HeunPDEco
— FunctionHeunPDEco(jj,
Con_dist::Array{Float64,3},
Stat_dist::Array{Float64,3},
CoStat_dist::Array{Float64,3},
Para::Dict)
HeunPDEco solves the costate dynamic for vintage jj in the second stage backwards in time using the Heun-method for ordinary differential equations.