Skip to main content
Solved

The symbol ";" is not expected.

  • July 6, 2022
  • 4 replies
  • 195 views

Forum|alt.badge.img+4

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. 

 

Best answer by Chris Kuip

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.

 

4 replies

Chris Kuip
AIMMSian
Forum|alt.badge.img+7
  • AIMMSian
  • 125 replies
  • July 6, 2022

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.


Forum|alt.badge.img+4
  • Author
  • Enthusiast
  • 10 replies
  • July 6, 2022

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. 


Chris Kuip
AIMMSian
Forum|alt.badge.img+7
  • AIMMSian
  • 125 replies
  • Answer
  • July 6, 2022

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.

 


Forum|alt.badge.img+4
  • Author
  • Enthusiast
  • 10 replies
  • July 8, 2022

Thank you Chris.

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



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

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