Hi,
this works fine on my machine.
If I use
main{
thisOplModel.generate();
var n=7000;
var i=0;
cp.startNewSearch();
while
(cp.next() && (i<=n)) {thisOplModel.postProcess(); i++; writeln(i); }
}
I get
6997
[43 100 153 153]
6998
[43 92 153 153]
6999
[43 112 153 153]
7000
[43 111 153 153]
7001
So what you could do is:
- use a more powerful machine
- use oplrun instead of the IDE
- try to use only 1 worker
main{
cp.param.workers=1;
thisOplModel.generate();
var n=7000;
var i=0;
cp.startNewSearch();
while
(cp.next() && (i<=n)) {thisOplModel.postProcess(); i++; writeln(i); }
}
------------------------------
[Alex] [Fleischer]
[Data and AI Technical Sales]
[IBM]
------------------------------
Original Message:
Sent: Wed June 22, 2022 09:11 AM
From: Akshat Bansal
Subject: CP Model: Oplide becomes unresponsive while printing solutions
Thanks for a quick response!
I changed the main block in the model and set the value of n as 7000. I guess the solver generated all the feasible solutions; however, it then became unresponsive (screenshot attached). Thus, I could not access the solutions in the scripting log.
Regards,
Akshat
------------------------------
Akshat Bansal
Original Message:
Sent: Wed June 22, 2022 01:58 AM
From: ALEX FLEISCHER
Subject: CP Model: Oplide becomes unresponsive while printing solutions
Hi
if you change your main into
main{thisOplModel.generate();var n=100;var i=0;cp.startNewSearch();while(cp.next() && (i<=n)) {thisOplModel.postProcess(); i++; }}
OPL will stop after 100 solutions. (In a few seconds)
You can change n for more.
regards
------------------------------
[Alex] [Fleischer]
[Data and AI Technical Sales]
[IBM]
Original Message:
Sent: Mon June 20, 2022 01:03 AM
From: Akshat Bansal
Subject: CP Model: Oplide becomes unresponsive while printing solutions
Hi,
I, Akshat, am a student at the Indian Institute of Technology Bombay, working on a university project involving CPLEX Optimization Studio 22.1.0 (academic).
I'm facing an issue retrieving all the feasible solutions to the constraint programming model formulated in the studio, as the Oplide becomes unresponsive while printing the solutions in the scripting log tab.
Device specification: macOS Monterey, 8GB RAM, 1.8GHz Dual-Core Intel i5 processor
I'm attaching the model and data file for anyone who wants to reproduce the issue.
I would greatly appreciate any lead to this issue. Thanks!
------------------------------
Akshat Bansal
------------------------------