I’m working on a large-scale LP problem in AMPL, structured as follows:
reset;
model ETEM.mod;
data _EtemData.txt;
data SAS_modification.txt;
option solver amplcplex;
option cplex_options 'display=1 clocktype=2 startalgorithm=4';
solve;
The problem has 2,615,940 variables and 2,368,400 constraints. To speed up the process, I’ve attempted several strategies:
Upgrading the computer’s hardware.
Switching the algorithm in CPLEX from 1 to 4 (barrier method).
Decreasing the number of variables and constraints.
Despite these efforts, it still requires 6 to 10 hours to complete. I’m seeking advice on reducing the computation time.
Could you suggest any methods to make it run faster? Additionally, would utilizing a warm start be beneficial, and if so, how can I generate a .dat file for a problem of this magnitude?
Then copy all of the output into a text file, and attach the file to your reply. (To create an attachment, click on the upload icon in the Discourse editor window.)
Thank you for your advice. I’ve attached the initial part of the run, as it lasts about 8 hours and I’m not continuously connected to the server. Please inform me if additional information is required.
Additionally, I have a question regarding the warm start. I’ve experimented with various formats for the warm start file. Could you advise which format the variable values should follow:
let VAR_COM ['1','H0','MTL', 'AGRTECH','LFO']:=0.006377
activity ['1','H0','MTL','AGRTECH'] := 0.339210?
If you have any examples, could you kindly share them so I can understand the format better?
Any of the methods of specifying data values for AMPL params can also be used to specify values for the variables — which will be used in a warmstart. Thus one possibility is to use “let” statements as in your option 1 (with a ; at the end of each statement). But that can get tedious; you can alternatively use, for example, the AMPL .dat file format, with the keyword “param” replaced by “var”.
Warmstarts are not as useful for linear programming as one might think, however, especially for the barrier method. So that we can provide more specific advice, can you also show the last 100 or so lines of the listing?
which avoids some system overhead by running only the dual simplex method. (Because you have no integer variables, the mipdisplay=2 and startalgorithm=4 options are ignored.)
Also try running with different settings of CPLEX’s dgradient option:
dgradient Pricing algorithm for dual simplex (default 0):
0 = choose automatically
1 = standard dual pricing
2 = steepest-edge pricing
3 = steepest-edge pricing in slack space
4 = steepest-edge with unit initial norms
5 = devex pricing.
These offer different tradeoffs between time per iteration and number of iterations, and sometimes one of them works substantially better than CPLEX’s automatic choice (which is the default).