[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Help-glpk] reduced cost fixing
From: |
andre camatta |
Subject: |
[Help-glpk] reduced cost fixing |
Date: |
Mon, 9 Feb 2004 13:35:32 -0300 (ART) |
Hi,
I am wondering whether any variable fixing operation
has been done
at the nodes of branch and bound mip solver. Or it's
just a normal
branch
and bound framework based on the lp solver. How the
branching variables
are chosen in this implementation?
thanks,
-shubhashis
Reduced cost fixing (IOS framework, only Binary MIP):
#include "glpk.h"
void reduced_cost_fixing (IOS *ios)
{
int i, n, tagx;
double zi, vx, dx, tol = 1e-6;
n = ios_get_num_cols (ios);
zi = ios->lp_obj;
for (i = 1; i <= n; i++)
{
tagx = ios_get_col_soln(ios, i, &vx , &dx);
if (tagx != IET_BS && tagx != IET_NS &&
ios_get_col_kind(ios, i) == IOS_INT)
{
if (vx < tol && vx > -tol && ios->best - zi < dx)
{
ios_set_col_bnds(ios, i, IOS_FX, 0.0, 0.0);
}
else if (vx < 1 + tol && vx > 1 - tol && zi -
ios->best > dx)
{
ios_set_col_bnds(ios, i, IOS_FX, 1.0, 1.0);
}
}
}
ios->p_stat == IOS_FEAS;
ios->d_stat == IOS_FEAS;
return;
}
In the application procedure:
switch (ios->event)
{
...
case IOS_V_BRANCH:
if (ios->found == 1)
reduced_cost_fixing (ios);
branching (ios);
...
}
My procedure need improvements and tests.
André Camatta
______________________________________________________________________
Yahoo! GeoCities: 15MB de espaço grátis para criar seu web site!
http://br.geocities.yahoo.com/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Help-glpk] reduced cost fixing,
andre camatta <=