read data

76 views
Skip to first unread message

King

unread,
May 23, 2012, 2:49:06 PM5/23/12
to AIMMS - The Modeling System
Hi,

I got an error message
The index "i" present in a(r, i) is not present in the previously
generated entry (b(r)) of this read statement. AIMMS generates
communication links when they are not explicitly specified between the
keywords read/write and from/to. These entries are constructed by
considering the column names in the database, the identifier names in
the model and/or the database table mapping attribute.

However, i did not read in a in the code:
read from table DBDS_Resource();

What could be the reason?

Thanks

Sergio Bruno

unread,
May 23, 2012, 3:50:04 PM5/23/12
to ai...@googlegroups.com

What is the content of this table?


--
You received this message because you are subscribed to the Google Groups "AIMMS - The Modeling System" group.
To post to this group, send email to ai...@googlegroups.com.
To unsubscribe from this group, send email to aimms+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/aimms?hl=en.

King

unread,
May 23, 2012, 4:00:16 PM5/23/12
to AIMMS - The Modeling System
Name b c
r1 0 10
r2 10 5
r3 0 -10

while "a" has nothing to do with this table. BTW, "a" used to be a
column too, but now I do not read in "a" anymore but determine the
values for this parameter through a procedure.

On May 23, 3:50 pm, Sergio Bruno <svbbr...@gmail.com> wrote:
> What is the content of this table?
>

Guido Diepen

unread,
May 24, 2012, 6:20:41 AM5/24/12
to ai...@googlegroups.com
Hi,

do you have happen to have an identifier in AIMMS with exactly the same name as a column in the database table? If you do have this, AIMMS will automatically use this as a mapping for communication with the database. If you do have such a column/identifier combination with the same name and you do not want to read it, please provide the identifiers you want to read from the database explicitly in the read statement:

read b,c from table DBDS_Resource ; 

Guido Diepen
AIMMS Specialist

Sergio Bruno

unread,
May 24, 2012, 9:34:50 AM5/24/12
to ai...@googlegroups.com

Is there a column "a" on this table in your database, even if you don't read it anymore ?
This could be your problem, since aimms will try to automatically read it.
Try running a procedure like
Read b from mytable;

Best,
Sergio

Em 23/05/2012 17:00, "King" <shiwa...@gmail.com>escreveu:

Name    b       c
r1      0       10
r2      10       5
r3      0       -10

while "a" has nothing to do with this table.  BTW, "a" used to be a
column too, but now I do not read in "a" anymore but determine the
values for this parameter through a procedure.


On May 23, 3:50 pm, Sergio Bruno <svbbr...@gmail.com> wrote:
> What is the content of this table?

>...

> Em 23/05/2012 15:49, "King" <shiwang....@gmail.com>escreveu:

>
> Hi,
>
> I got an error message

> The index "i" present in a(r, i) is not present in the previous...

King

unread,
May 30, 2012, 11:01:57 AM5/30/12
to AIMMS - The Modeling System
I deleted column "a" on this table in the database.

Thanks.

On May 24, 9:34 am, Sergio Bruno <svbbr...@gmail.com> wrote:
> Is there a column "a" on this table in your database, even if you don't
> read it anymore ?
> This could be your problem, since aimms will try to automatically read it.
> Try running a procedure like
> Read b from mytable;
>
> Best,
> Sergio
>

King

unread,
May 30, 2012, 11:17:25 AM5/30/12
to AIMMS - The Modeling System
Thanks a lot for the answers. I found that i deleted the "a" column
in the table, but the "a" column is still there in the query wizard.
I recreated a query wizard and once the "a" column is gone, there is
no error anymore :D


On May 24, 9:34 am, Sergio Bruno <svbbr...@gmail.com> wrote:
> Is there a column "a" on this table in your database, even if you don't
> read it anymore ?
> This could be your problem, since aimms will try to automatically read it.
> Try running a procedure like
> Read b from mytable;
>
> Best,
> Sergio
>
Reply all
Reply to author
Forward
0 new messages