Hi,
I am trying to model p median problem, but always gives errors for my objective:
"CPLEX(default) cannot extract expression" and
"CPLEX(default) cannot extract model: IloAlgorithm cannot extract extractable."
but when I simplify it and run it for one median, it works.
float XiCustomers = ...;
float YiCustomers = ...;
dvar float UWarehouses;
dvar float VWarehouses;
dvar boolean ShipToCustomerCustomersWarehouses;
minimize
sum( c in Customers, w in Warehouses)
ShipToCustomer[c][w] * Demand[c] * sqrt((Xi[c]U[w])^2+(Yi[c]V[w])^2);
subject to {
forall( c in Customers )
ctShip:
sum( w in Warehouses )
ShipToCustomer[c][w] == 1;
I will really appreciate any help.
Regards.
Topic
This topic has been locked.
1 reply
Latest Post
 20130303T09:25:26Z by SystemAdmin
ACCEPTED ANSWER
Pinned topic error  cannot extract expression
20130301T04:11:04Z

Answered question
This question has been answered.
Unanswered question
This question has not been answered yet.
Updated on 20130303T09:25:26Z at 20130303T09:25:26Z by SystemAdmin

ACCEPTED ANSWER
Re: error  cannot extract expression
20130303T09:25:26Z in response to D459_Parmanand_SinhaHi,
The objective function is not quadratic convex, so the cplex reaction is correct. If you leave only one component then it probably can be written equivalently as a valid quadratic objective by removing the sqrt. I don't think your problem can be solved as MIP without relaxation or reformulation. Please post your solution here when you find one, interesting to see how it can be solved.
Thanks,
Zahar