# \[AMPL 24469\] how to access solutions in the solution pool

**URL:** https://discuss.ampl.com/t/ampl-24469-how-to-access-solutions-in-the-solution-pool/310
**Category:** Google Group Mirror
**Created:** [January 13, 2023, 3:21pm UTC](https://discuss.ampl.com/t/ampl-24469-how-to-access-solutions-in-the-solution-pool/310 "2023-01-13T15:21:53Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Pietro\_Silvestri](https://avatars.discourse-cdn.com/v4/letter/p/f17d59/32.png) [@Pietro\_Silvestri](https://discuss.ampl.com/u/Pietro_Silvestri)
#### Post date: [January 13, 2023, 3:21pm UTC](https://discuss.ampl.com/t/ampl-24469-how-to-access-solutions-in-the-solution-pool/310/1 "2023-01-13T15:21:53Z")

</div>

Hi to everyone  
I am trying to solve a Travelling Salesman Problem using the Matlab API of AMPL. I interested not only to the optimal solution, but also to the suboptimal ones and, as CPLEX allows to save many of them in the solution pool, I properly set the cplex\_options and I got man .sol files. My question is how can I get the values of these solutions in the Matlab environment, as the command solution doesn’t seem to work ?

Thank you in advance

Pietro

---

<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: [January 13, 2023, 4:50pm UTC](https://discuss.ampl.com/t/ampl-24469-how-to-access-solutions-in-the-solution-pool/310/2 "2023-01-13T16:50:45Z")

</div>

Hi Pietro.

How are you invoking to use the solution command? The following commands gives you some error?

ampl.eval(‘solution filename.sol;’)

---

<div class="post-metadata">

### Author: ![Pietro\_Silvestri](https://avatars.discourse-cdn.com/v4/letter/p/f17d59/32.png) [@Pietro\_Silvestri](https://discuss.ampl.com/u/Pietro_Silvestri)
#### Post date: [January 13, 2023, 7:43pm UTC](https://discuss.ampl.com/t/ampl-24469-how-to-access-solutions-in-the-solution-pool/310/3 "2023-01-13T19:43:19Z")

</div>

Hi  
Thank you so much for the answer. The command works properly, I was invoking it in the wrong way.

Thank you again

Pietro
