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

Re: error  cannot extract expression
20130303T09:25:26ZThis is the accepted answer. This is the accepted answer.Hi,
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