table timeset IN "ODBC" "BAS_Data_Time_Dependent.xls": TIME <- [TIME];
Robert,
Thank you for your clarification. I would like to clarify my understanding. Indeed, I have a statement which reads the members of ZONE as well as the parameters indexed over ZONE. This was successfully called into AMPL. The table statement in my original post is meant to read members who are indexed over ZONE and TIME. In other words, I don't anticipate creating a table nor reading in members which are indexed over TIME because these members must also be associated with ZONE.
If I am understanding correctly your suggestion to my question, you are suggesting that I need to read in a table that is indexed over TIME, and then read in the table indexed over ZONE and TIME such that I have three read table statements? But if this is the case, I'm not sure reading the table indexed over only TIME would suffice since the way my data is structured each row in this table must also be associated with the ZONE set.
AG
On Wed, Oct 19, 2022 at 3:06 PM UTC, AMPL Google Group <am...@googlegroups.com> wrote:
When you have a table statement like this,
table times ...:
[TIME,ZONE], time_step, zoneTemperatureReported, ...
then "read table times;" reads values for the parameters time_step, zoneTemperatureReported, etc., but it does not read values for the sets TIME and ZONE. You will need separate table and read table statements to get the values for TIME and for ZONE; and you should read those tables before table times.
As you may have seen, you can use a single table statement for reading the members of TIME and one or more parameters that are indexed only over TIME; and similarly for ZONE. You just need to do that before reading the data that is indexed over TIME and ZONE.
--
Robert Fourer
am...@googlegroups.com