GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing yalmip.github.io — iff iff is used to create equivalence constraints between logic cases SyntaxExamplesiff is used to define logic equivalence. As an example, the following code will ensure that a variable x satisfies a set of inequalities if and only if a binary variable d is true (value 1), and vice versa. iff is mainly intended for (BINARY <-> BINARY), although it can be used also for more general constructions as above (bearing in mind that these models typically are numerically sensitive and may require a lot of binary variables to be modeled). The following code constrains a variable y if and only if a set of constraints on x hold. The following code is equivalent iff is overloaded as == on constraints, hence the following code gives the same model. and so does the following model CommentsSince iff is implemented using a big-M approach, it is crucial that all involved variables have explicit bound constraints. iff is very sensitive to modeling choices (is \(10^{-5}\) really a positive number in practice?), so it should be avoided as much as possible. If you can rewrite your model to simple (BINARY-> Linear) using implies, do so! See for instance the logic programming example |
| You are visitor 01402775 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |