A new adaptive algorithm for determination of stocks in spare parts inventory systems