TwoStageOptimalControl.ObjectValue — FunctionObjectValue( 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 )Calculate the aggregated objective value of the optimal control problem for the current solutions of control and state variables
TwoStageOptimalControl.Aggregate — FunctionAggregate(Con_dist::Array{Float64,3},
Stat_dist::Array{Float64,3},
Stat_agg::Array{Float64,3},
Para::Dict )Calculate the aggregated variables over all vintage in the second stage
TwoStageOptimalControl.ShockTransition — FunctionShockTransition(Con::Array{Float64,3},
Stat::Array{Float64,3},
Stat_dist::Array{Float64,3},
Para::Dict )Calculate the starting values for all vintages given the state profiles of the first stage.
TwoStageOptimalControl.f_ODE — Functionf_ODE( tt::Int64,
Con::Array{Float64,3},
Stat::Array{Float64,3},
Dt::Array{Float64,1},
Para::Dict )Right hand side of the ODE for the state variables in the first stage at time index tt.
TwoStageOptimalControl.f_ODE_interstep — Functionf_ODE_interstep( t::Float64, Con, Stat, Para::Dict)Right hand side of the ODE for the state variables in the first stage. Only used for the 4th order RK-method where the Control variables have to be interpolated.
TwoStageOptimalControl.f_PDE — Functionf_PDE( tt::Int64, ss::Int64,
Con_dist::Array{Float64,3},
Stat_dist::Array{Float64,3},
Dt::Array{Float64,1},
Para::Dict )Right hand side of the PDE for the state variables in the second stage at time index tt and vintage ss.
TwoStageOptimalControl.f_ODE_co — Functionf_ODE_co( tt::Int64,
Con::Array{Float64,3},
Stat::Array{Float64,3},
CoStat::Array{Float64,3},
CoStat_dist::Array{Float64,3},
Dt::Array{Float64,1},
Para::Dict )Right hand side of the PDE for the costate variables in the first stage at time index tt.
TwoStageOptimalControl.f_PDE_co — Functionf_PDE_co( tt::Int64, ss::Int64,
Con_dist::Array{Float64,3},
Stat_dist::Array{Float64,3},
CoStat_dist::Array{Float64,3},
Dt::Array{Float64,1},
Para::Dict )Right hand side of the PDE for the costate variables in the second stage at time index tt and vintage ss.
TwoStageOptimalControl.Hamiltonian — FunctionHamiltonian(Con, Stat, CoStat, CoStat_dist,
t::Float64, Para::Dict )Definition of the Hamiltonian with all terms relevant for the calculations including first stage variables.
TwoStageOptimalControl.Hamiltonian_dist — FunctionHamiltonian_dist(Con_dist,
Stat_dist,
CoStat_dist,
t::Float64,
s::Float64,
Para::Dict )Definition of the Hamiltonian with all terms relevant for the calculations including second stage variables.
TwoStageOptimalControl.GradHamiltonian — FunctionGradHamiltonian(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},
dHam::Array{Float64,3},
dHam_dist::Array{Float64,3},
Para::Dict)Calculation of the gradient of the Hamiltonian for both stages.
TwoStageOptimalControl.NewDirection — FunctionNewDirection(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},
dHam::Array{Float64,3},
dHam_dist::Array{Float64,3},
Para::Dict)Adjustment of the gradient of the Hamiltonian depending on the optimisation type chosen. Available types are:
- "Gradient" -> Uses the gradient without adjustments
- "ProbAdjust" -> Adjusts the gradient for the weighting of the vintage in the second stage and the survival probability in the first stage
- "Newton-Raphson" -> Adjusts the gradient as described in the Newton-Raphson method using the Hessian of the Hamiltonian
TwoStageOptimalControl.ConMapping — FunctionConMapping( Con::Array{Float64,3}, Para )Map control variables in the first stage into the feasible region described by the lower and upper bounds of the controls.
TwoStageOptimalControl.ConMapping_dist — FunctionConMapping_dist( Con_dist::Array{Float64,3}, ii, Para )Map control variables in the second stage into the feasible region described by the lower and upper bounds of the controls.
TwoStageOptimalControl.EndConstraintCoStat — FunctionEndConstraintCoStat(Stat::Array{Float64,3}, CoStat::Array{Float64,3}, Para::Dict)Define the endconstraint for the first stage costate variables using the derivative of the salvage-function.
TwoStageOptimalControl.EndConstraintCoStat_dist — FunctionEndConstraintCoStat_dist(Stat_dist::Array{Float64,3}, CoStat_dist::Array{Float64,3}, Para::Dict)Define the endconstraint for the second stage costate variables using the derivative of the salvage-function.