Hi there,
I want to solve a simple facility location problem in wich we have nodes (N), trajectories (T) and a weight between nodes and trajectories weight[t,n]. My variable x {N} is binary and it indicates if the corresponding node belongs to the solution set (or not).
I implement the next objective function:
maximize f:
sum{t in T} max {n in N} weight[t,n]*x[n];
I want that my objective function sums for each trajectory (t) the maximum weight weight[t,n] such that "n" is in the solution set (its value is 1). It is subject to a cardinality constraint (the number of nodes in the solution set must be less or equal than k).
AMPL doesn't detect any error in my formulation but it doesn't optimize my problem (It returns me all the variables equal to zero) and I think it could be because the objective function formulation is not correct.
Thanks.