LpPiecewiseSolver

class passengersim.rm.linear_program.LpPiecewiseSolver(carrier: str, _debug=False)[source]

Bases: LpBase

Just fiddling with an approach to approximate the non-linear stochastic problem. Break each demand into pieces, and price them at the expected marginal revenue .. admonition:: Notes

  • We don’t need an “allocation <= demand” constraint, as demand is effectively unbounded but the marginal revenue is monotonic descending, asymptotic to zero and so the pieces will get chosen in order until leg capacity is filled.

Methods

__init__(carrier[, _debug])

initialize(eng)

solve(sim[, debug])

test_status(status)

update(eng)

I didn't have a simple way to just update the LP, so we recreate it from scratch

Attributes

carrier

solver

objective

lp_vars

constraints

epsilon

num_pieces

max_std_dev

set_bp

debug

epsilon
carrier
num_pieces
max_std_dev
set_bp
debug
initialize(eng: SimulationEngine)[source]
update(eng: SimulationEngine)[source]

I didn’t have a simple way to just update the LP, so we recreate it from scratch

solve(sim: SimulationEngine, debug=False)[source]
solver
objective
lp_vars
constraints
test_status(status)