Constraints and Macros

You can set up an OptQuest constraint in the form A1 <= 100 or simular and use CBBeforeSimulation or CBBeforeIteration to modify cell A1. If you do this, a "constant constraint" warning appears and warns you that one or more constraints do not appear to contain decision variables, that they are marked as constants, and therefore no feasible solutions may be found.

This warning only applies if you don’t have a macro that modifies the cell. If you are using a macro to change values in the referenced cell, you can close the warning and continue with the optimization. Then, the constraint will work as intended. If you check the "Do not show" box, you won’t need to respond to the message again while you are using that particular model.