How can we define a constraint saying:(adsbygoogle = window.adsbygoogle || []).push({});

if b is larger than zero then y has to equal 1

if b is equal to zero then y has to equal 0

?

It concerns the following problem:

b[k] = amount of vegetable i growing on patch k

y[k] = 1 if vegetable i is grown on patch k

= 0 otherwise

So we want to say that if the amount of vegetable i on patch k is larger than zero (i.e. b[k] > 0), vegetable i must be assigned to patch k (i.e. y[k] = 1)

I was thinking that it could be something like that:

for all i

sum(k) b[k]*y[k] = b[k]

But I don't know if this is correct or not, since you could cancel out both terms b[k]

What do you guys think?

Kind regards,

Alex

**Physics Forums - The Fusion of Science and Community**

Dismiss Notice

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# If-then-else construction

Loading...

Similar Threads for else construction | Date |
---|---|

A How can we construct ordinals after large Veblen? | Dec 11, 2017 |

I Constructing an Index | May 26, 2017 |

B How to construct a proof? | Jul 19, 2016 |

How to construct the natural numbers with hypersets | May 13, 2015 |

Prob something occurs given something else occurs | May 11, 2011 |

**Physics Forums - The Fusion of Science and Community**