help-glpk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-glpk] Branch and cut tree representation.


From: Guerino Iacobucci
Subject: Re: [Help-glpk] Branch and cut tree representation.
Date: Wed, 24 Feb 2010 14:26:55 +0100

Hi everyone,
i'm thinking to add into the struct 

struct IOSNPD

a new field named unique_id  into the header file glpios.h 

Another question, wher i can add the implementation of the function
int glp_ios_unique_id_node(glp_tree *T, int p);

Which this new field and new function i could give a name for each node and i can build the tree.
Is it a silly idea?




2010/2/24 Guerino Iacobucci <address@hidden>
Hi Mr. Makhorin,
i'm just thinking which i can comment this code line which call the function :

      ios_delete_node(tree, p);

in this point:

fath: /* the current subproblem has been fathomed */
      if (tree->parm->msg_lev >= GLP_MSG_DBG)
         xprintf("Node %d fathomed\n", p);
      /* freeze the current subproblem */
      ios_freeze_node(tree);
      /* and prune the corresponding branch of the tree */
      ios_delete_node(tree, p);    <------###########
      /* if a new integer feasible solution has just been found, other
         branches may become hopeless and therefore should be pruned */
      if (mip->mip_stat == GLP_FEAS) cleanup_the_tree(tree);


if i do that there are side effects or it is the right way?

Excuse me for my ignorance but i really don't understand by reading the reference how and which parameter 
i can give to the callback function, could you give an example?

Kind Regards,
IG


2010/2/24 Andrew Makhorin <address@hidden>
> Well, there is any way to obtain the entire list of nodes and build
> the tree?

Currently such a feature is not supported.

> Is possible to modify the B C api #39;s to obtain that list?

In principle, yes. You can trace each new node of the tree in the
the callback routine specifying it in the parameter list passed to
glp_intopt. For more details please see the glpk reference manual
included in the distribution.

Another way is to patch the glpk source code (see the routine
ios_driver in file src/glpios03.c). See also the BAK package
developed by Brady Hunsaker, which allows visualizing the search
tree for three mip solvers including glpk:
http://www.rosemaryroad.org/brady/software/index.html




reply via email to

[Prev in Thread] Current Thread [Next in Thread]