LarrySnyder/stockpyl

Correctly invoke `s_s_cost_discrete` with updated arguments

finnwiz opened this issue · 3 comments

Within ss.py, Lines 289-294:

	S_hat = S0
	s_hat = s0
	g_hat = s_s_cost_discrete(s_hat, S_hat, holding_cost, stockout_cost,
							  fixed_cost, use_poisson, demand_mean,
							  demand_pmf_dict)

I think the signature of s_s_cost_discrete is:

def s_s_cost_discrete(reorder_point, order_up_to_level, holding_cost,
					  stockout_cost, fixed_cost, use_poisson, demand_mean=None,
					  demand_hi=None, demand_pmf=None):

I'd suggest we invoke the function in ss.py on line 292 to:

	g_hat = s_s_cost_discrete(s_hat, S_hat, holding_cost, stockout_cost,
							  fixed_cost, use_poisson, demand_mean,
							  demand_hi, demand_pmf)

This was giving me errors when computing (s,S) levels for custom discrete distributions.

I'd be happy to make a PR but am a little confused on the permissions.

@finnwiz Thanks for this and sorry it took me a couple weeks to notice it.

You're correct. I'll make the change.

Also for future reference, feel free to just make the PR and I'll figure it out from there.

Okay great. Will make a PR in the future. Thank you!