Структура вычислительной системы: трехмерная с размерностью 4х4х3, страница 5

                                                      SumTr+=m_pcpu[i]->ppispcpu[j-1];

                                    }

                  }

                  return SumTr;

}

void CVkss1Dlg::RasprZad(zadacha *z,int ostat)

{                int SumTr=0;

if(ostat==0){/*AfxMessageBox("Задача введена");*/return;}

                  for(int i=0;i<48;i++)

                  { if(m_pcpu[i]->bitrab==0)continue;

                                    for(int j=1;j<=m_pcpu[i]->kolzad;j++)

                                    SumTr+=m_pcpu[i]->ppispcpu[j-1];

                                    if(SumTr<100)

                                    {

                                                      int p1=m_pcpu[i]->kolzad;

                                                      if(ostat>=100-SumTr)//если трудоемкость >= 100

                                                      {

                                                                        m_pcpu[i]->pnumzad[p1]=z->numzad;

                                                                        m_pcpu[i]->ppispcpu[p1]=100-SumTr;

                                                                        m_pcpu[i]->kolzad=m_pcpu[i]->kolzad+1;

                                                                        ostat=ostat-(100-SumTr);

                                                                        for(int h=0;z->numcpu[h]!=0 && h<110;h++);

                                                                        if(h>=110){AfxMessageBox("! kosyak !");}

                                                                        z->numcpu[h]=m_pcpu[i]->numcpu;

                                                                        RasprZad(z,ostat);//    AfxMessageBox("Зада ll.");

                                                                        return;

                                                      }

                                                      else

                                                      {

                                                                                          m_pcpu[i]->pnumzad[p1]=z->numzad;

                                                                                          m_pcpu[i]->ppispcpu[p1]=ostat;

                                                                                          m_pcpu[i]->kolzad+=1;

                                                                                          ostat=0;

                                                                                          for(int h=0;z->numcpu[h]!=0 && h<110;h++);

                                                                                          if(h>=110){AfxMessageBox("! kosyak !");}

                                                                                          z->numcpu[h]=m_pcpu[i]->numcpu;

                                                                                          return;

                                                      }

                                    }

                                    SumTr=0;

                  }

                  char fff[3];

                  itoa(z->numzad,fff,10);

CString s2="! Система не справляется с заданиями ! ";

s2+="Задача № ";

s2+=fff;

s2+=" ставится в очередь.";

                  AfxMessageBox(s2);

zadacha *zoch=new zadacha;

                  zoch->P=ostat;

                  zoch->numzad=z->numzad;

                  zoch->time=z->time;

                  ocher[kolzocher++]=zoch;

}

void CVkss1Dlg::AddstrLcpu()

{

                  DelstrLcpu();

                  char f[10],f1[3],f2[3],f3[4];

                  int SumTr=0;

                  for(int i=0;i<48;i++)

                  {

                                    if(m_pcpu[i]->bitrab==0)