# RHS and LHS inconsistency in indexing over constraints

**URL:** https://discourse.julialang.org/t/rhs-and-lhs-inconsistency-in-indexing-over-constraints/41409
**Category:** Optimization (Mathematical)
**Tags:** question, jump
**Created:** [June 14, 2020, 9:17pm UTC](https://discourse.julialang.org/t/rhs-and-lhs-inconsistency-in-indexing-over-constraints/41409 "2020-06-14T21:17:13Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![odow](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/odow/32/28685_2.png) [@odow](https://discourse.julialang.org/u/odow)
#### Post date: [June 15, 2020, 12:16am UTC](https://discourse.julialang.org/t/rhs-and-lhs-inconsistency-in-indexing-over-constraints/41409/2 "2020-06-15T00:16:22Z")

</div>

x-ref: [Constraint macro RHS and LHS with length(dict[i]) command returns different values · Issue #2254 · jump-dev/JuMP.jl · GitHub](https://github.com/jump-dev/JuMP.jl/issues/2254)

You should read: [Please read: make it easier to help you - #19](https://discourse.julialang.org/t/psa-make-it-easier-to-help-you/14757/19). In particular, it’s easier to help if you can provide a small example that we can copy-paste, rather than downloading and extracting a zip from a different site.

I’ll repeat my suggestion from the JuMP issue for posterity:

> `sum(x[k] for k in omega[j])` probably includes `x[j]` . Which would account for the extra coefficient in front of `x[j]` .

---

_[View the full topic](https://discourse.julialang.org/t/rhs-and-lhs-inconsistency-in-indexing-over-constraints/41409)._
