[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-glpk] Problem in the MIP problem
From: |
Andrew Makhorin |
Subject: |
Re: [Bug-glpk] Problem in the MIP problem |
Date: |
Fri, 17 Oct 2008 16:10:16 +0300 |
> I don't use functions glp_read_lp or glp_read_cpxlp.
> And, I use GLP_FX (not GLP_DB) to fix bounds for the first variable.
> So, I don't understand.
> And, when I use lpx_write_cpxlp, I obtain this result.
> The problem is that variables aren't integer and the first variable bound is
> displayed as 1 <= Yi0_copy <= 1
It is strange, because glp_write_lp (lpx_write_cpxlp) writes fixed
variables as <varname> = <fixed value>; it writes both bounds only if
the variable is double-bounded.
Could you check your code more carefully?
> It is surprising because, when I use get_get_col_kind, variables are
> integers.
All variables are integer as indicated by 'generals'.
> PS: I use GLPK 4.28. I can try to use the last version.
> \* Problem: spConf_ *\
> Minimize
> Objectif: - 11.6666666666667 Yi0_copy - 11.6666666666667 Yi1_copy
> - 5 Yi2_copy - 5 Yi3_copy - 2.7 Yi4_copy - 4.6 Yi5_copy - 4.6 Yi6_copy
> - 4.6 Yi7_copy - 21.5 Yi8_copy - 21.5 Yi9_copy
> Subject To
> RTBH____: + 9 Yi9_copy + 9 Yi8_copy + 4 Yi7_copy + 4 Yi6_copy
> + 4 Yi5_copy + 2 Yi4_copy + 2 Yi3_copy + 2 Yi2_copy + 7 Yi1_copy
> + 7 Yi0_copy <= 10
> Bounds
> 1 <= Yi0_copy <= 1
> 0 <= Yi1_copy <= 1
> 0 <= Yi2_copy <= 1
> 0 <= Yi3_copy <= 1
> 0 <= Yi4_copy <= 1
> 0 <= Yi5_copy <= 1
> 0 <= Yi6_copy <= 1
> 0 <= Yi7_copy <= 1
> 0 <= Yi8_copy <= 1
> 0 <= Yi9_copy <= 1
> Generals
> Yi0_copy
> Yi1_copy
> Yi2_copy
> Yi3_copy
> Yi4_copy
> Yi5_copy
> Yi6_copy
> Yi7_copy
> Yi8_copy
> Yi9_copy
> End
> Andrew Makhorin wrote:
>>
>>> in particular, in the cplex lp file Yi0_copy should be
>>> specified as follows:
>>
>>> Bounds
>>> Yi0_copy = 1
>>
>> This is not necessary, because glp_read_lp correctly set the types
>> of variables having identical lower and upper bounds to GLP_FX.
>>
>>
>>
>> _______________________________________________
>> Bug-glpk mailing list
>> address@hidden
>> http://lists.gnu.org/mailman/listinfo/bug-glpk
>>
>>