Skip to content

Commit

Permalink
enable/disable calibrate "bo bookings" demand
Browse files Browse the repository at this point in the history
  • Loading branch information
sash-ko committed Mar 30, 2017
1 parent f7e752e commit ce6e4d5
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions revpy/mfrm.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ def estimate_host_level(observed, availability, probs, nofly_prob):
return demand, spill, recapture


def estimate_class_level(observed, availability, probs, nofly_prob):
def estimate_class_level(observed, availability, probs, nofly_prob,
calibrate=True):
""" Estimate demand, spill and recapture using multi-flight recapture
method (MFRM) on class-level
Expand Down Expand Up @@ -109,8 +110,10 @@ def estimate_class_level(observed, availability, probs, nofly_prob):
'recapture': 0
}

return calibrate_no_booking(estimates, observed, availability, probs,
host_spill)
if calibrate:
estimates = calibrate_no_booking(estimates, observed, availability,
probs, host_spill)
return estimates


def calibrate_no_booking(estimates, observed, availability, probs, host_spill):
Expand Down

0 comments on commit ce6e4d5

Please sign in to comment.