修正。仕入れ数量の決定を自動化。

2回目。在庫費用は機会損失1200円をふくむ29100円で6900円のコストダウン。
初期設定で1期あたりの費用は1500円。24期で36000円。これを基準にコストダウンをはかってみよう。
適正在庫を4個と仮定。毎期仕入れ数量は前期の実売数とする。
sale[0]=9
b[i]=sale[i-1]
【プログラム】

テストプレイ1回目。在庫費用は機会損失2400円をふくむ32400円で3600円のコストダウン。
【実行画面】

2回目。在庫費用は機会損失1200円をふくむ29100円で6900円のコストダウン。

※コメント投稿者のブログIDはブログ作成者のみに通知されます