GurobiError: Unsupported type (<class 'numpy.ndarray'>) for LinExpr addition argument
Hello,
I am trying to perform an array multiplication within a constraint, which you may check in the code below:
counter = []
m.addConstr(gb.quicksum(r_up[i] - r_down[i] for i in conv_gens) + gb.quicksum(-v_spill[j] for j in VRE_gens)
+ gb.quicksum(l_sh[d] - demands_data[d]['demand'] for d in loads) + gb.quicksum(np.dot(f[l], A[len(counter)]) for l in from_lines),gb.GRB.EQUAL,0)
counter.append(0)
How can I perform array multiplication in gurobi? I can't check any site with relevant info addressing the topic.
Thanks in adavance
0
-
Official comment
This post is more than three years old. Some information may not be up to date. For current information, please check the Gurobi Documentation or Knowledge Base. If you need more help, please create a new post in the community forum. Or why not try our AI Gurobot?.
Post is closed for comments.
Comments
1 comment