# \[AMPL 24680\] AMPL / Python - Performance & Memory issue

**URL:** <https://discuss.ampl.com/t/ampl-24680-ampl-python-performance-memory-issue/596>\
**Category:** Google Group Mirror\
**Created:** [June 4, 2023, 9:42am UTC](https://discuss.ampl.com/t/ampl-24680-ampl-python-performance-memory-issue/596 "2023-06-04T09:42:13Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Stephane](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.ampl.com/stephane/32/318_2.png) [@Stephane](https://discuss.ampl.com/u/Stephane)\
**Post date:** [June 4, 2023, 9:42am UTC](https://discuss.ampl.com/t/ampl-24680-ampl-python-performance-memory-issue/596/1 "2023-06-04T09:42:13Z")

</div>

I’ve writen a simple model that optimize item location assignment for a warehouse of 30 000 locations.

My code works with 3 items and gurobi or cplex, but :

- With CBC : Not working after 1 minutes even with only 3 items …
- With Highs : Error -1 for call Highs\_passH
- With 3000 items and with Gurobi or Cplex : Unexpected end of file while reading AMPL output.

But it’s a so simple model, and data are not huge. Can you help me ?

May be also due to prev\_loc, I want to add additional cost if we need to move so change location.  
May be i need to initalize it

[example.mod](https://discuss.ampl.com/uploads/short-url/4xhnwu3mrdmAxsryFl3VltlK1Ro.mod) (32.6 KB)

---

<div class="post-metadata">

**Author:** ![AMPL\_Google\_Group](https://avatars.discourse-cdn.com/v4/letter/a/9dc877/32.png) [@AMPL\_Google\_Group](https://discuss.ampl.com/u/AMPL_Google_Group)\
**Post date:** [June 5, 2023, 11:26am UTC](https://discuss.ampl.com/t/ampl-24680-ampl-python-performance-memory-issue/596/2 "2023-06-05T11:26:43Z")

</div>

This was answered in our new user forum at: [https://discuss.ampl.com/t/performance-memory-issue/595](https://discuss.ampl.com/t/performance-memory-issue/595)
