version 1.277, 2017/07/17 08:53:49
|
version 1.278, 2017/07/19 14:09:02
|
Line 1
|
Line 1
|
/* $Id$ |
/* $Id$ |
$State$ |
$State$ |
$Log$ |
$Log$ |
|
Revision 1.278 2017/07/19 14:09:02 brouard |
|
Summary: Bug for mobil_average=0 and prevforecast fixed(?) |
|
|
Revision 1.277 2017/07/17 08:53:49 brouard |
Revision 1.277 2017/07/17 08:53:49 brouard |
Summary: BOM files can be read now |
Summary: BOM files can be read now |
|
|
Line 7945 set ter svg size 640, 480\nunset log y\n
|
Line 7948 set ter svg size 640, 480\nunset log y\n
|
double *agemingoodr, *agemaxgoodr; |
double *agemingoodr, *agemaxgoodr; |
|
|
|
|
/* modcovmax=2*cptcoveff;/\* Max number of modalities. We suppose */ |
/* modcovmax=2*cptcoveff; Max number of modalities. We suppose */ |
/* a covariate has 2 modalities, should be equal to ncovcombmax *\/ */ |
/* a covariate has 2 modalities, should be equal to ncovcombmax */ |
|
|
sumnewp = vector(1,ncovcombmax); |
sumnewp = vector(1,ncovcombmax); |
sumnewm = vector(1,ncovcombmax); |
sumnewm = vector(1,ncovcombmax); |
Line 8270 set ter svg size 640, 480\nunset log y\n
|
Line 8273 set ter svg size 640, 480\nunset log y\n
|
for(j=1; j<=nlstate+ndeath;j++) { |
for(j=1; j<=nlstate+ndeath;j++) { |
ppij=0.; |
ppij=0.; |
for(i=1; i<=nlstate;i++) { |
for(i=1; i<=nlstate;i++) { |
/* if (mobilav>=1) */ |
if (mobilav>=1) |
ppij=ppij+p3mat[i][j][h]*prev[(int)agec][i][k]; |
ppij=ppij+p3mat[i][j][h]*prev[(int)agec][i][k]; |
/* else { */ /* even if mobilav==-1 we use mobaverage */ |
else { /* even if mobilav==-1 we use mobaverage, probs may not sums to 1 */ |
/* ppij=ppij+p3mat[i][j][h]*probs[(int)(agec)][i][k]; */ |
ppij=ppij+p3mat[i][j][h]*probs[(int)(agec)][i][k]; |
/* } */ |
} |
fprintf(ficresf," %.3f", p3mat[i][j][h]); |
fprintf(ficresf," %.3f", p3mat[i][j][h]); |
} /* end i */ |
} /* end i */ |
fprintf(ficresf," %.3f", ppij); |
fprintf(ficresf," %.3f", ppij); |
Line 10842 int main(int argc, char *argv[])
|
Line 10845 int main(int argc, char *argv[])
|
fflush(ficlog); |
fflush(ficlog); |
goto end; |
goto end; |
} |
} |
|
/*-------- Rewriting parameter file ----------*/ |
|
strcpy(rfileres,"r"); /* "Rparameterfile */ |
|
strcat(rfileres,optionfilefiname); /* Parameter file first name */ |
|
strcat(rfileres,"."); /* */ |
|
strcat(rfileres,optionfilext); /* Other files have txt extension */ |
|
if((ficres =fopen(rfileres,"w"))==NULL) { |
|
printf("Problem writing new parameter file: %s\n", rfileres);goto end; |
|
fprintf(ficlog,"Problem writing new parameter file: %s\n", rfileres);goto end; |
|
fflush(ficlog); |
|
goto end; |
|
} |
|
fprintf(ficres,"#IMaCh %s\n",version); |
|
|
|
|
/* Reads comments: lines beginning with '#' */ |
/* Reads comments: lines beginning with '#' */ |
numlinepar=0; |
numlinepar=0; |
/* Is it a BOM UTF-8 Windows file? */ |
/* Is it a BOM UTF-8 Windows file? */ |
Line 10874 int main(int argc, char *argv[])
|
Line 10890 int main(int argc, char *argv[])
|
numlinepar++; |
numlinepar++; |
fputs(line,stdout); |
fputs(line,stdout); |
fputs(line,ficparo); |
fputs(line,ficparo); |
|
fputs(line,ficres); |
fputs(line,ficlog); |
fputs(line,ficlog); |
continue; |
continue; |
}else |
}else |
Line 10894 int main(int argc, char *argv[])
|
Line 10911 int main(int argc, char *argv[])
|
numlinepar++; |
numlinepar++; |
fputs(line,stdout); |
fputs(line,stdout); |
fputs(line,ficparo); |
fputs(line,ficparo); |
|
fputs(line,ficres); |
fputs(line,ficlog); |
fputs(line,ficlog); |
continue; |
continue; |
}else |
}else |
Line 10916 int main(int argc, char *argv[])
|
Line 10934 int main(int argc, char *argv[])
|
numlinepar++; |
numlinepar++; |
fputs(line,stdout); |
fputs(line,stdout); |
fputs(line,ficparo); |
fputs(line,ficparo); |
|
fputs(line,ficres); |
fputs(line,ficlog); |
fputs(line,ficlog); |
continue; |
continue; |
}else |
}else |
Line 11177 Please run with mle=-1 to get a correct
|
Line 11196 Please run with mle=-1 to get a correct
|
|
|
fflush(ficlog); |
fflush(ficlog); |
|
|
/*-------- Rewriting parameter file ----------*/ |
|
strcpy(rfileres,"r"); /* "Rparameterfile */ |
|
strcat(rfileres,optionfilefiname); /* Parameter file first name*/ |
|
strcat(rfileres,"."); /* */ |
|
strcat(rfileres,optionfilext); /* Other files have txt extension */ |
|
if((ficres =fopen(rfileres,"w"))==NULL) { |
|
printf("Problem writing new parameter file: %s\n", rfileres);goto end; |
|
fprintf(ficlog,"Problem writing new parameter file: %s\n", rfileres);goto end; |
|
} |
|
fprintf(ficres,"#%s\n",version); |
|
} /* End of mle != -3 */ |
} /* End of mle != -3 */ |
|
|
/* Main data |
/* Main data |