Writing the nodelog to a text file

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Writing the nodelog to a text file

varun7rs
Hello All,

I am solving a MILP using JuMP and CPLEX as the underlying solver. I would like to write the solution separately on a .sol file as well as the nodelog during the MILP optimisation onto a .log file. The .sol file could be written by calling getvalue(vars) and then writing them onto the file. But, I am not able to write the nodelog onto the .log file. I earlier used Python for modelling a MILP and I didn't have to call out any functions to write the log file. I want to write the nodelog onto a file using JuMP too and I kindly ask you for your help in this issue.

Thanks in advance

--
You received this message because you are subscribed to the Google Groups "julia-opt" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
Visit this group at https://groups.google.com/group/julia-opt.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Writing the nodelog to a text file

Joaquim Masset Lacombe Dias Garcia
You might need to set a parameter in CPLEX, create some informational callback or wrap some CPLEX function.
Probably you python interface sets some parameter by default or had some default info callback...



Em domingo, 23 de outubro de 2016 18:09:43 UTC-2, [hidden email] escreveu:
Hello All,

I am solving a MILP using JuMP and CPLEX as the underlying solver. I would like to write the solution separately on a .sol file as well as the nodelog during the MILP optimisation onto a .log file. The .sol file could be written by calling getvalue(vars) and then writing them onto the file. But, I am not able to write the nodelog onto the .log file. I earlier used Python for modelling a MILP and I didn't have to call out any functions to write the log file. I want to write the nodelog onto a file using JuMP too and I kindly ask you for your help in this issue.

Thanks in advance

--
You received this message because you are subscribed to the Google Groups "julia-opt" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
Visit this group at https://groups.google.com/group/julia-opt.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Writing the nodelog to a text file

varun7rs
The CPLEX Parameter setting is as follows (in Python)

CPLEX Parameter File Version 12.5.0.0
CPX_PARAM_TILIM 3600
CPX_PARAM_EPGAP 0.01
CPX_PARAM_TRELIM 20000.00
CPX_PARAM_EACHCUTLIM 2100000000
CPX_PARAM_FLOWCOVERS 0
CPX_PARAM_FLOWPATHS 0
CPX_PARAM_CLIQUES 0
CPX_PARAM_DISJCUTS 0
CPX_PARAM_COVERS 0
CPX_PARAM_ZEROHALFCUTS 0
CPX_PARAM_MIRCUTS 0
CPX_PARAM_MCFCUTS 0
CPX_PARAM_IMPLBD 0
CPX_PARAM_GUBCOVERS 0
CPX_PARAM_AGGCUTLIM 3   

But nothing happens if I set the parameters in JuMP the same way.

On Wednesday, 26 October 2016 02:43:53 UTC+2, Joaquim Masset Lacombe Dias Garcia wrote:
You might need to set a parameter in CPLEX, create some informational callback or wrap some CPLEX function.
Probably you python interface sets some parameter by default or had some default info callback...



Em domingo, 23 de outubro de 2016 18:09:43 UTC-2, [hidden email] escreveu:
Hello All,

I am solving a MILP using JuMP and CPLEX as the underlying solver. I would like to write the solution separately on a .sol file as well as the nodelog during the MILP optimisation onto a .log file. The .sol file could be written by calling getvalue(vars) and then writing them onto the file. But, I am not able to write the nodelog onto the .log file. I earlier used Python for modelling a MILP and I didn't have to call out any functions to write the log file. I want to write the nodelog onto a file using JuMP too and I kindly ask you for your help in this issue.

Thanks in advance

--
You received this message because you are subscribed to the Google Groups "julia-opt" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
Visit this group at https://groups.google.com/group/julia-opt.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Writing the nodelog to a text file

varun7rs
I found an open issue on Github related to the problem I have https://github.com/JuliaOpt/CPLEX.jl/issues/42
I tried the first part of the suggestion (Joey's) before calling the solver

JuMP.build(m)
intm = internalmodel(m).inner
CPLEX.set_logfile(intm.env, "myoutput.txt")

but I get an error saying MethodError: no method matching unsafe_convert(::Type{Ptr}{Void}}, ::CPLEX,Env)



On Wednesday, 26 October 2016 07:19:12 UTC+2, [hidden email] wrote:
The CPLEX Parameter setting is as follows (in Python)

CPLEX Parameter File Version 12.5.0.0
CPX_PARAM_TILIM 3600
CPX_PARAM_EPGAP 0.01
CPX_PARAM_TRELIM 20000.00
CPX_PARAM_EACHCUTLIM 2100000000
CPX_PARAM_FLOWCOVERS 0
CPX_PARAM_FLOWPATHS 0
CPX_PARAM_CLIQUES 0
CPX_PARAM_DISJCUTS 0
CPX_PARAM_COVERS 0
CPX_PARAM_ZEROHALFCUTS 0
CPX_PARAM_MIRCUTS 0
CPX_PARAM_MCFCUTS 0
CPX_PARAM_IMPLBD 0
CPX_PARAM_GUBCOVERS 0
CPX_PARAM_AGGCUTLIM 3   

But nothing happens if I set the parameters in JuMP the same way.

On Wednesday, 26 October 2016 02:43:53 UTC+2, Joaquim Masset Lacombe Dias Garcia wrote:
You might need to set a parameter in CPLEX, create some informational callback or wrap some CPLEX function.
Probably you python interface sets some parameter by default or had some default info callback...



Em domingo, 23 de outubro de 2016 18:09:43 UTC-2, [hidden email] escreveu:
Hello All,

I am solving a MILP using JuMP and CPLEX as the underlying solver. I would like to write the solution separately on a .sol file as well as the nodelog during the MILP optimisation onto a .log file. The .sol file could be written by calling getvalue(vars) and then writing them onto the file. But, I am not able to write the nodelog onto the .log file. I earlier used Python for modelling a MILP and I didn't have to call out any functions to write the log file. I want to write the nodelog onto a file using JuMP too and I kindly ask you for your help in this issue.

Thanks in advance

--
You received this message because you are subscribed to the Google Groups "julia-opt" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
Visit this group at https://groups.google.com/group/julia-opt.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Writing the nodelog to a text file

Joaquim Masset Lacombe Dias Garcia
Could you post the complete error message?

And you might try doing Pkg.update() (and  if it does not work do Pkg.checkout("CPLEX") ), just to be sure it wasn't already fixed...

Sorry I can't give much help (I don't have CPLEX currently).

The function code seems to be ok in https://github.com/JuliaOpt/CPLEX.jl/blob/v0.1.7/src/cpx_env.jl

Em quarta-feira, 26 de outubro de 2016 07:44:35 UTC-2, [hidden email] escreveu:
I found an open issue on Github related to the problem I have<a href="https://github.com/JuliaOpt/CPLEX.jl/issues/42" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2FJuliaOpt%2FCPLEX.jl%2Fissues%2F42\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFRGzVQ9N39vCtf52erFztuwq71rw&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2FJuliaOpt%2FCPLEX.jl%2Fissues%2F42\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFRGzVQ9N39vCtf52erFztuwq71rw&#39;;return true;"> https://github.com/JuliaOpt/CPLEX.jl/issues/42
I tried the first part of the suggestion (Joey's) before calling the solver

JuMP.build(m)
intm = internalmodel(m).inner
CPLEX.set_logfile(intm.env, "myoutput.txt")

but I get an error saying MethodError: no method matching unsafe_convert(::Type{Ptr}{Void}}, ::CPLEX,Env)



On Wednesday, 26 October 2016 07:19:12 UTC+2, [hidden email] wrote:
The CPLEX Parameter setting is as follows (in Python)

CPLEX Parameter File Version 12.5.0.0
CPX_PARAM_TILIM 3600
CPX_PARAM_EPGAP 0.01
CPX_PARAM_TRELIM 20000.00
CPX_PARAM_EACHCUTLIM 2100000000
CPX_PARAM_FLOWCOVERS 0
CPX_PARAM_FLOWPATHS 0
CPX_PARAM_CLIQUES 0
CPX_PARAM_DISJCUTS 0
CPX_PARAM_COVERS 0
CPX_PARAM_ZEROHALFCUTS 0
CPX_PARAM_MIRCUTS 0
CPX_PARAM_MCFCUTS 0
CPX_PARAM_IMPLBD 0
CPX_PARAM_GUBCOVERS 0
CPX_PARAM_AGGCUTLIM 3   

But nothing happens if I set the parameters in JuMP the same way.

On Wednesday, 26 October 2016 02:43:53 UTC+2, Joaquim Masset Lacombe Dias Garcia wrote:
You might need to set a parameter in CPLEX, create some informational callback or wrap some CPLEX function.
Probably you python interface sets some parameter by default or had some default info callback...



Em domingo, 23 de outubro de 2016 18:09:43 UTC-2, [hidden email] escreveu:
Hello All,

I am solving a MILP using JuMP and CPLEX as the underlying solver. I would like to write the solution separately on a .sol file as well as the nodelog during the MILP optimisation onto a .log file. The .sol file could be written by calling getvalue(vars) and then writing them onto the file. But, I am not able to write the nodelog onto the .log file. I earlier used Python for modelling a MILP and I didn't have to call out any functions to write the log file. I want to write the nodelog onto a file using JuMP too and I kindly ask you for your help in this issue.

Thanks in advance

--
You received this message because you are subscribed to the Google Groups "julia-opt" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
Visit this group at https://groups.google.com/group/julia-opt.
For more options, visit https://groups.google.com/d/optout.