1

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

4

1 回答 1

0

Set 元素在 AMPL 中应该是唯一的。要存储重复值,请改用参数:

set S;
param A{S};
data;
param:
 S: A :=  
 1  1
 2  1
 3  2;
于 2014-11-04T22:04:36.360 回答