[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Help-glpk] Re: hi, x1=x2 constraint
From: |
Andrew Makhorin |
Subject: |
[Help-glpk] Re: hi, x1=x2 constraint |
Date: |
Wed, 14 Jan 2004 19:04:50 +0300 |
>x1=x2; how do I add this constraint in GPLK?
>
>I've used column x1 = 1, column x2 = -1, and fixed
>bound = 0. However, it's not working.
...
lpx_add_rows(lp, 1);
i = lpx_get_num_rows(lp);
lpx_set_row_bnds(lp, i, LPX_FX, 0, 0);
ind[1] = j1, val[1] = +1;
ind[2] = j2, val[2] = -1;
lpx_set_mat_row(lp, i, 2 ind, val);
...