You could declare
param x {N,N} default 0;
and read whatever values are given in the Excel file. Then after your "read table", to fill in the missing values you could use an assignment statement like this:
let {i in N, j in N: x[i,j] = 0} x[i,j] := x[j,i];
Of course any other default value will work as well.
Bob Fourer
From: am...@googlegroups.com [mailto:am...@googlegroups.com]
On Behalf Of Yimo Yang
Sent: Thursday, February 23, 2012 11:35 AM
To: am...@googlegroups.com
Subject: Re: [AMPL 5508] Re: Modelling symmetry in AMPL
Hi Paul,
Thanks for your response. What if x [i, j] is a parameter?
for example, x [i, j] indicates the distance from i to j. In the excel file, there are only values for x [i, j]. How can I tell AMPL to read the value of x [j, i] assuming that x [i, j] = x [j, i]?
2012/2/23 Paul <paru...@gmail.com>