Solved

The symbol ";" is not expected.

  • 6 July 2022
  • 4 replies
  • 76 views

Badge +2

Good day people….i am new to AIMMS. I want AIMMS to read from a dat file but it keeps giving me the  statement “The symbol ";" is not expected.” The content of the dat file is 

 

COMPOSITE TABLE:
G  M P R_M R_P
!-------------
10 8 4 10  15 ; 

after removing the symbol ; it pops up another error which is ‘The symbol "15    " is not expected.’

after removing 15, it pops up another error which is ‘The symbol "10     " is not expected.”

 

Is there something i am not getting right on how to structure the contents in dat file. Kindly help please. 

 

icon

Best answer by Chris Kuip 6 July 2022, 19:55

View original

4 replies

Badge +2

Thank you Chris.

It works. You could just help with the format to write to dat file. Thank you. 

Userlevel 4
Badge +7

Hi Lawrence,

 

Parameters without an index domain are not supported by the composite table.  Please use assignments instead; for instance the following works:

G := 10 ;
M := 8 ;
P := 4 ;
R_M := 10 ;
R_P := 10 ;

 

A working copy of the project is included.

 

Hope that helps,

 

Chris.

 

Badge +2

Thank you Chris. 

I am using 4.85.6.21. 

G, M, P, R_M & R_P are declared as scalar parameters. 

After restarting, it pops up the message below.  

The file "Data\bottle" cannot be opened: No such file or directory.

Find attached the work folder. 

Userlevel 4
Badge +7

Hello Lawrence,

 

I tried to reproduce the behavior you described, but failed; when you open the enclosed project, and press the ME button, the data is read in as follows:
 

After pressing the ME button in the enclosed app.

May I ask:

  1. Does this behavior persist after restarting AIMMS?
  2. Which AIMMS version are you using? (I am using AIMMS 4.86.8)
  3. If the behavior persists, how are G, M, P, R_M, and R_P declared?

 

With kind regards,

 

Chris.

Reply


Didn't find what you were looking for? Try searching on our documentation pages:

AIMMS Developer & PRO | AIMMS How-To | AIMMS SC Navigator