Моделювання однофазної системи, Детальна інформація

Моделювання однофазної системи
Тип документу: Курсова
Сторінок: 24
Предмет: Технології
Автор: Чимишук В. І.
Розмір: 53.8
Скачувань: 1863
IntToStr(cBuff, uTurn);

SendDlgItemMessage(hWnd, IDC_TURN, WM_SETTEXT, 0, (long)cBuff);

//serving client

//generate serving time and sleep for this time

uServingTime = (unsigned)(Generator() * TIME_RATIO);

if(ClientType==1) uServingTime += (unsigned)(CLIENT1_SERVTIME * TIME_RATIO);

else uServingTime += (unsigned)(CLIENT2_SERVTIME * TIME_RATIO);

Serving(&Client, ClientType, uServingTime);

//save results in Results.txt

File << "Клієнт номер: " << uCount << endl;

File << " тип: " << ClientType << endl;

File << " порядковий номер у групі: " << uCount << endl;

File << " поступив у чергу: " << Client.uIn << endl;

File << " обслугований: " << Client.uOut << endl;

File << " час роботи системи: " << uWorkingTime << endl;

File << " черга клієнтів 1 : " << uAmount1 << endl;

File << " черга клієнтів 2 : " << uAmount2 << endl;



//update main window

if(ClientType == 1)

{

IntToStr(cBuff, uServing1);

SendDlgItemMessage(hWnd, IDC_SERVED1, WM_SETTEXT, 0, (long)cBuff);

}

else

{

IntToStr(cBuff, uServing2);

SendDlgItemMessage(hWnd, IDC_SERVED2, WM_SETTEXT, 0, (long)cBuff);

}

IntToStr(cBuff, uServing1+uServing2);

The online video editor trusted by teams to make professional video in minutes