GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • YALMIP
  • Download
  • Tutorials
  • Examples
  • Inside
  • Commands
  • Solvers
  • Index
  • FAQ
  • References
  • Forum
  • Search
  • sdpvar
  • optimize

This view

  • Original page
  • New address

GeezerVison is showing yalmip.github.io — implies

implies is used to define implications between logic cases

Syntax

F = implies(A,B)

Examples

implies is used to define logic implications. As an example, the following code will ensure that a variable x satisfies a set of linear inequalities if a binary variable d is true. If d is false, the value of x is arbitrary the constraints could be satisfied, but they do not have to be)

d = binvar(1);
F = implies(d,A*x <= b);

implies is mainly intended for (BINARY -> BINARY) or (BINARY -> Linear constraint), although it can be used also for more general constructions such as (Linear Constraint -> Linear Constraint) (bearing in mind that these models typically are numerically sensitive and may require a lot of binary variables to be modeled).

The following code reverts the logic: if a set of linear inequalities are satisfied, the binary variable is forced to be true.

d = binvar(1);
F = implies(A*x <= b, d);

For more examples, check out another logic programming example and general theory

Comments

Since implies is implemented using a big-M approach, it is crucial that all involved variables have explicit bound constraints.

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.