Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8368927
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T13:30:43+00:00 2026-06-09T13:30:43+00:00

I have a system that modelizes a kind of queuing system, that is composed

  • 0

I have a system that modelizes a kind of queuing system, that is composed of these elements :

  • services : a service that can be offered to a customer
  • desks : a desk that can offer one or more services. There are several desks, and each can be configured to provide a different subset of services, with or without overlap between the desks
  • customers/tickets : a customer comes in, and prints a ticket specifying which service she needs

The system is already in place and works fine. It is a real-world system, with tickets distributors that allow customers to request and print tickets, and desks client app to call customers to the desks, and displays to show the customers who goes where.

Now a new requirement is a way to approximately predict the waiting time for any given ticket in the queue, and raise an alarm if this waiting time gets too high.

We will have a service duration time that will be collected from usage statistics, for each service.

The prediction does not need to be very precise, the goal is to give the administrator of a site a quick outlook of the situation, a feedback whether everything is flowing smoothly, or if customers are accumulating in the queue and it would be good to open one more desk, or in the contrary, customers are scarce and a desk could be shut. The most important factor is the waiting time for the customers (for example it would be ok to have 10 customers waiting if each customers stays at the desk 1 minute, but not if this duration is 10 minutes!).

The problematic is that any desk can provide any service without limitations. So a given service can be provided by any number of desks. But in turn each desk can provide any number of services.

I tried various approaches :

You could generate a queue that consists exclusively of tickets for services that can be provided by one desk. But then, each ticket in this list might be “serviceable” by just this desk, or by 5 other desks too…

You could grab a ticket, see which desks are susceptible to service it, and grab all the tickets that can be serviced by any of these desks. Again the problem is that some tickets can be treated by only one desk in the set and others by all of them…

I really don’t know how to tackle the problem from here. Are there any queuing models that can be used for that kind of heterogenous desks ? Any ideas how to modelize this ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T13:30:45+00:00Added an answer on June 9, 2026 at 1:30 pm

    Since you have tagged the question with algorithm, and you are asking in a programming site (rather than a math or statistics site), I will approach this from a programming perspective.

    Model:

    // creates a new ticket for a given service; arrival time and length are only known
    // for generated tickets
    class Ticket(int arrival, int length, Service s)
    
    // an abstract distribution (parameters are distribution-dependent)
    class Distribution(...) 
          int generate() // generates integer with this distribution
    
    // a service, with a distributions of time-to-finish and time-between-arrivals 
    //    (both set experimentally from historical data).
    class Service(Distribution lengths, Distribution arrivals)
          // simulated ticket: length from lengths.generate(), 
          //     arrival from t + arrivals.generate();
          Ticket createFuture(int t)  
          // same as above, but arrival = t+0
          Ticket createNow(int t)
    
    // a desk, offers one or more services
    class Desk() 
          void addService(Service s) // allows this desk to attend this service
          void removeService(Service s) 
          bool isCompatible(Service s) // is this desk compatible with this service?
          void attend(Ticket t) // marks a desk as attending a service
          bool isFree() // returns true if the desk is not attending anyone
          // returns a finished ticket, if any. After this, isFree() will return true
          Ticket finished() 
    
    // a policy which assigns tickets to desks. Implement your current one (probably "FIFO") 
    class Policy()
          // returns a suitable desk for that ticket, or null if none is posible/desired
          Desk assign(Ticket t, Ticket[] pending, Desk[] deks) 
    
    // a live queue of tickets, dispatched using policy p t
    class Queue(int startTime, Policy p, Service[] ss, Desk[] ds)
          void push(Ticket t) // adds a new real ticket to the queue
          // estimates wait-times for new arrivals to all services at time 't'
          Map<Service, int> forecast(int t) 
          void tick() // advances time for this queue
          Queue clone(); // deep-clones the queue (including time, policy, desks, and services)
    

    Usage:

    1. define your services and model their arrival.
    2. create desks and assign services to them.
    3. define your current policy, create a queue with it. The queue will start out empty.
    4. as time passes, call tick() (and, if tickets come in, use createNow() to push() them in)
    5. call estimate() as required

    Implementation:

    tick() would iterate over all desks to see which have finished(), and assign tickets to desks according to current policy. By calling tick() several times until the queue is empty, the exact time-to-close can be determined for each service type — but this destroys the queue, and it should be done only on clone()s of the current queue.

    forecast() would clone() the queue N times, and for each cloned queue, advance the time ‘now-t’ times while adding simulated tickets (generated with createFuture()). You should chain the times of createFuture as follows:

    // create 3 future tickets for service s
    Ticket t1 = s.createFuture(now);
    Ticket t2 = s.createFuture(t1.arrival);
    Ticket t3 = s.createFuture(t2.arrival);
    //...
    

    simulated tickets would only be pushed into the actual queue once the simulated time reached their simulated arrival times. Once the simulated time reached ‘now+t’, the actual service latencies would be determined and averaged out over all N simulations, to yield the probabilistic forecast.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a system that sends a object to another service via WCF using
I have a system that creates an order and that order can be billed
I have a system where users can upload, well, anything really - and these
We have system here that uses Java JNI to call a function in a
I have a system that takes dynamic data, puts it in HTML for layout
I have big system that make my system crash hard. When I boot up,
I have a system that runs like this: main.exe runs sub.exe runs sub2.exe and
I have a system that will generate messages sporadically, and I would like to
We have a system that has some Bash scripts running besides Java code. Since
We have a system that runs in IIS. The system should always run using

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.