# AMPL duplicate member "x" for set "y", how to fix it

**URL:** <https://discuss.ampl.com/t/ampl-duplicate-member-x-for-set-y-how-to-fix-it/474>\
**Category:** Support\
**Tags:** displays-results, sets-and-indexing, errors-and-messages, files-preprocessing, modeling\
**Created:** [April 5, 2023, 8:55am UTC](https://discuss.ampl.com/t/ampl-duplicate-member-x-for-set-y-how-to-fix-it/474 "2023-04-05T08:55:53Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![fdabrandao](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.ampl.com/fdabrandao/32/63_2.png) [@fdabrandao](https://discuss.ampl.com/u/fdabrandao)\
**Post date:** [April 5, 2023, 9:19am UTC](https://discuss.ampl.com/t/ampl-duplicate-member-x-for-set-y-how-to-fix-it/474/2 "2023-04-05T09:19:07Z")

</div>

Hi @Ares_Inglada_Grano,

Without specifying the arity of a set it defaults to 1 and any repeated value in the data section will then be a duplicate. You need to specify the arity of the set (i.e., `set path_intersections dimen 2;`) as follows:

```ampl
set path_intersections dimen 2;
data;
set path_intersections := 
1439 5
1439 74243
1441 5
1441 89
1441 90;
display path_intersections;

```

This will produce the following output:

```auto
set path_intersections :=
(1439,5) (1439,74243) (1441,5) (1441,89) (1441,90);

```

Also replied on [AMPL duplicate member "x" for set "y", how to fix it - Stack Overflow](https://stackoverflow.com/questions/75937400/ampl-duplicate-member-x-for-set-y-how-to-fix-it)

---

_[View the full topic](https://discuss.ampl.com/t/ampl-duplicate-member-x-for-set-y-how-to-fix-it/474)._
