Skip to main content

Warning: Encountered a lag/lead operator on a subset of Integers

  • September 25, 2019
  • 2 replies
  • 114 views

Dear @deannezhang ,
I solved it.
I have this warming:
Warning: Encountered a lag/lead operator on a subset of Integers, which may not be your intend. Surround the left operand with Val() to turn it into a integer minus/plus. See option 'warning_lag_lead_on_subset_of_integers'.

How can I solve it?
Best
GL

2 replies

mateusarakawa
AIMMS Champ
Forum|alt.badge.img+2
  • AIMMS Champ
  • 85 replies
  • September 25, 2019
Could you write the syntax (code) that is leading to this warning? Probably it is a definition of a set. If you double-click on the warning, it will indicate to you the code line that is incorrect.

Maybe you can try using the funcion val(Parameter) to solve it, as the warning message already suggested.

deannezhang
AIMMS Champ
Forum|alt.badge.img+3
  • AIMMS Champ
  • 61 replies
  • September 25, 2019
as the message suggested, you may search "warning_lag_lead_on_subset_of_integers" in the option dialog and check the meaning. Basically, it wants to make you aware when the subset is like

i in {1, 3,5}

if i =1, lead on the subset will be i+1 = 3 , while as an integer, i+1=2.


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

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