/[ascend]/trunk/base/generic/solver/slv_common.c
ViewVC logotype

Diff of /trunk/base/generic/solver/slv_common.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 86 by johnpye, Wed Dec 7 04:38:54 2005 UTC revision 108 by johnpye, Tue Dec 13 05:53:20 2005 UTC
# Line 644  int slv_direct_solve(slv_system_t server Line 644  int slv_direct_solve(slv_system_t server
644    if (nsolns<0 && allsolns>0 && fp !=NULL) {    if (nsolns<0 && allsolns>0 && fp !=NULL) {
645     /* dump the rejected solutions to give the user a clue */     /* dump the rejected solutions to give the user a clue */
646      error_reporter_start(ASC_PROG_WARNING,NULL,0);      error_reporter_start(ASC_PROG_WARNING,NULL,0);
647      FPRINTF(fp,"Ignoring potential solutions for variable '");      FPRINTF(ASCERR,"Ignoring potential solutions for variable '");
648      var_write_name(server,var,fp);      var_write_name(server,var,ASCERR);
649      FPRINTF(fp,"' in equation '");      FPRINTF(ASCERR,"' in equation '");
650      rel_write_name(server,rel,fp);      rel_write_name(server,rel,ASCERR);
651      FPRINTF(fp,"'");      FPRINTF(ASCERR,"'. ");
     error_reporter_end_flush();  
   
652      for (--allsolns; allsolns >= 0; allsolns--)  {      for (--allsolns; allsolns >= 0; allsolns--)  {
653        FPRINTF(fp,"Rejected solution: %.18g\n",slist[allsolns]);        FPRINTF(ASCERR,"Rejected solution: %.18g\n",slist[allsolns]);
654      }      }
655        error_reporter_end_flush();
656    }    }
657    /* destroy_array(slist); do not do this */    /* destroy_array(slist); do not do this */
658    return( nsolns >= 0 ? 1 : -1 );    return( nsolns >= 0 ? 1 : -1 );
# Line 679  int slv_direct_log_solve(slv_system_t se Line 678  int slv_direct_log_solve(slv_system_t se
678    int32 nsolns, c;    int32 nsolns, c;
679    int32 *slist;    int32 *slist;
680    
681      (void)fp;
682    
683    slist = logrelman_directly_solve(lrel,dvar,&able,&nsolns,perturb,insts);    slist = logrelman_directly_solve(lrel,dvar,&able,&nsolns,perturb,insts);
684    if( !able ) return(0);    if( !able ) return(0);
685    if(nsolns == -1) return (-1);    if(nsolns == -1) return (-1);
# Line 689  int slv_direct_log_solve(slv_system_t se Line 690  int slv_direct_log_solve(slv_system_t se
690      destroy_array(slist);      destroy_array(slist);
691      return 1;      return 1;
692    } else {    } else {
693      FPRINTF(fp,"Ignoring potential solutions for discrete variable\n");      error_reporter_start(ASC_PROG_ERROR,NULL,0);
694      dis_write_name(server,dvar,fp);      FPRINTF(ASCERR,"Ignoring potential solutions for discrete variable '");
695      FPRINTF(fp,"\nin equation\n");      dis_write_name(server,dvar,ASCERR);
696      logrel_write_name(server,lrel,fp);      FPRINTF(ASCERR,"' in equation '");
697      FPRINTF(fp,"\n");      logrel_write_name(server,lrel,ASCERR);
698        FPRINTF(ASCERR,"'. ");
699      for (c = nsolns; c >= 1; c--)  {      for (c = nsolns; c >= 1; c--)  {
700        FPRINTF(fp,"Rejected solution: %d \n",slist[c]);        FPRINTF(ASCERR,"Rejected solution: %d \n",slist[c]);
701      }      }
702        error_reporter_end_flush();
703    
704      destroy_array(slist); /* should we have to do this? */      destroy_array(slist); /* should we have to do this? */
705      return 2;      return 2;
706    }    }

Legend:
Removed from v.86  
changed lines
  Added in v.108

john.pye@anu.edu.au
ViewVC Help
Powered by ViewVC 1.1.22