New answers tagged

3

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/. cheers!! The files can be found here: https://www.researchgate.net/post/...


3

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) def rue_c1(model): return sum(model.x[i] for i in model.i)==5 model.C1 =Constraint(rule=rue_c1) in the above case, if you initialize your set with N (and define it as a mutable parameter) then it will ...


2

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 or def init_w(model,i,j): return df.iloc[i-1,j-1] model.W =Param(model.i, model.j, mutable=True, initialize=init_w) 2- filling the instance properly


1

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 ...


Top 50 recent answers are included