cp_trace_search flag in Python binding

105 views
Skip to first unread message

Dirk Schroetter

unread,
Apr 12, 2013, 9:26:35 AM4/12/13
to or-tools...@googlegroups.com
Folks,

just a quick Q as I am debugging my model: Is there a specific reason for the cp_trace_search option not being supported in the Python binding ?

Best Regards,

/Dirk

Laurent Perron

unread,
Apr 12, 2013, 9:37:51 AM4/12/13
to or-tools-discuss
Because I add them manually.

Working on it.

--Laurent

Laurent Perron | Operations Research | lpe...@google.com | (33) 1 42 68 53 00




--
You received this message because you are subscribed to the Google Groups "or-tools-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to or-tools-discu...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Dirk Schroetter

unread,
Apr 12, 2013, 9:40:41 AM4/12/13
to or-tools...@googlegroups.com
Hi Laurent,

that is a very good reason, indeed :-) I was just wondering if you had any specific reason for it and it was a design choice.

Thank you very much for your help and the fix.

Best Regards,

/Dirk

Laurent Perron

unread,
Apr 12, 2013, 9:42:56 AM4/12/13
to or-tools-discuss
Pushed to svn.

Run make clean_python before recompiling.

Thanks

Laurent Perron | Operations Research | lpe...@google.com | (33) 1 42 68 53 00



Dirk Schroetter

unread,
Apr 12, 2013, 9:45:06 AM4/12/13
to or-tools...@googlegroups.com
Hello Laurent,

will give it a try.

Thanks a lot for your help.

Best Regards,

/Dirk

Dirk Schroetter

unread,
Apr 12, 2013, 12:17:06 PM4/12/13
to or-tools...@googlegroups.com
Hi Laurent,

updated to teh latest version and works like a charm - thanks a lot.


Best Regards,

/Dirk

On Friday, April 12, 2013 6:37:51 AM UTC-7, Laurent Perron wrote:

danajf...@gmail.com

unread,
Jun 15, 2013, 1:26:28 PM6/15/13
to or-tools...@googlegroups.com
Hi Dirk (or anyone else available to help),

How exactly are you calling these flags?  Whenever I try to use a -cp_no_solve or -cp_trace_search flag from the commandline, I get: NameError: name 'p_no_solve' is not defined

It looks like they think I'm using a -c flag.  I have all the gflags and python g-flags dependencies installed.  Anyone recognize what I'm doing wrong?

Thanks,
Dana

Laurent Perron

unread,
Jun 15, 2013, 1:57:58 PM6/15/13
to or-tools-discuss
it should be --cp_trace_search, 2 -

Thanks

Laurent Perron | Operations Research | lpe...@google.com | (33) 1 42 68 53 00



danajf...@gmail.com

unread,
Jun 15, 2013, 10:26:32 PM6/15/13
to or-tools...@googlegroups.com
Hi Laurent,

If I do that, I end up getting this message: 

Unknown option: --
Unknown option: --
usage: python [option] ... [-c cmd | -m mod | file | -] [arg] ...
Try `python -h' for more information.  t

Not sure if it matters, but I've made sure that $PYTHONPATH goes to the google-apputils, gflags, and swig directories in the dependencies/sources directory.  Also, I appended a path to constraint_solver in the src directory. 

Thanks for any help,
Dana

Laurent Perron

unread,
Jun 16, 2013, 2:41:33 AM6/16/13
to or-tools-discuss
can you try:

PYTHONPATH=<or-tools>/src python2.7 examples/python/golomb8.py  --cp_trace_search

It works for me.

Thanks

Laurent Perron | Operations Research | lpe...@google.com | (33) 1 42 68 53 00



danajf...@gmail.com

unread,
Jun 16, 2013, 1:55:51 PM6/16/13
to or-tools...@googlegroups.com
Hi Laurent,  

That works.  I was making a silly mistake.  I was putting the flags before file.  Anyhow, this is kind of off topic from this particular post, but I haven't gotten an answer to my post about python and cpviz: is there a way I could do a python equivalent of MakeTreeMonitor to output a cpviz file? 

Thanks for your help,
Dana

Laurent Perron

unread,
Jun 16, 2013, 2:09:20 PM6/16/13
to or-tools-discuss

The c++ API should be accessible from python. Remove the Make prefix, use the resulting search monitor and it should work.

danajf...@gmail.com

unread,
Jun 24, 2013, 6:07:50 PM6/24/13
to or-tools...@googlegroups.com
That worked by the way, thanks.
Reply all
Reply to author
Forward
0 new messages