Solved

Expecting a scalar identifier (no free indices) error

  • 21 November 2020
  • 1 reply
  • 22 views

I have several problems but I think they are related to each other. For all my constraints I get the warning “The index “i” already has a scope” and I also get this warning when I want to enter my data. Also when I want to specify the objective for my Mathematical Program I get the warning: “Expecting a scalar identifier (no free indices)”. I’ve added pictures of one of my constraints, the warning from the Mathematical Program and my Set where I believe the problem might be with the index i. But I don’t really know how to fix it so if someone could help me I would be very grateful. 

 

icon

Best answer by deannezhang 25 November 2020, 11:06

When “i “ is in the index domain field of a constraint, it is equivilant to “for all i”  or “∀ i”.  So in your case, you do not need it for the constraint Energy_demand, since all the i is already summed up. And you do not need it in the mathematical program Total_Cost either.

View original

1 reply

Userlevel 3

When “i “ is in the index domain field of a constraint, it is equivilant to “for all i”  or “∀ i”.  So in your case, you do not need it for the constraint Energy_demand, since all the i is already summed up. And you do not need it in the mathematical program Total_Cost either.

Reply


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

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