CBC parameters

1,480 views
Skip to first unread message

George DeLendonck

unread,
May 7, 2011, 12:06:26 PM5/7/11
to pulp-or...@googlegroups.com
I am a new user of Pulp. First I need to thank you guys for coming up with this tool. I found it be extremely intuitive and easy to use.
I have done two projects with it. I have got very good results with CBC. The only issue I have so far is that in some cases CBC takes a long time and I would like to be able to limit the run time. Could you tell me how I could pass some parameter to CBC to limit run time? Thank you very much for your help.

George deLendonck
geo...@atrenta.com

________________________________

NOTE: This message and its attachments are intended only for the individual or
entity to which it is addressed and may contain confidential information or
forward-looking statements regarding product development. Forward-looking
statements are subject to change at Atrenta's sole discretion and Atrenta will have
no liability for the delay or failure to deliver any product or feature mentioned in
such forward-looking statements.

Fernando Badilla Veliz

unread,
May 7, 2011, 1:40:00 PM5/7/11
to pulp-or...@googlegroups.com
Hi

To pass some parameters to the solver, they usually go in the solve() statement. For CBC, as you can browse in the source code (PuLP-1.4.7/src/pulp):

class COIN_CMD(LpSolver_CMD):
    """The COIN CLP/CBC LP solver
    now only uses cbc
    """

    def defaultPath(self):
        return self.executableExtension(cbc_path)

    def __init__(self, path = None, keepFiles = 0, mip = 1,
            msg = 0, cuts = None, presolve = None, dual = None,
            strong = None, options = [],
            fracGap = None, maxSeconds = None, threads = None)

You got plenty of options... I have succesfully tried these ones:

model.solve(COIN(threads=2,fracGap=0.001,msg=1,options=['sec','500']))

fracGap is like a mipgap tolerance termination.
and options=['sec','500'] is for time termination.

Hope that helps!
fbv


--
You received this message because you are subscribed to the Google Groups "pulp-or-discuss" group.
To post to this group, send email to pulp-or...@googlegroups.com.
To unsubscribe from this group, send email to pulp-or-discu...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/pulp-or-discuss?hl=en.




--
cellphone 056 9 93099326
home 056 2 4942633
www.cec.uchile.cl/~fbadilla

George DeLendonck

unread,
May 7, 2011, 1:56:37 PM5/7/11
to pulp-or...@googlegroups.com
thank you Fernando. I will try that.

George

________________________________________
From: pulp-or...@googlegroups.com [pulp-or...@googlegroups.com] On Behalf Of Fernando Badilla Veliz [fernand...@gmail.com]
Sent: Saturday, May 07, 2011 1:40 PM
To: pulp-or...@googlegroups.com
Subject: Re: CBC parameters

Hi

To pass some parameters to the solver, they usually go in the solve() statement. For CBC, as you can browse in the source code (PuLP-1.4.7/src/pulp):

class COIN_CMD(LpSolver_CMD):
"""The COIN CLP/CBC LP solver
now only uses cbc
"""

def defaultPath(self):
return self.executableExtension(cbc_path)

def __init__(self, path = None, keepFiles = 0, mip = 1,
msg = 0, cuts = None, presolve = None, dual = None,
strong = None, options = [],
fracGap = None, maxSeconds = None, threads = None)

You got plenty of options... I have succesfully tried these ones:

model.solve(COIN(threads=2,fracGap=0.001,msg=1,options=['sec','500']))

fracGap is like a mipgap tolerance termination.
and options=['sec','500'] is for time termination.

Hope that helps!
fbv

On Sat, May 7, 2011 at 12:06 PM, George DeLendonck <geo...@atrenta.com<mailto:geo...@atrenta.com>> wrote:
I am a new user of Pulp. First I need to thank you guys for coming up with this tool. I found it be extremely intuitive and easy to use.
I have done two projects with it. I have got very good results with CBC. The only issue I have so far is that in some cases CBC takes a long time and I would like to be able to limit the run time. Could you tell me how I could pass some parameter to CBC to limit run time? Thank you very much for your help.

George deLendonck
geo...@atrenta.com<mailto:geo...@atrenta.com>

________________________________

NOTE: This message and its attachments are intended only for the individual or
entity to which it is addressed and may contain confidential information or
forward-looking statements regarding product development. Forward-looking
statements are subject to change at Atrenta's sole discretion and Atrenta will have
no liability for the delay or failure to deliver any product or feature mentioned in
such forward-looking statements.

--
You received this message because you are subscribed to the Google Groups "pulp-or-discuss" group.

To post to this group, send email to pulp-or...@googlegroups.com<mailto:pulp-or...@googlegroups.com>.
To unsubscribe from this group, send email to pulp-or-discu...@googlegroups.com<mailto:pulp-or-discuss%2Bunsu...@googlegroups.com>.


For more options, visit this group at http://groups.google.com/group/pulp-or-discuss?hl=en.


--
cellphone 056 9 93099326
home 056 2 4942633

www.cec.uchile.cl/~fbadilla<http://www.cec.uchile.cl/~fbadilla>

George DeLendonck

unread,
May 7, 2011, 3:27:43 PM5/7/11
to pulp-or...@googlegroups.com
Hi Fernando,

I tried something slightly different from what you gave me because in my case the coin dll was called. Anyway thanks for the tip.
I am really impressed with Pulp and CBC.

George


________________________________________
From: pulp-or...@googlegroups.com [pulp-or...@googlegroups.com] On Behalf Of Fernando Badilla Veliz [fernand...@gmail.com]
Sent: Saturday, May 07, 2011 1:40 PM
To: pulp-or...@googlegroups.com
Subject: Re: CBC parameters

Hi

To pass some parameters to the solver, they usually go in the solve() statement. For CBC, as you can browse in the source code (PuLP-1.4.7/src/pulp):

class COIN_CMD(LpSolver_CMD):
"""The COIN CLP/CBC LP solver
now only uses cbc
"""

def defaultPath(self):
return self.executableExtension(cbc_path)

def __init__(self, path = None, keepFiles = 0, mip = 1,
msg = 0, cuts = None, presolve = None, dual = None,
strong = None, options = [],
fracGap = None, maxSeconds = None, threads = None)

You got plenty of options... I have succesfully tried these ones:

model.solve(COIN(threads=2,fracGap=0.001,msg=1,options=['sec','500']))

fracGap is like a mipgap tolerance termination.
and options=['sec','500'] is for time termination.

Hope that helps!
fbv

On Sat, May 7, 2011 at 12:06 PM, George DeLendonck <geo...@atrenta.com<mailto:geo...@atrenta.com>> wrote:
I am a new user of Pulp. First I need to thank you guys for coming up with this tool. I found it be extremely intuitive and easy to use.
I have done two projects with it. I have got very good results with CBC. The only issue I have so far is that in some cases CBC takes a long time and I would like to be able to limit the run time. Could you tell me how I could pass some parameter to CBC to limit run time? Thank you very much for your help.

George deLendonck
geo...@atrenta.com<mailto:geo...@atrenta.com>

________________________________

NOTE: This message and its attachments are intended only for the individual or
entity to which it is addressed and may contain confidential information or
forward-looking statements regarding product development. Forward-looking
statements are subject to change at Atrenta's sole discretion and Atrenta will have
no liability for the delay or failure to deliver any product or feature mentioned in
such forward-looking statements.

--
You received this message because you are subscribed to the Google Groups "pulp-or-discuss" group.

To post to this group, send email to pulp-or...@googlegroups.com<mailto:pulp-or...@googlegroups.com>.
To unsubscribe from this group, send email to pulp-or-discu...@googlegroups.com<mailto:pulp-or-discuss%2Bunsu...@googlegroups.com>.


For more options, visit this group at http://groups.google.com/group/pulp-or-discuss?hl=en.


--
cellphone 056 9 93099326
home 056 2 4942633

www.cec.uchile.cl/~fbadilla<http://www.cec.uchile.cl/~fbadilla>

Reply all
Reply to author
Forward
0 new messages