Topic
  • 1 reply
  • Latest Post - ‏2013-03-03T09:25:26Z by SystemAdmin
D459_Parmanand_Sinha
2 Posts

Pinned topic error - cannot extract expression

‏2013-03-01T04:11:04Z |
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.
Updated on 2013-03-03T09:25:26Z at 2013-03-03T09:25:26Z by SystemAdmin
  • SystemAdmin
    SystemAdmin
    1883 Posts

    Re: error - cannot extract expression

    ‏2013-03-03T09:25:26Z  
    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