LpPiecewiseSolver¶
-
class passengersim.rm.linear_program.LpPiecewiseSolver(carrier: str, _debug=
False)[source]¶ Bases:
LpBaseJust 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
- epsilon¶
- carrier¶
- num_pieces¶
- max_std_dev¶
- set_bp¶
- debug¶
- update(eng: SimulationEngine)[source]¶
I didn’t have a simple way to just update the LP, so we recreate it from scratch
- solver¶
- objective¶
- lp_vars¶
- constraints¶