Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
In AMPL, I have a set which should store some similar values. But I have a "duplicate number" error.
Is there any way to do that? What is the simplest method to solve this problem?
The set is:
set A;
data: set A := 1 1 2;
Thanks
Set 元素在 AMPL 中应该是唯一的。要存储重复值,请改用参数:
set S; param A{S}; data; param: S: A := 1 1 2 1 3 2;