# "All variables fixed;" problem

**URL:** <https://discuss.ampl.com/t/all-variables-fixed-problem/1124>\
**Category:** Support\
**Created:** [June 5, 2024, 9:38pm UTC](https://discuss.ampl.com/t/all-variables-fixed-problem/1124 "2024-06-05T21:38:32Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Farid\_Kashani](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.ampl.com/farid_kashani/32/480_2.png) [@Farid\_Kashani](https://discuss.ampl.com/u/Farid_Kashani)\
**Post date:** [June 5, 2024, 9:38pm UTC](https://discuss.ampl.com/t/all-variables-fixed-problem/1124/1 "2024-06-05T21:38:32Z")

</div>

[benders.run](https://discuss.ampl.com/uploads/short-url/6IQs8VJx1pKw5SB4x3e2y8uOsCE.run) (716 Bytes)  
[benders.mod](https://discuss.ampl.com/uploads/short-url/gOc7KdDpF81gGyT8VHYw6zALgOB.mod) (654 Bytes)  
I have the following code for implementing bender’s decomposition. When I run the code I the loop doesn’t function properly as it seems the variables are fixed for some reason that I am not aware of. Please let me know how I should proceed with debugging.

Thank you.  
[benders.mod](https://discuss.ampl.com/uploads/short-url/gOc7KdDpF81gGyT8VHYw6zALgOB.mod) (654 Bytes)  
[benders.run](https://discuss.ampl.com/uploads/short-url/f1aAqFvTe8kpHW3Ct2XCPrb6oDS.run) (715 Bytes)

---

<div class="post-metadata">

**Author:** ![Farid\_Kashani](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.ampl.com/farid_kashani/32/480_2.png) [@Farid\_Kashani](https://discuss.ampl.com/u/Farid_Kashani)\
**Post date:** [June 6, 2024, 2:35pm UTC](https://discuss.ampl.com/t/all-variables-fixed-problem/1124/2 "2024-06-06T14:35:54Z")

</div>

The problem is solved now. The fixed variable problem occurs because the variables of each problem instance was not defined together with the eqautions.
