I have been using Mathematica with my optimisation problem and am now keen to try the optimisation tools in Julia (SDDP in particular). Am new Julia so plz bear with me.
In my optimisation problem, my constraints are actually measure of something in a hypothetical future time series - ie a few (given) assumptions as to what happens in the next 12mths, and my decision variables have to be chosen such that (1) generates least cost and (2) at each point in the next 12mths that dependent variable is above a target (lets say 10).
In mathematica, i was able to generate that time series relatively easy as I specify all the relationships “outside” and then bring each of them in in the optimisation code ie
obj = var * 50
timeseries = [w[1] = 100 + var, w[2] = w[1]+5+var/6, w[3]=w[2]-10+var/6…]
optsol = Nminimize[{obj, timeseries>10},var]
My questions on Julia:
- Is it not possible to predefine all the relationships like i did above with obj and timeseries (as constraint) and add them to the optimizer model? It seems like with Julia I need to add each variable and relationship “inside” the model.
- How do I generate each constraint above quickly. Specifically, my time series could have 100 data points. Do I need to code up @variable(mode;, var[n]) n times or is there a quick way to add them.
Thanks