TwoStageOptimalControl.state_PDE_solverFunction
state_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.

source
TwoStageOptimalControl.HeunODEFunction
HeunODE(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.

source
TwoStageOptimalControl.RK4ODEFunction
RK4ODE(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.

source
TwoStageOptimalControl.HeunPDEFunction
HeunPDE(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.

source
TwoStageOptimalControl.costate_PDE_solverFunction
costate_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.

source
TwoStageOptimalControl.HeunODEcoFunction
HeunODEco(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.

source
TwoStageOptimalControl.HeunPDEcoFunction
HeunPDEco(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.

source