Originally posted by: guabiik
Hi, i'm solving a location problem in matlab with the weizfeld algorithm and in ampl with soc constraints. My problem is that in AMPL it give me other results, with the location that ampl give me if i calculate the cost in excel with the data it give me a bigger number that the cost according to ampl.
my .mod is
param n;
set I={1..n};
param x{I};
param y{I};
param v{I};
param r{I};
param c{I};
var xp;
var yp;
var d{I},>=0;
var z{I};
var w{I};
minimize somme: sum {j in I} v[j]*r[j]*d[j];
subject to distance {j in I}: d[j]^2>=z[j]^2+w[j]^2;
subject to égalité1 {j in I}: xp-x[j]=z[j];
subject to égalité2 {j in I}: yp-y[j]=w[j];
and modifed some options,
option cplex_options 'timelimit=3600 bardisplay=2 comptol=1E-12 qcpconvergetol=1E-11' ;
I think that i should change some tolerance, but i don't know what to change.
I have the last version of ampl and cplex.
#CPLEXOptimizers#DecisionOptimization