Re: R: Re: how show iterations?

View: New views
7 Messages — Rating Filter:   Alert me  

Parent Message unknown Re: R: Re: how show iterations?

by Andrew Makhorin :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> I can see the solution in the output, but I am interested in looking
> at iteratio ns in order to show different behaviours of simplex method
> in several problems,

You can see the simplex iteration count on the terminal:

      0: obj =   6.500000000e+02  infeas =  3.788e+03 (0)
*     2: obj =   4.376770833e+02  infeas =  0.000e+00 (0)
*    10: obj =   2.962166065e+02  infeas =  0.000e+00 (0)
      ^
      |
   Here it is



_______________________________________________
Help-glpk mailing list
Help-glpk@...
http://lists.gnu.org/mailman/listinfo/help-glpk

Re: R: Re: how show iterations?

by Humberto César Brandão de Oliveira :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

How can we show all the iterations?

Humberto Brandao
Federal University of Alfenas - Brazil
[ http://www.bcc.unifal-mg.edu.br/~humberto/ ]

On Sun, Nov 8, 2009 at 12:10 PM, Andrew Makhorin <mao@...> wrote:
> I can see the solution in the output, but I am interested in looking
> at iteratio ns in order to show different behaviours of simplex method
> in several problems,

You can see the simplex iteration count on the terminal:

     0: obj =   6.500000000e+02  infeas =  3.788e+03 (0)
*     2: obj =   4.376770833e+02  infeas =  0.000e+00 (0)
*    10: obj =   2.962166065e+02  infeas =  0.000e+00 (0)
     ^
     |
  Here it is



_______________________________________________
Help-glpk mailing list
Help-glpk@...
http://lists.gnu.org/mailman/listinfo/help-glpk



--
Humberto César Brandão de Oliveira
[ http://www.bcc.unifal-mg.edu.br/~humberto/ ]

Telefone: (35) 3299-1388
Núcleo Ciência da Computação
Departamento de Ciências Exatas
Universidade Federal de Alfenas

_______________________________________________
Help-glpk mailing list
Help-glpk@...
http://lists.gnu.org/mailman/listinfo/help-glpk

Re: R: Re: how show iterations?

by Andrew Makhorin :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> How can we show all the iterations?

What exactly do you need glpsol to show? Please note that glpsol
is *not* a step-by-step solver.



_______________________________________________
Help-glpk mailing list
Help-glpk@...
http://lists.gnu.org/mailman/listinfo/help-glpk

Re: R: Re: how show iterations?

by Humberto César Brandão de Oliveira :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

In my case, I need show in C with GLPK solver (called by glpk.h).
Do there exists any parameter to it?

Humberto Brandao


2009/11/9 Andrew Makhorin <mao@...>
> How can we show all the iterations?

What exactly do you need glpsol to show? Please note that glpsol
is *not* a step-by-step solver.





_______________________________________________
Help-glpk mailing list
Help-glpk@...
http://lists.gnu.org/mailman/listinfo/help-glpk

Re: R: Re: how show iterations?

by Andrew Makhorin :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> In my case, I need show in C with GLPK solver (called by glpk.h).
> Do there exists any parameter to it?

Your question is still unclear.

You can use glpk in two ways. The first way is to use glpsol, the
stand-alone lp/mip solver. In this case you should provide problem
data either in mps or cplex format or write your model in the glpk
modeling language and then run glpsol from the command line to solve
your problem. The second way is to use glpk api that assumes
programming in C or C++. You can find an example C program in the glpk
reference manual included in the package distribution. For more details
please see the reference manual.



_______________________________________________
Help-glpk mailing list
Help-glpk@...
http://lists.gnu.org/mailman/listinfo/help-glpk

Re: R: Re: how show iterations?

by Humberto César Brandão de Oliveira :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I use GLPK with C.

But I need show all iterations.

In your example:

     0: obj =   6.500000000e+02  infeas =  3.788e+03 (0)
*     2: obj =   4.376770833e+02  infeas =  0.000e+00 (0)
*    10: obj =   2.962166065e+02  infeas =  0.000e+00 (0)

Only iterations 0, 2 and 10 are shown.

I need to show all the iterations in my classroom. 0, 1, 2, 3, ..., 10.

Thanks.

--
Humberto César Brandão de Oliveira
[ http://www.bcc.unifal-mg.edu.br/~humberto/ ]

Telefone: (35) 3299-1388
Núcleo Ciência da Computação
Departamento de Ciências Exatas
Universidade Federal de Alfenas

2009/11/9 Andrew Makhorin <mao@...>
> In my case, I need show in C with GLPK solver (called by glpk.h).
> Do there exists any parameter to it?

Your question is still unclear.

You can use glpk in two ways. The first way is to use glpsol, the
stand-alone lp/mip solver. In this case you should provide problem
data either in mps or cplex format or write your model in the glpk
modeling language and then run glpsol from the command line to solve
your problem. The second way is to use glpk api that assumes
programming in C or C++. You can find an example C program in the glpk
reference manual included in the package distribution. For more details
please see the reference manual.





_______________________________________________
Help-glpk mailing list
Help-glpk@...
http://lists.gnu.org/mailman/listinfo/help-glpk

Re: R: Re: how show iterations?

by Andrew Makhorin :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> I use GLPK with C.

> But I need show all iterations.

> In your example:

>      0: obj =   6.500000000e+02  infeas =  3.788e+03 (0)
> *     2: obj =   4.376770833e+02  infeas =  0.000e+00 (0)
> *    10: obj =   2.962166065e+02  infeas =  0.000e+00 (0)

> Only iterations 0, 2 and 10 are shown.

> I need to show all the iterations in my classroom. 0, 1, 2, 3, ..., 10.

glp_smcp parm;
. . .
glp_init_smcp(&parm);
parm.out_frq = 1;
glp_simplex(lp, &parm);
. . .




_______________________________________________
Help-glpk mailing list
Help-glpk@...
http://lists.gnu.org/mailman/listinfo/help-glpk