I have solved the problem using pyomo and the octeract solver. I have attached the folder here for free to use. The octeract folder is missing but you can get that by applying a license and downloading their solver from https://octeract.com/.
The files can be found here:
Let me give you an example
model.N =Param(mutable=True, initialize=10)
model.i = RangeSet(1,model.N)
model.x = Var(model.i,initialize=0,domain=Binary)
return sum(model.x[i] for i in model.i)==5
in the above case, if you initialize your set with N (and define it as a mutable parameter) then it will ...
You can put your data in a dataframe after reading it from a csv file
then define your model as abstract
then you can do two things
1- initializing your parameter as shown in the figure
model.W =Param(model.i, model.j, mutable=True, initialize=init_w)
2- filling the instance properly
Ipopt and similar solvers rely on criteria such as KKT to find out whether they converged against a point which satisfies 2nd order optimality conditions. However for the sake of not running forever and in the face of finite precision of Floating point numbers it does not make sense to continue running. So it stopped early and reported a failure.
Imagine a ...