# Forcing inequallity in DAE

**URL:** https://discourse.julialang.org/t/forcing-inequallity-in-dae/102205
**Category:** Machine Learning
**Created:** [July 28, 2023, 4:55pm UTC](https://discourse.julialang.org/t/forcing-inequallity-in-dae/102205 "2023-07-28T16:55:39Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![tommy\_J](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tommy_j/32/51703_2.png) [@tommy\_J](https://discourse.julialang.org/u/tommy_J)
#### Post date: [July 28, 2023, 4:55pm UTC](https://discourse.julialang.org/t/forcing-inequallity-in-dae/102205/1 "2023-07-28T16:55:39Z")

</div>

Hello everyone,

I am trying to understand DAE example in [here](https://docs.sciml.ai/DiffEqDocs/stable/tutorials/dae_example/).

I would like to ask the following: In the example, the constraint used is: 1 = y\_1 + y\_2 + y\_3.

Is is also possible to enforce that y\_1, y\_2, y\_3 \geq 0?

Is so, how?

---

<div class="post-metadata">

### Author: ![contradict](https://avatars.discourse-cdn.com/v4/letter/c/ac91a4/32.png) [@contradict](https://discourse.julialang.org/u/contradict)
#### Post date: [July 28, 2023, 10:32pm UTC](https://discourse.julialang.org/t/forcing-inequallity-in-dae/102205/2 "2023-07-28T22:32:34Z")

</div>

I think the DAE machinery is only for equality constraints, but there are several methods for keeping states positive in the [documentation](https://docs.sciml.ai/DiffEqDocs/stable/basics/faq/#My-ODE-goes-negative-but-should-stay-positive,-what-tools-can-help?).
