Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NewsVendor purchase cost error #40

Closed
joefarrington opened this issue Dec 14, 2024 · 1 comment
Closed

NewsVendor purchase cost error #40

joefarrington opened this issue Dec 14, 2024 · 1 comment

Comments

@joefarrington
Copy link

Hi team,

It looks to me like there's an error in the _STEP method of NewsVendorEnv when calculating the purchase cost.

The line is

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

But I don't know why excess_inventory would be needed to calculate the purchase cost.

For reference, the corresponding line from the original implementation by Balaji et al is appears to be the same except for the multiplication by excess inventory

purchase_cost = self.gamma ** self.l * c * buys

(see https://github.com/awslabs/or-rl-benchmarks/blob/master/News%20Vendor/src/news_vendor_environment.py, their self.l is the lead time, c is the purchase cost and buys is the order quantity).

@joefarrington
Copy link
Author

Sorry, thought I'd searched properly but just seen this is a duplicate of #26

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant