      program            MIMAIN
      implicit           double precision (a-h,o-z)
      parameter           (nwcore = 100000)
      double precision   z(nwcore)
      open(unit=4,file='Online04-02.spc')
      open(unit=9,file='Online04-02.out')
      open(unit=10,file='Online04-02.sol')
      open(unit=11,file='Online04-02.sum')
      call minos1( z, nwcore )
      end
      subroutine funobj( mode, n, x, f, g, nstate, nprob, z, nwcore )
      implicit           double precision (a-h,o-z)
      double precision   x(n), g(n), z(nwcore)
      common    /m1file/ iread,iprint,isumm
      f = dexp(0.39*x(1)+0.25*x(2)+0.53*x(3)+0.65*x(4)-0.25*x(1)**2+
     1         0.01*x(1)*x(2)+0.005*x(1)*x(3)-0.002*x(1)*x(4)-
     1         0.30*x(2)**2+0.007*x(2)*x(3)-0.003*x(2)*x(4)-
     1         0.15*x(3)**2+0.01*x(3)*x(4)-0.10*x(4)*x(4))
      g(1) = f*(0.39-0.5*x(1)+0.01*x(2)+0.005*x(3)-0.002*x(4))
      g(2) = f*(0.25+0.1*x(1)-0.60*x(2)+0.007*x(3)-0.003*x(4))
      g(3) = f*(0.53+0.005*x(1)+0.007*x(2)-0.30*x(3)+0.01*x(4))
      g(4) = f*(0.65-0.002*x(1)-0.003*x(2)+0.01*x(3)-0.20*x(4))
*     end of funobj
      end

*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

      subroutine funcon( mode, m, n, njac, x, f, g,
     $                   nstate, nprob, z, nwcore )
      implicit           double precision (a-h,o-z)
      double precision   x(n), f(m), g(1,5), z(nwcore)
      common    /m1file/ iread,iprint,isumm
      f(1)   = 5.0*x(1)**2.0 + 3.0*x(2)**2.0 + 8.0*x(3)**2.0 + 
     1         2.0*x(4)**2.0 + 10.0*x(5)**2.0
      g(1,1) = 2.0*5.0*x(1)
      g(1,2) = 2.0*3.0*x(2)
      g(1,3) = 2.0*8.0*x(3)
      g(1,4) = 2.0*2.0*x(4)
      g(1,5) = 2.0*10.0*x(5)
 9000 format(/ ' XXX Subroutine funcon has not been loaded.')

*     end of funcon
      end

*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

      subroutine matmod( ncycle, nprob, finish,
     $                   m, n, nb, ne, nka, ns, nscl, nname,
     $                   a, ha, ka, bl, bu,
     $                   ascale, hs, name1, name2,
     $                   x, pi, rc, z, nwcore )

      implicit           double precision (a-h,o-z)
      integer*4          ha(ne), hs(nb)
      integer            ka(nka), name1(nname), name2(nname)
      double precision   a(ne), ascale(nscl), bl(nb), bu(nb)
      double precision   x(nb), pi(m), rc(nb), z(nwcore)
      logical            finish

*     ------------------------------------------------------------------
*     This is the default version of  matmod  for MINOS.
*     It belongs to the nonlinear test problem t4manne,
*     which will specify
*        Problem number   1114
*     in order to identify itself.
*
*     If Cycle limit > 1,  matmod  is called before the first cycle
*     (ncycle = 0) and at the end of each cycle except the last.
*
*     25 Nov 1991: nname and rc added as parameters.
*                  nname = nb for regular MINOS, 1 for minoss.
*     26 Jun 1992: If ncycle ge 1, rc contains reduced costs for the
*                  columns and rows, using the appropriate objective
*                  and pi.  (If infeasible, it is the Phase 1 obj.
*                  If feasible and maximizing, the sign is changed.)
*     ------------------------------------------------------------------

      common    /m1file/ iread,iprint,isumm

      if (nprob .eq. 1114) then
         bu(n)  = 0.1
         if (iprint .gt. 0) write(iprint, 1000) bu(n)
         if (isumm  .gt. 0) write(isumm , 1000) bu(n)
      else
         if (iprint .gt. 0) write(iprint, 9000)
         if (isumm  .gt. 0) write(isumm , 9000)
         finish = .true.
      end if

 1000 format(/ ' matmod  changes last upper bound to', f5.2)
 9000 format(/ ' XXX Subroutine matmod has not been loaded.')

*     end of matmod
      end

*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

