[BCP] Multicommodity flow problem

Laszlo Ladanyi ladanyi at us.ibm.com
Mon Apr 13 15:52:08 EDT 2009


Yes it does.

The variables in the formulation must be integer eventually, but when 
a search tree node is processed the integrality requirements are 
relaxed. So when the LP relaxation is solved we need to test whether 
the solution of the LP is a solution to the IP as well. So we get the 
values of x and test whether they are integer...

--Laci

On Mon, 13 Apr 2009, Ashwin wrote:

> Hello,
> I have this question about the example for multicommodity flow
> problem provided in BCP.
> The feasibility test was performed in the function
> test_feasibility(...) and it has the following piece of code.
>
> const double* x = lpres.x();
>    for (i = vars.size()-1; i >= 0; --i) {
>        MCF1_var* v = dynamic_cast<MCF1_var*>(vars[i]);
>        if (!v) continue;
>        std::map<int,double>& f = flows[v->commodity];
>        const int vsize = v->flow.getNumElements();
>        const int* vind = v->flow.getIndices();
>        const double* vval = v->flow.getElements();
>        for (j = 0; j < vsize; ++j) {
>            f[vind[j]] += vval[j]*x[i];
>        }
>    }
>
> Later the value of variable "flows" is checked for integer values.
> Does this mean that it is possible to have fractional x values (x
> being the variable in the formulation)?
>
>
> Thanks in advance.
> Best,
> Ashwin
>
>
>
>
> _______________________________________________
> BCP mailing list
> BCP at list.coin-or.org
> http://list.coin-or.org/mailman/listinfo/bcp
>



More information about the BCP mailing list