# \[AMPL 24604\] AMPL duplicate member "x" for set "y", how to fix it

**URL:** <https://discuss.ampl.com/t/ampl-24604-ampl-duplicate-member-x-for-set-y-how-to-fix-it/477>\
**Category:** Google Group Mirror\
**Created:** [April 5, 2023, 8:50am UTC](https://discuss.ampl.com/t/ampl-24604-ampl-duplicate-member-x-for-set-y-how-to-fix-it/477 "2023-04-05T08:50:17Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ares\_Inglada\_Grano](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.ampl.com/ares_inglada_grano/32/230_2.png) [@Ares\_Inglada\_Grano](https://discuss.ampl.com/u/Ares_Inglada_Grano)\
**Post date:** [April 5, 2023, 8:50am UTC](https://discuss.ampl.com/t/ampl-24604-ampl-duplicate-member-x-for-set-y-how-to-fix-it/477/1 "2023-04-05T08:50:17Z")

</div>

I’m working with AMPL. In the “.mod” I have declared a set like this: set path\_intersections; It consists of rows of two numbers, the first one is the number of the path, and the second one the number of the intersection, in the .dat it looks like this:

_set path\_intersections:=_  
_1439 5_  
_1439 74243_  
_1441 5_  
_1441 89_  
_1441 90_  
_… ;_

With 200 rows. Obviously each path has more than 1 intersection, but when I run it, i get this

_error: practica.dat, line 605 (offset 9912):_  
_duplicate member 1439 for set path\_intersections_  
_context: \>\>\> ; \<\<\<_  
_practica.dat, line 605 (offset 9912):_  
_duplicate member 1439 for set path\_intersections_  
_context: \>\>\> ; \<\<\< …_

How can I fix it so that it doesn’t take it as duplicate? Every path has got more than one intersection, they are not duplicated.

Thank you!

---

<div class="post-metadata">

**Author:** ![AMPL\_Google\_Group](https://avatars.discourse-cdn.com/v4/letter/a/9dc877/32.png) [@AMPL\_Google\_Group](https://discuss.ampl.com/u/AMPL_Google_Group)\
**Post date:** [April 6, 2023, 9:24pm UTC](https://discuss.ampl.com/t/ampl-24604-ampl-duplicate-member-x-for-set-y-how-to-fix-it/477/2 "2023-04-06T21:24:07Z")

</div>

This question was answered in our new user forum:  
[https://discuss.ampl.com/t/ampl-duplicate-member-x-for-set-y-how-to-fix-it/474/2](https://discuss.ampl.com/t/ampl-duplicate-member-x-for-set-y-how-to-fix-it/474/2)
