# Euclidean single facility location problem
# Objective Function: convex
# Constraint Functions: none
param d := 2; # dimension
param m := 1000; # number of facilities
param a {1..m, 1..d}; # coordinates of existing facility
param w {1..m}; # weight associated with each existing facility
var x {1..d};
var t {1..m};
minimize sumEucl: sum {i in 1..m} w[i]*t[i];
subject to t_def {i in 1..m}:
sqrt( sum {j in 1..d} (x[j] - a[i,j])^2 ) <= t[i];
let {i in 1..m, j in 1..d} a[i,j] := Uniform01();
let {i in 1..m} w[i] := Uniform01();
let {j in 1..d} x[j] := 0.5;
solve;
display x;