0

I want to write a code of an OPL model. This model is about p center problems. The objective function of this model is as same as p median problem, except that we need to minimize the maximum weighted distance instead of minimize the sum of total weighted distance. Do you have any idea how can I write this objective function in cplex?

4

1 回答 1

1

If you start with pmedian from

https://www.ibm.com/support/knowledgecenter/SSSA5P_12.6.0/ilog.odms.ide.help/OPL_Studio/oplquickstart/topics/opl_quickstart_pmedian.html

What you can do is simply turn « sum » in the objective to « max »

minimize 
  max ( c in Customers , w in Warehouses ) 
    Demand[c]*Distance[c][w]*ShipToCustomer[c][w];
于 2019-07-05T05:33:18.957 回答