Originally posted by: EdKlotz
Note that the repeating decimal -.027027027... = -1/37 (see
http://en.wikipedia.org/wiki/Repeating_decimal#Converting_repeating_decimals_to_fractions for how to do these
types of conversions in general). Similarly, x2274=0.216216216216... = 8/37.
So, if we start to increase x19 from its lower bound of 1087, we will start to increase the basic variable x2274 from its value of 8/37 at a
rate of 1/37. Since x2274 is binary, we can only increase it to its upper bound of 1 before violating its bounds, to that means we can
increase x2274 by 29/37, which means we can increase x19 by 29 before driving x2274 above 1. Since x19 has a negative tableau row coefficient
and resides at a lower bound, we cannot change x19 in a way that preserves feasibility and drives x2274 down to 0. The change in objective
associated with branching up on fractional basic variable x2274 is the reduced cost on variable x19 multiplied by 29, the amount by which we
increase the nonbasic variable x19. However, this analysis is based on the primal model rather than the dual, as it's still possible that the
increase in x19 by 29 will cause a loss of primal feasibility for some other basic variable that currently is feasible.
Regarding CPXmdleave, it does a dual simplex pivot associated with the primal infeasibility created by changing the bounds on x2274 to [1,1].
Given that the tableau row associated with basic variable x2274 only has a nonzero coefficient in the column associated with x19, the dual
simplex ratio test only need examine that tableau element and the reduced cost of x19. So, if CPXmdleave returns a value of 37, that would
be consistent with a reduced cost of 1, not 0.
With this as background, I suggest the following.
-
Double check that the reduced cost of x19 is 0.0.
-
Make sure the upratio and downratio arrays you pass in to CPXmdleave are indexed in the same way as the indices array. Thus, if x2274 is in position for of the indices array, look at upratio[4] for the value, but do not look in position 4 in the reduced cost array for the value of x19. And, do not look in the 19th position in the upratio array for the value.
-
Regarding the previous suggestion, perhaps the simplest test would be to make a call to CPXmdleave where you only request the upratio and downratio value for a single basic variable, namely x2274. If you try that, what result do you get?
If these tests don't help, please include the code fragment leading up to the CPXmdleave call in question, including the code that shows
how the arrays passed into this routine are set up, and also a SAV file of the model in question with the associated optimal basis (i.e. insert
a call to CPXwriteprob to export this SAV file just before the call to CPXmdleave).
Ed
#CPLEXOptimizers#DecisionOptimization