/*------------------------------------------------------------------------------- F|perm|max(Ci) Ütemezési fedadat szimulációja. Egyutas többoperációs termelésütemezési feladat. -------------------------------------------------------------------------------*/ #include #include #include #include typedef struct { int id; long int* SetT, /*beallitasi idok, setup times*/ * ProcT, /*muveleti idok, processing times*/ * OpT, /*operaciok teljes ideje, operation times*/ * StartT,/*kezdesi idopontok, starting times*/ * EndT; /*befejezesi idopontok, ending times */ long D, /*hatarido*/ L; /*keses*/ }T_JOB; typedef struct { int id; int l; /*gephez rendelt munkak szama, load*/ long int C; /*a gep utolso munkajanak befejezesi idopontja, completion time*/ }T_MACHINE; typedef struct { long Cmax, /*utolso munka bef. idopontja*/ Csum; /*bef. idok osszege*/ double MUav; /*atlagos gepkihasznaltsag*/ }T_OBJF; /*celfuggvenyek*/ void simulation_FS(T_JOB* job, int* sch, int NJ, int NM, long t); void print_objf(T_OBJF* objf); /*void print_Gantt(T_JOB* job, int* sch, int NJ, int NM);*/ int main(int argc, char* argv[]) { int NJ; /* munkak szama*/ int NM; /* gepek szama*/ T_MACHINE * mach; int i, j; T_JOB* job; /* strukturavektorra mutato*/ int* sch; /* utemterv */ T_OBJF objf; /* modellepites, utemezes, szimulacio, ertekeles*/ /*modellepites*/ printf("\n Kerem a munkak aktualis szamat:"); scanf("%d", &NJ); printf("\n Kerem a gepek aktualis szamat:"); scanf("%d", &NM); job = (T_JOB*) calloc(NJ, sizeof(T_JOB)); randomize(); for (i=0; iCsum); printf("\n Cmax= %ld", objf->Cmax); }