*     *************************************************************************

      double precision function active( k, dir )

*     *************************************************************************

*     Purpose :
*     ---------

*     This function returns the active bound value of the variable
*     K. The active bound of a variable K is determined by the sign
*     of the component of indice K of the search direction.

*     Parameters :
*     ------------

*     k       ( int )

*       input  : indice of the variable for which we searchs
*                the active bound value.
*       output : unmodified.

*     dir     ( dble )

*       input  : the search direction vector.
*       output : unmodified.

*     active  ( dble )

*       input  : meaningless.
*       output : the active bound value of variable K.

*     Routines used :
*     ---------------

*     xlower, xupper.

*     Programming :
*     -------------

*     D. Tuyttens

*     ========================================================================

*     Function parameters

      integer           k
      double precision  dir(*)

*     Internal variables

      double precision  xlower, xupper

      double precision  zero, one, two, three, half, tenm1, tenm2, tenm4
      common / prbcst / zero, one, two, three, half, tenm1, tenm2, tenm4

*
*     Find active bound of variable K.
*
      if( dir(k) .gt. zero ) then
        active = xupper(k)
      else
        active = xlower(k)
      endif
*
      return
      end