I have a function in my code that builds a model and solve it and return the result. I have to call this function repeatedly. Although my code works properly I get the following warning after calling the function which makes my code super sluggish as it goes forward.
Warning: A variable or constraint named va is already attached to this model. If creating variables programmatically, use the anonymous variable syntax x = @variable(m, [1:N], ...).
Can you please let me know how I can get rid of the model after it is solved to prevent this issue. Any help would be appreciated.
All the best,