Hello Forum,

I've been running my model by using the Barrier solver from the CPLEX package. I need to display somehow the progress of my variables in each barrier iteration. Basically, from my set of variables a,b,c (bonded by upper and lower boundaries) I want to see their current value in each iteration. By default, Barrier Log shows the value of my solving variable (Z). Is it possible to display (either in the log or output file) the corresponding variables value in each iteration?

This is an example of my current Log file, here only the objective (solving) variable value is displayed for every single iteration. Again, I need to display values for specific variables.

Number of nonzeros in lower triangle of A*A' = 5640475

Using Nested Dissection ordering

Total time for automatic ordering = 15.66 sec. (10704.70 ticks)

Summary statistics for Cholesky factor:

Threads = 3

Rows in Factor = 1348316

Integer space required = 5227076

Total non-zeros in factor = 28452852

Total FP ops to factor = 2399506370

Itn Primal Obj Dual Obj Prim Inf Upper Inf Dual Inf Inf Ratio

0 6.9701522e+015 -2.6217957e+018 5.88e+011 1.72e+011 7.37e+010 1.00e+000

1 6.5869267e+015 -1.9787580e+018 5.04e+011 1.48e+011 5.57e+010 4.56e-010

2 6.5418387e+015 -1.2189360e+018 4.97e+011 1.46e+011 3.43e+010 2.82e-010

3 6.2116718e+015 -8.5359691e+017 3.38e+011 9.92e+010 2.41e+010 1.92e-010

4 4.2689435e+015 -6.7770141e+017 1.72e+011 5.03e+010 1.91e+010 2.07e-010

5 1.7614126e+015 -1.4292956e+017 5.08e+010 1.49e+010 4.05e+009 5.99e-010

6 9.6962729e+014 -3.7492286e+016 2.05e+010 6.00e+009 1.07e+009 1.19e-009

and so on...

I hope there's a way to do it!,

Regards

## GAMS CPLEX Variable progress in log file

### Re: GAMS CPLEX Variable progress in log file

There is no way to do that in GAMS/Cplex. There might be a barrier callback in the Cplex programming API to get called at every barrier iteration. But remember Cplex works on your presolved model and this variable space aggregates and eliminates variables. I think you are out of luck.

-Michael

-Michael

### Re: GAMS CPLEX Variable progress in log file

Thanks for the reply Michael. In order to apply an additional procedure, I require building sort of a database with all possible (obtainable) model solutions (variables included). I was thinking of somehow extracting the data from every iteration as they are also solutions (thus, not optimal), but since this is not possible, do you might have any idea of how can I obtain this kind of data with GAMS-CPLEX? or how can I possible proceed?bussieck wrote: ↑8 months agoThere is no way to do that in GAMS/Cplex. There might be a barrier callback in the Cplex programming API to get called at every barrier iteration. But remember Cplex works on your presolved model and this variable space aggregates and eliminates variables. I think you are out of luck.

-Michael

Regards,

Tulio

### Re: GAMS CPLEX Variable progress in log file

Tulio,

The "points" in the iteration are *not* (necessarily) solutions. The log column "Prim Inf" tells you how infeasible the current point is. Anyhow, getting alternative solutions to an LP is a tricky questions, because there are an infinite number of them. So often people try to all basic solutions (this is "just" an exponential number in n). So for real sized problems this is also not an option (GAMS Model allbases (https://www.gams.com/latest/gamslib_ml/ ... bases.html) shows how to do this in principle). You need to go back to your motivation of why do you need multiple solution from an LP and select a good method to generate you such solutions (e.g. select k random objective functions and record the solution).

-Michael

The "points" in the iteration are *not* (necessarily) solutions. The log column "Prim Inf" tells you how infeasible the current point is. Anyhow, getting alternative solutions to an LP is a tricky questions, because there are an infinite number of them. So often people try to all basic solutions (this is "just" an exponential number in n). So for real sized problems this is also not an option (GAMS Model allbases (https://www.gams.com/latest/gamslib_ml/ ... bases.html) shows how to do this in principle). You need to go back to your motivation of why do you need multiple solution from an LP and select a good method to generate you such solutions (e.g. select k random objective functions and record the solution).

-Michael