* ************************************************************************* subroutine lagmul( k, rgra, gra, ftstem, pr, fr, to, + ba, nba, bep ) * ************************************************************************* * Purpose : * --------- * Given a nonbasic arc K, this routine computes its * Lagrange multiplier estimate. * Parameters : * ------------ * k ( int ) * input : the indice of the nonbasic variable for * which we compute its Lagrange multiplier. * output : unmodified. * rgra ( dble ) * input : the reduced gradient vector. * output : the Kth component is set to the Lagrange * multiplier estimate. * gra ( dble ) * input : the gradient of the objective function. * output : unmodified. * ftstem ( int ) * input : vector containing for each superbasic or nonbasic * variable the length from its origine node to the * stem node and the length of its flow augmenting * path. * output : unmodified. * pr ( int ) * input : the predecessor vector. * output : unmodified. * fr ( int ) * input : vector containing the origine nodes of the arcs. * output : unmodified. * to ( int ) * input : vector containing the end nodes of the arcs. * output : unmodified. * ba ( int ) * input : vector containing the indices of the basic * variables. * output : unmodified. * nba ( int ) * input : the number of basic variables. * output : unmodified. * bep ( int ) * input : meaningless. * output : it contains the flow augmenting path of the * nonbasic variable K. * Routine used : * -------------- * fapbep. * Programming : * ------------- * D. Tuyttens * ========================================================================= * Routine parameters integer k, ftstem(*), pr(*), fr(*), to(*), + ba(*), nba, bep(*) double precision rgra(*), gra(*) * Internal variables integer kdis, ik, kk * * Get the flow augmenting path of the nonbasic arc K. * call fapbep( k, kdis, ftstem, pr, fr, to, ba, nba, bep ) * * We obtain the nobasic Lagrange multiplier estimate by * going over the flow augmenting path of the nonbasic arc K. * rgra(k) = gra(k) * do 10 ik = 1 , kdis kk = bep(ik) if( bep(ik).gt.0 ) then rgra(k) = rgra(k) + gra(kk) else rgra(k) = rgra(k) - gra(abs(kk)) endif 10 continue * return end