CPLEX solution pool - Can't store/write solutions into solution pool

142 views
Skip to first unread message

del.s...@gmail.com

unread,
May 15, 2016, 7:30:51 AM5/15/16
to AMPL Modeling Language
Hello everybody!

I have a problem with the CPLEX "solution pool" feature, which fails writing its solutions into the solution pool or creating/finding the temporary solution-file.

This is my code:

option solver cplex;
problem Modell_A: ...;

option cplex_options 'poolstub masterpool poolcapacity 10 ';
solve Modell_A;

for {i in 1..Current.npool}
    {
    solution ("masterpool" & i & ".sol");
    display _varname, _var;
    }

And this my error message:

CPLEX 12.6.1.0: poolstub masterpool
poolcapacity 10
can't open masterpool1.sol
CPLEX 12.6.1.0: optimal integer solution; objective 5
1793 MIP simplex iterations
247 branch-and-bound nodes
No basis.
Wrote 0 solutions in solution pool.
Could not open "masterpool1.sol"

suffix npool OUT;

Do you have any hints?

Thanks,
Niko

Robert Fourer

unread,
May 16, 2016, 11:05:24 AM5/16/16
to am...@googlegroups.com
CPLEX writes masterpool1.sol and other solution pool files (if any) to the current folder or directory at the time of the solve. So the "Could not open" error generally indicates that you do not have permission to write files in the current directory. Using command-line AMPL, the current directory is the one you are in when the "ampl" command is given (unless you use the "cd" command in AMPL to explicitly change the current directory later). Using the AMPL IDE, the current directory is the one shown at the top of the file listing in the "Current Directory" window.

Bob Fourer
am...@googlegroups.com

=======
Reply all
Reply to author
Forward
0 new messages