# Objective function: convex nonlinear
# Constraint functions: none
# Computes the median of m numbers by minimizing
# the sum of the distances. When m is odd, median
# lies at the middle data point. The corresponding
# distance term becomes "singular"
# and loqo fails.
param m;
param a {1..m};
var x;
minimize sum_dists: sum {i in 1..m} abs(x-a[i]);
data;
param m := 19;
let {i in 1..m} a[i] := Uniform01();
let x := 0.5;
solve;