You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Orbits/Code/2Firm_vfi.jl

64 lines
1.5 KiB
Julia

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

#=
The purpose of this is to set up a 2-firm, finite, dynamic orbit use model.
# TODO LIST
- [ ] Set up loss functions
- [ ] Set up utility functions
- [ ] Set up State×Choice Utility matrix
- [ ] Set up VFI
- [ ] Run it
- [ ] ?
- [ ] Profit!!!!
=#
#=
Model Description
V({sʲ}, D) = max{x} U(s) - F(x) + β V({sʲ}, D)
Utility Function: Similar to Rao Rondina
U(s) = ηs - ρ
Laws of motion
sʲ = (1-l({sʲ},D))sʲ + xʲ
D = (1-δ)D + g(D) + γ sʲl({sʲ},D) + Γ xʲ
Loss Function: Similar to Rao Rondina
l({sʲ},D) = 1-exp( -α{ij}sʲ - αsʲ - αD )
Autofragmentation Function: See Rao Rondina for a description (pg48)
g(D) = ζD(1-exp(-αD))
Launch Costs
F(x) = Fx
=#
#Setup Model Constants
const α1 = 1e-2
const α2 = 1e-2
const α3 = 1e-2
const α4 = 1e-2
const ζ = 3
const δ = 2e-2
const F = 5
const γ = 10
const Γ = 2
#=
Potential Structs
Maybe a view onto the state space?
With methods which show own and other sizes as vectors?
=#
#Loss Function
function loss(constellation_sizes::Vector{<:Int},debris::Float64,owner::Int)
1-exp(-α1*sum(constellation_sizes) + (α1-α2)*constellation_sizes[owner] - α3*debris)
end
#=
I think that I might need to consider the launch quantities of the other operators
as a state variable and use a nash equilibrium style idea of equilibrium.
=#