Ignore:
Timestamp:
Apr 10, 2013 12:52:27 PM (6 years ago)
Author:
stefan
Message:

sync with trunk rev 1940

Location:
stable/1.15/Clp
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • stable/1.15/Clp

  • stable/1.15/Clp/src

  • stable/1.15/Clp/src/ClpPdco.cpp

    r1665 r1941  
    33// Corporation and others.  All Rights Reserved.
    44// This code is licensed under the terms of the Eclipse Public License (EPL).
    5 
    6 #ifdef COIN_DO_PDCO
    75
    86/* Pdco algorithm
     
    181179     double inf = 1.0e30;
    182180     double eps = 1.0e-15;
    183      double atolold, r3ratio, Pinf, Dinf, Cinf, Cinf0;
     181     double atolold = -1.0, r3ratio = -1.0, Pinf, Dinf, Cinf, Cinf0;
    184182
    185183     printf("\n   --------------------------------------------------------");
     
    226224     //false  = 0;
    227225     //zn     = zeros(n,1);
    228      int nb     = n + m;
    229      int nkkt   = nb;
     226     //int nb     = n + m;
    230227     int CGitns = 0;
    231228     int inform = 0;
     
    260257     double atol2     = options.LSQRatol2;  // Smallest atol,unless atol1 is smaller
    261258     double conlim    = options.LSQRconlim;
    262      int  wait      = options.wait;
     259     //int  wait      = options.wait;
    263260
    264261     // LSproblem:
     
    317314     //---------------------------------------------------------------------
    318315     double time    = CoinCpuTime();
    319      bool useChol = (LSmethod == 1);
    320      bool useQR   = (LSmethod == 2);
     316     //bool useChol = (LSmethod == 1);
     317     //bool useQR   = (LSmethod == 2);
    321318     bool direct  = (LSmethod <= 2 && ifexplicit);
    322319     char solver[6];
     
    456453     x.scale((1.0 / beta));
    457454
    458      double * g_elts = grad.getElements();
     455     //double * g_elts = grad.getElements();
    459456     double * H_elts = H.getElements();
    460457
     
    504501     bool  precon   = true;
    505502     double PDitns    = 0;
    506      bool converged = false;
     503     //bool converged = false;
    507504     double atol      = atol1;
    508505     atol2     = CoinMax( atol2, atolmin );
     
    512509     //  Iteration log.
    513510
    514      double stepx   = 0;
    515      double stepz   = 0;
    516511     int nf      = 0;
    517512     int itncg   = 0;
     
    628623                    //  New version of lsqr
    629624
    630                     int istop, itn;
     625                    int istop;
    631626                    dy.clear();
    632627                    show = false;
     
    918913     */
    919914// Print distribution
    920      float thresh[9] = { 0.00000001, 0.0000001, 0.000001, 0.00001, 0.0001, 0.001, 0.01, 0.1, 1.00001};
     915     double thresh[9] = { 0.00000001, 0.0000001, 0.000001, 0.00001, 0.0001, 0.001, 0.01, 0.1, 1.00001};
    921916     int counts[9] = {0};
    922917     for (int ij = 0; ij < n; ij++) {
     
    930925     printf ("Distribution of Solution Values\n");
    931926     for (int j = 8; j > 1; j--)
    932           printf(" %f  to  %f %d\n", thresh[j-1], thresh[j], counts[j]);
    933      printf("   Less than   %f %d\n", thresh[2], counts[0]);
    934 
    935      return 0;
     927          printf(" %g  to  %g %d\n", thresh[j-1], thresh[j], counts[j]);
     928     printf("   Less than   %g %d\n", thresh[2], counts[0]);
     929
     930     return inform;
    936931}
    937932// LSQR
     
    10181013     pdcoStuff_->getHessian(this, x, H);
    10191014}
    1020 #endif
Note: See TracChangeset for help on using the changeset viewer.