An agent-based stochastic ruler approach for a stochastic knapsack problem with sequential competition