[Coin-bcpdiscuss] Handling user defined statistics

Laszlo Ladanyi ladanyi at us.ibm.com
Sun Aug 26 22:19:17 EDT 2007


Hi Ali,

What you do in the individual BCP_lp_user_class is just fine. The problem is
that there is no method to send that information back to the TM :-(. I can add
such a callback easily sometime next week (maybe later during the week...). Or
if you feel like tinkering with it, just create a new virtual user method in
the BCP_lp_user class and invoke it in the 'case BCP_Msg_FinishedBCP' in
BCP_lp_prob::process_message() (and a corresponding method in the BCP_tm_user
class and invoke it in BCP_tm_wrapup() in BCP_tm_statistics.cpp). That way you
can collect your stats from all procs and in the display_final_information you
can print whatever you want.

I definitely will add such a method, just it may take time for me to test it
properly before releasing it into the wild :-).

--Laci

On Sun, 26 Aug 2007 alikoc at mail.utexas.edu wrote:

> Hi all,
> 
> I am trying to figure out how we keep (and print) some statistics other than BCP
> does. Some example statistics are:
> - Just printing the LP solution of the root node (to compare the LP duality gap
> vs. column generation dualit gap).
> - Print the total time elapsed at each level of the search tree
> - Print the toal number of iterations performed at each level of the search tree
> - Print the dual variables for each iteration of the root node (to see the
> tailing off effect)
> 
> And a number of others... Storing the data is not a big deal for me. I am using
> local arrays in the BCP_lp_user class, and storing the data. For instance for
> the second statistis above, I am initiliazing the time at
> 'initialize_search_tree_node()' method and finilizing after, say,
> 'compute_lower_bound()' method. And I am adding that time to corresponding
> index of the local array. I can do all the other statistics in a similar
> fashion. But the thing is, we get to combine all local arrays from the
> BCP_lp_user classes, accumulate the data and print it. For instance, more than
> one BCP_lp_user_class might have data for the level 10. So we get to sum them
> up in the, I guess,  BCP_tm_user class, and print it in, say,
> 'display_final_information()' method.
> 
> I guess my question boils down to 'how do I send the data from BCP_lp_user class
> to BCP_tm_user class (and vica versa, if I need the latest update of some
> statistics in the BCP_lp_user class to dynamically update my algorithm, I need
> to get that information from BCP_tm_user class)? An equally important questions
> is, in which method of both classes do I send/receive that information?
> 
> Also, if there is some other way completely different than what I am on, I will
> be glad to learn.
> 
> I appreciate any help.
> 
> Thanks,
> 
> Ali
> _______________________________________________
> Coin-bcpdiscuss mailing list
> Coin-bcpdiscuss at list.coin-or.org
> http://list.coin-or.org/mailman/listinfo/coin-bcpdiscuss
> 




More information about the Coin-bcpdiscuss mailing list