Fast solvers

OptimalApplication.applicationorder_listFunction
applicationorder_list(mkt::SameCostsMarket) -> X, V

Produce the optimal application order X and associated valuations V for the SameCostsMarket defined by mkt. Uses a list data structure; typically faster than the equivalent applicationorder_heap.

All SameCostsMarkets satisfy a nestedness property, meaning that the optimal portfolio when mkt.h = h is given by the first h entries of the optimal portfolio when mkt.h = mkt.m. For example:

julia> mkt = SameCostsMarket([0.2, 0.5, 0.1, 0.6, 0.1], [1, 4, 9, 1, 8], 5);

julia> x, v = applicationorder_list(mkt)
([2, 3, 5, 4, 1], [2.0, 2.7, 3.24, 3.483, 3.5154])

julia> x[1:4], v[4] # optimal portfolio and valuation for h = 4 
([2, 3, 5, 4], 3.483)
source
OptimalApplication.applicationorder_heapFunction
applicationorder_list(mkt::SameCostsMarket) -> X, V

Produce the optimal application order X and associated valuations V for the SameCostsMarket defined by mkt. Uses a heap data structure; typically the equivalent applicationorder_list is faster.

All SameCostsMarkets satisfy a nestedness property, meaning that the optimal portfolio when mkt.h = h is given by the first h entries of the optimal portfolio when mkt.h = mkt.m. For example:

julia> mkt = SameCostsMarket([0.2, 0.5, 0.1, 0.6, 0.1], [1, 4, 9, 1, 8], 5);

julia> x, v = applicationorder_heap(mkt)
([2, 3, 5, 4, 1], [2.0, 2.7, 3.24, 3.483, 3.5154])

julia> x[1:4], v[4] # optimal portfolio and valuation for h = 4 
([2, 3, 5, 4], 3.483)
source
OptimalApplication.optimalportfolio_dynamicprogramFunction
optimalportfolio_dynamicprogram(mkt::VariedCostsMarket) -> X, v

Use the dynamic program on application costs to produce the optimal portfolio X and associated value v for the VariedCostsMarket defined by mkt.

julia> mkt = VariedCostsMarket([0.2, 0.5, 0.1, 0.6, 0.1], [1, 4, 9, 1, 8], [2, 4, 2, 5, 1], 8);

julia> optimalportfolio_dynamicprogram(mkt)
([3, 5, 2], 3.24)
source