Enumerate all combinations of operations that fit memory and time criteria I have the following problem:

$x$ is the number of operations I have to perform.

$O=\{o_1,o_2,\ldots o_n\}$ is the set of possible operations.

I know beforehand the cost in terms of time and memory of every operation $o_i \in O$.

I have a limited amount of memory and computation time, $M$ and $T$ respectively.

What is the most efficient way to generate the list of computable combinations? i.e. I need to generate a set of computables $C=\{c_1,c_2,\ldots c_m\}$ such as:


$\forall c_i \in C, c_i$ is a combination (with possible repetition) of $O$ and $|c|=x$ 
$\forall c_i \in C$ the memory and time consumption should be less than $M$ and $T$ respectively.


I think this is an operations research problem, but I can be wrong. If so, what branch of operations research? If not, then what is the most suitable approach?
You can use uniform-cost search in the space of possible combinations of operations. Each node will be an ordered list of operations performed. Terminate the search when the maximum memory or time allotment is reached.