question

Allister Wilson avatar image
0 Likes"
Allister Wilson asked Phil BoBo answered

Comparisons in optimizer constraints

I'm having issues getting comparison operators to behave in optimizer constraints.

For example, the following :

Images intégrées 1

...doesn't reject solutions where the values are equal :

One of our clients wanted a working equivalent to a != b, which I think should be "a<b or a>b" in an optimizer constraint. In the end the best working solution I could give him was abs([a] - [b]) >= 1.

optquest-constraints.fsm

FlexSim 16.0.1
optquestconstraints
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

1 Answer

Phil BoBo avatar image
3 Likes"
Phil BoBo answered

OptQuest constraints can only support greater-than-or-equal, less-than-or-equal, or exactly equal. If you use less-than or greater-than, it treats it as less-than-or-equal or greater-than-or-equal. http://www.opttek.com/documentation/v64engine/OptQuest%20Engine%20Documentation/WebHelp/Defining_constraints.htm

I will add a note to the development list to update the OptQuest documentation accordingly.

You can adjust your constraint equation by a small value in order to get the results you are looking for:

[Variable 1] <= [Variable 2] - 0.01
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.