w = model.Array(model.Var,len(w_bar), lb=0, ub=0.3)# Sum of all values = 1model.Equation(model.sum(w) ==1)# Sum of all values greater than 6% cannot exceed 60%# This is the part that degrades the speed greatlymodel.Equation(model.sum([model.if3(w[i] -0.06...
w = model.Array(model.Var,len(w_bar), lb=0, ub=0.3)# Sum of all values = 1model.Equation(model.sum(w) ==1)# Sum of all values greater than 6% cannot exceed 60%# This is the part that degrades the speed greatlymodel.Equation(model.sum([model.if3(w[i] -0.06...