Resource capacity allocation to stochastic dynamic competitors: knapsack problem for perishable items and index-knapsack heuristic