Allow Unrestricted us of Primitive Set Member Names Box



The Allow unrestricted use of primitive set member names checkbox on the Model Generator tab:

page140xp

allows for backward compatibility with models created in earlier releases of LINGO.

In many instances, you will need to get the index of a primitive set member within its set. Prior to release 4 of LINGO, you could do this by using the primitive set member's name directly in the model's equations. This can create problems when you are importing set members from an external source. In this case, you will not necessarily know the names of the set members beforehand. When one of the imported primitive set members happens to have the same name as a variable in your model, unintended results can occur. More specifically, LINGO will not treat such a variable as optimizable. In fact, it would treat it as if it were a constant equal to the value of the index of the primitive set member!

In short, different primitive set names can potentially lead to different results. Therefore, starting with release 4.0 of LINGO, models such as the following were no longer permitted:

MODEL:

SETS:

  DAYS /MO TU WE TH FR SA SU/;

ENDSETS

  INDEX_OF_FRIDAY = FR;

END

If you want the index of FR in the DAYS set, you should now use the @INDEX function:

INDEX_OF_FRIDAY = @INDEX( DAYS, FR);

By default, LINGO disables the use of primitive set member names.