Linear and nonlinear estimation of the cost function of a two-echelon inventory system