version 1.74, 2003/05/02 18:51:41
|
version 1.75, 2003/05/03 01:18:24
|
Line 119
|
Line 119
|
#define ODIRSEPARATOR '\\' |
#define ODIRSEPARATOR '\\' |
#endif |
#endif |
|
|
char version[80]="Imach version 0.95, February 2003, INED-EUROREVES "; |
char version[80]="Imach version 0.95, May 2003, INED-EUROREVES "; |
int erreur; /* Error number */ |
int erreur; /* Error number */ |
int nvar; |
int nvar; |
int cptcovn=0, cptcovage=0, cptcoveff=0,cptcov; |
int cptcovn=0, cptcovage=0, cptcoveff=0,cptcov; |
Line 3138 prevforecast(char fileres[], double anpr
|
Line 3138 prevforecast(char fileres[], double anpr
|
|
|
fprintf(ficresf,"#****** Routine prevforecast **\n"); |
fprintf(ficresf,"#****** Routine prevforecast **\n"); |
|
|
|
/* if (h==(int)(YEARM*yearp)){ */ |
for(cptcov=1, k=0;cptcov<=i1;cptcov++){ |
for(cptcov=1, k=0;cptcov<=i1;cptcov++){ |
for(cptcod=1;cptcod<=ncodemax[cptcoveff];cptcod++){ |
for(cptcod=1;cptcod<=ncodemax[cptcoveff];cptcod++){ |
k=k+1; |
k=k+1; |
Line 3164 prevforecast(char fileres[], double anpr
|
Line 3165 prevforecast(char fileres[], double anpr
|
hpxij(p3mat,nhstepm,agec,hstepm,p,nlstate,stepm,oldm,savm, k); |
hpxij(p3mat,nhstepm,agec,hstepm,p,nlstate,stepm,oldm,savm, k); |
|
|
for (h=0; h<=nhstepm; h++){ |
for (h=0; h<=nhstepm; h++){ |
if (h==(int) (YEARM*yearp)) { |
if (h*hstepm/YEARM*stepm ==yearp) { |
fprintf(ficresf,"\n"); |
fprintf(ficresf,"\n"); |
for(j=1;j<=cptcoveff;j++) |
for(j=1;j<=cptcoveff;j++) |
fprintf(ficresf,"%d %d ",Tvaraff[j],nbcode[Tvaraff[j]][codtab[k][j]]); |
fprintf(ficresf,"%d %d ",Tvaraff[j],nbcode[Tvaraff[j]][codtab[k][j]]); |
Line 3178 prevforecast(char fileres[], double anpr
|
Line 3179 prevforecast(char fileres[], double anpr
|
else { |
else { |
ppij=ppij+p3mat[i][j][h]*probs[(int)(agec)][i][cptcod]; |
ppij=ppij+p3mat[i][j][h]*probs[(int)(agec)][i][cptcod]; |
} |
} |
if (h==(int)(YEARM*yearp)) |
if (h*hstepm/YEARM*stepm== yearp) { |
fprintf(ficresf," %.3f", p3mat[i][j][h]); |
fprintf(ficresf," %.3f", p3mat[i][j][h]); |
} |
} |
if (h==(int)(YEARM*yearp)){ |
} /* end i */ |
|
if (h*hstepm/YEARM*stepm==yearp) { |
fprintf(ficresf," %.3f", ppij); |
fprintf(ficresf," %.3f", ppij); |
} |
} |
} |
}/* end j */ |
} |
} /* end h */ |
free_ma3x(p3mat,1,nlstate+ndeath,1, nlstate+ndeath, 0,nhstepm); |
free_ma3x(p3mat,1,nlstate+ndeath,1, nlstate+ndeath, 0,nhstepm); |
} |
} /* end agec */ |
} |
} /* end yearp */ |
} |
} /* end cptcod */ |
} |
} /* end cptcov */ |
|
|
if (mobilav!=0) free_ma3x(mobaverage,1, AGESUP,1,NCOVMAX, 1,NCOVMAX); |
if (mobilav!=0) free_ma3x(mobaverage,1, AGESUP,1,NCOVMAX, 1,NCOVMAX); |
|
|
Line 4468 ageminpar, agemax, s[lastpass][imx], age
|
Line 4470 ageminpar, agemax, s[lastpass][imx], age
|
strcpy(plotcmd,GNUPLOTPROGRAM); |
strcpy(plotcmd,GNUPLOTPROGRAM); |
strcat(plotcmd," "); |
strcat(plotcmd," "); |
strcat(plotcmd,optionfilegnuplot); |
strcat(plotcmd,optionfilegnuplot); |
printf("Starting: %s\n",plotcmd);fflush(stdout); |
printf("Starting graphs with: %s",plotcmd);fflush(stdout); |
system(plotcmd); |
system(plotcmd); |
|
printf(" Wait..."); |
|
|
/*#ifdef windows*/ |
/*#ifdef windows*/ |
while (z[0] != 'q') { |
while (z[0] != 'q') { |