Ignore:
Timestamp:
Sep 15, 2008, 6:54:01 AM (16 years ago)
Author:
liveletlive
Message:

tweaked the configuration code for number parameters.
added code required to include units of a number parameter.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/packages/optimizer/src/plugin_pgapack.c

    r1070 r1154  
    293293                if(numPtr->randdist == RAND_NUMBER_DIST_UNIFORM){
    294294                        dval = PGARandom01(ctx,0);
    295                         newParamPtr[n].value.dval =
    296                     (numPtr->max - numPtr->min)*dval + numPtr->min;
     295                        newParamPtr[n].value.dval = (numPtr->max - numPtr->min)*dval + numPtr->min;
    297296                }else if(numPtr->randdist == RAND_NUMBER_DIST_GAUSSIAN){
    298297                                dval = PGARandomGaussian(ctx,numPtr->mean,numPtr->stddev);
     
    892891{
    893892        int i;
    894         printf("\nSetting sample value.......................\n");
     893        //printf("\nSetting sample value.......................\n");
    895894        if(chrom!=NULL && (&table)!=NULL){
    896895                (table.no_of_samples_evaled)+=1;
     
    910909                                        if(i==0){
    911910                                                table.data[i][(table.no_of_samples_evaled)-1] = fitness;
    912                                                 printf("\nSample Number %d:- Fitness: %lf\t",table.no_of_samples_evaled,fitness);
     911                                                //printf("\nSample Number %d:- Fitness: %lf\t",table.no_of_samples_evaled,fitness);
    913912                                        }else{
    914913                                                table.data[i][(table.no_of_samples_evaled)-1] = chrom[i-1].value.dval;
    915                                                 printf("Param %d %lf\t",i,table.data[i][(table.no_of_samples_evaled)-1]);
     914                                                //printf("Param %d %lf\t",i,table.data[i][(table.no_of_samples_evaled)-1]);
    916915                                        }
    917916                }
Note: See TracChangeset for help on using the changeset viewer.