0

I have Recently developed a code fo an MIP model in Python. I have used Docplex to optimize that, but I have an error that says: "TypeError: must be real number, not QuadExpr". Could you please tell me how can I calculate the sqrt and help me to fix that? I have continuous variables, So I have to use docplex.mp.model and could not use docplex.mp.model (CP optimizer). A part of the code is depicted below:

Drone_model.add_constraint(Vhorisental[i][t] == math.sqrt((VX[i][t])**2 + (VY[i][t])**2)) 
#Horizontal speed of the UAV i at time t in X-axis, considering wind speed

0 Answers0