hubbs5 / or-gym

Environments for OR and RL Research
MIT License
373 stars 93 forks source link

News Vendor ** ? #23

Closed ChrisKahrs closed 2 years ago

ChrisKahrs commented 2 years ago

In line 87 of newsvendor there is a multiplication of several items but it ends with a ** of self.lead_time. I think that is wrong.

    purchase_cost = excess_inventory * self.cost * order_qty * \
        self.gamma ** self.lead_time

Happy to do a fix and PR if someone else can verify that is incorrect. Thanks!

hubbs5 commented 2 years ago

Hello,

Gamma is a discount factor that's discounted exponentially by the lead time. While we didn't enforce it in the code gamma should always be in the range: 0 < gamma <= 1.

Please let us know if you have any other questions!