Minimize discrete time objective

Hi, I’m currently trying to model an optimization problem in which the aim is to find time-dependent optimal decisions. I was able to reduce my current question to a minimal example.

\text{minimize } t\\ \text{s.t. } f(t) \geq c

where t,c \in \mathbb{N}, c is a fixed constant and f\colon \mathbb{N} \to \mathbb{N} is a recursive function, e.g. f(n) is the n-th Fibonacci number.

Is it possible to solve these problems in an elegant way? I looked into JuMP and InfiniteOpt, but could only find examples for continous time objectives. I thought about solving the problem for a fixed t and take the minimal feasible solution, but this might take too long for my main problem. For now, I can say that the upper limit for t is 2000, but the minimum final time may be around 500 - 1500, depending on the specifications later on.

I would be happy if you could help me or point me in the right direction.

I believe you may be able to use JuMP for this, please see an example here of optimizing control of a SIR epidemic model in discrete time sir-julia/markdown/function_map_lockdown_jump/function_map_lockdown_jump.md at master · epirecipes/sir-julia (github.com)

Note that it is still using the old nonlinear interface ( Nonlinear Modeling (Legacy) · JuMP), I will try to find time to make a PR to update that.

If you only have 2000 possible values of t, can’t you just use exhaustive search?

That was my initial approach. I had a try with dynamic programming and memorization. And this works for simple functions like the Fibonacci numbers. But as the funcion becomes more complex and involves multiple recursive dependencies and decision variables, this method didn’t work for me.