The expression "{w in weights[p]}" requires weights[p] to be a set. You could define "set weights{points};" and then your constraint c1 would not give an error. But since a member can only appear once in each set, you would not be able to associate weights["A"] with "(1, 2, 1, 3)" or weights["B"] with "(3, 1, 3)". So for this situation you need to make weights a 2-dimensional parameter:
set points;
param n_weights {points} integer > 0;
param weight {p in points, 1..n_weights[p]};
var x >= 0;
minimize obj: x;
subject to c1 {p in points}:
x >= sum {w in 1..n_weights[p]} weight[p,w];There are various ways to give the data, for example:
param: points: n_weights :=
A 4 B 3 C 1 ;
param weight:
1 2 3 4 :=
A 1 2 1 3
B 3 1 3 .
C 5 . . . ;