# Fix command on binary variables

**URL:** <https://discuss.ampl.com/t/fix-command-on-binary-variables/360>\
**Category:** Support\
**Tags:** modeling\
**Created:** [February 4, 2023, 10:27pm UTC](https://discuss.ampl.com/t/fix-command-on-binary-variables/360 "2023-02-04T22:27:24Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![4er](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.ampl.com/4er/32/530_2.png) [@4er](https://discuss.ampl.com/u/4er)\
**Post date:** [February 6, 2023, 12:23am UTC](https://discuss.ampl.com/t/fix-command-on-binary-variables/360/2 "2023-02-06T00:23:47Z")

</div>

There is no value of t that satisfies “0 \<= t \< 3 && 6 \<= t \<= 11”. I think instead you want to use the || (or) operator:

```auto
fix {i in BusBat,(t,s) in SC: 3 <= t <= 5} e_sd[i,t,s] := 0;
fix {i in BusBat,(t,s) in SC: 0 <= t < 3 || 6 <= t <= 11} e_sd[i,t,s] := 1;

```

---

_[View the full topic](https://discuss.ampl.com/t/fix-command-on-binary-variables/360)._
