1. A method for determining a variable near-optimal policy for a problem formulated as Markov Decision Process, the problem comprising at least one limited action entry, the limited action entry being an entry of an action of a finite set of actions limited in the number of times its value may be changed, the method comprising using at least one hardware processor for: receiving data elements with respect to the problem, the data elements comprising: (a) a finite set of states, wherein each state of the states comprises state entries, (b) the finite set of actions, wherein each action of the actions comprises action entries, (c) a transition probabilities matrix determining transition probabilities between states of the finite set of states, once actions of the set of actions are performed; (d) an immediate cost function, wherein the value of the immediate cost function is determined for a pair of a state of the finite set of states and an action of the finite set of actions, and (e) a discount factor; updating one or more data elements of the received data elements relating to the at least one limited action entry, wherein the one or more data elements are selected from the group consisting of: the transition probabilities matrix, the immediate cost function and the discount factor, and wherein the updating is triggered by a change in a value of a limited action entry of the at least one limited action entry; and following the updating of the one or more data elements, calculating a current near-optimal policy for the problem based on the updated one or more data elements.