Моделирование процессов функциональных систем с использованием Q-схем, страница 2

                                               if(Order<=MaxKlient)

                                               {

                                                           for(long i=0;i<Order;i++)

                                                           {

                                                                       TovC+=Choise();

                                                           }

                                                           t3=Order;

                                                           TovCount+=TovC;

                                                           Order=0;

                                               }

                                               else

                                               {

                                               for(long i=0;i<MaxKlient;i++)

                                               {

                                                           TovC+=Choise();

                                               }

                                               t3=MaxKlient;

                                               TovCount+=TovC;

                                               Order-=MaxKlient;

                                               }

                                    }

                        else

      {

                                    continue;

                        }

                        if(K1<0)         // Свободен 1-й клеpк

                        {

                                    K1=WorkTime(ToSklad)+FindTime(TovC)+WorkTime(FromSklad)+WorkTime(Raschet);

                                    WKl1+=K1;

                                    TPreb+=K1*t3;

                                    ExitCount++;

                                    continue;

                        }

                        if(K2<0)         // Свободен 2-й клеpк

                        {

                                    K2=WorkTime(ToSklad)+FindTime(TovC)+WorkTime(FromSklad)+WorkTime(Raschet);

                                    WKl2+=K2;

                                    TPreb+=K2*t3;

                                    ExitCount++;

                                    continue;

                        }

                        if(K3<0)         // Свободен 3-й клеpк

                        {

                                    K3=WorkTime(ToSklad)+FindTime(TovC)+WorkTime(FromSklad)+WorkTime(Raschet);

                                    WKl3+=K3;

                                    TPreb+=K3*t3;

                                    ExitCount++;

                                    continue;

                }

           }

            }

            EndScreen();

        matog=matog+(float)WKl1/MTime;

        sr[N]=(float)WKl1/MTime;

        sr[N]=(float)WKl1/MTime;

}

        matog=matog/Nz;

  N=Nz;//=(90*(1,7^2))/(0,01^2);

  frmOptmag->edRealization->Text=FloatToStr((float)Nz);

}

//---------------------------------------------------------------------------