Let’s say that I have a dataframe (created from CSV) that looks like this but has a hundreds of variables:
And I want to create a set of variables and equations for JuMP in a way that model that look like that (assuming that upperbound for y1=5 and for y2=2):
Is there a good way to do this? I’ve been reading about converting string to variable name/metaprogramming etc. but that doesn’t seem to be correct answer for this.
One thing to watch is that constraints are only (linearly) simplified when model is build, so You may or may not have to do that manually if memory is important (it shouldn’t happen with hundreds of variables though)