Click here to Skip to main content
15,915,163 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: C++, simulations call center traffic Pin
Rajesh R Subramanian14-May-09 23:11
professionalRajesh R Subramanian14-May-09 23:11 
GeneralRe: C++, simulations call center traffic [modified] Pin
CPallini14-May-09 23:28
mveCPallini14-May-09 23:28 
GeneralRe: C++, simulations call center traffic Pin
Rajesh R Subramanian14-May-09 23:33
professionalRajesh R Subramanian14-May-09 23:33 
GeneralRe: C++, simulations call center traffic Pin
CPallini14-May-09 23:43
mveCPallini14-May-09 23:43 
GeneralRe: C++, simulations call center traffic Pin
Rajesh R Subramanian14-May-09 23:57
professionalRajesh R Subramanian14-May-09 23:57 
GeneralRe: C++, simulations call center traffic Pin
CPallini15-May-09 0:10
mveCPallini15-May-09 0:10 
GeneralRe: C++, simulations call center traffic Pin
Rajesh R Subramanian15-May-09 2:19
professionalRajesh R Subramanian15-May-09 2:19 
AnswerRe: C++, simulations call center traffic Pin
Stuart Dootson15-May-09 0:01
professionalStuart Dootson15-May-09 0:01 
From your description, the way I'd do it would be to model each call as a period of time, chosen randomly using (probably) a normal distribution, where the mean and standard deviation are parameters to the simulation. A 5 minute mean and 3 or 4 minute standard deviation sound reasonable?

class Call
{
   Call(double currentTime) { // Generate random call duration, remember currentTime as the time we first saw the call }
   double CallMadeAt() const;
   double GetCallDuration() const;
};

std::stack<Call> callQueue;


You then have a fixed number of operators, each of which can handle one call at a time.

class Operator
{
   HandleCall(Call const& call, double currentTime) { // Remember that we're dealing with a call }
   bool Busy() const; // Flag to show we're handling a call currently
   double NextFreeTime() { return (pCall_)(pCall->GetCallDuration() + callStartTime_):(0.0); }
private:
   Call* pCall_;
   double callStartTime_;
};

Operator operators[OPERATOR_COUNT];


You can then model the passing of time, generating calls at random intervals (again using a normal distribution, but with different parameters) and passing them to free operators. If there's no free operator, you need to work out when the next operator's free and give them the call then.

Obviously, the hold time for a call is the time between the call being made and the call being handed off to an operator. You can measure the average hold time by summing them all and remembering how many there were.

HTH!

Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p

QuestionDLL Import library missing Pin
transoft14-May-09 12:57
transoft14-May-09 12:57 
AnswerRe: DLL Import library missing Pin
Stuart Dootson14-May-09 13:14
professionalStuart Dootson14-May-09 13:14 
GeneralRe: DLL Import library missing Pin
transoft14-May-09 16:26
transoft14-May-09 16:26 
GeneralRe: DLL Import library missing Pin
Naveen14-May-09 17:55
Naveen14-May-09 17:55 
GeneralRe: DLL Import library missing Pin
transoft15-May-09 1:43
transoft15-May-09 1:43 
GeneralRe: DLL Import library missing Pin
Naveen15-May-09 1:50
Naveen15-May-09 1:50 
GeneralRe: DLL Import library missing Pin
transoft15-May-09 1:52
transoft15-May-09 1:52 
GeneralRe: DLL Import library missing Pin
transoft15-May-09 2:08
transoft15-May-09 2:08 
GeneralRe: DLL Import library missing Pin
Naveen15-May-09 2:33
Naveen15-May-09 2:33 
QuestionWindows and Threads Pin
BobInNJ14-May-09 11:17
BobInNJ14-May-09 11:17 
AnswerRe: Windows and Threads Pin
bulg14-May-09 13:08
bulg14-May-09 13:08 
GeneralRe: Windows and Threads Pin
BobInNJ14-May-09 13:20
BobInNJ14-May-09 13:20 
AnswerRe: Windows and Threads Pin
Stuart Dootson14-May-09 13:10
professionalStuart Dootson14-May-09 13:10 
GeneralRe: Windows and Threads Pin
BobInNJ14-May-09 13:22
BobInNJ14-May-09 13:22 
QuestionRe: Windows and Threads Pin
Taran914-May-09 18:46
Taran914-May-09 18:46 
AnswerRe: Windows and Threads Pin
Stuart Dootson14-May-09 19:49
professionalStuart Dootson14-May-09 19:49 
GeneralRe: Windows and Threads Pin
Taran914-May-09 21:45
Taran914-May-09 21:45 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.