Click here to Skip to main content
15,867,704 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
See more:
Recently, I got a challenge to develop an algorithm to reduce the waiting time of the payment line of a supermarket. I was planning to use a genetic algorithm, but I want to know if this should be the approach to the problem. I don't know in which programming language I'm going to implement, but I am open to suggestions.

The data that I am going to use to work the problem are: the number of payment boxes that are open and the time in hours.
The objective is to obtain the lower time we can find, but if needed, I can invent data. However, I want to keep it simple.

By the way, it's a single line with multiple payment boxes, like the system you see in some supermarkets where you have a single line to multiple payment boxes. The payment boxes that are available are indicated by a monitor to the client.

What I have tried:

I was thinking about something like this:

2 1 4 6 - number of payment boxes
3 4 2 3 - time in hours


Are these two enough for my implementation to obtain the best fitness value that gives the lowest time?
Posted
Updated 24-Jan-22 3:27am
v2
Comments
BillWoodruff 23-Nov-21 7:51am    
You need to research genetic algorithms, select a programming language, and start experimenting. When you have code to show, and specific questions, come back here.

See those link to the right under "related question:" start there.
[no name] 23-Nov-21 12:57pm    
It's "Queueing Theory". You need "arrival rates" and "service times".

1 solution

Quote:
develop a algorithm to reduce the waiting time of the payment line of a supermarket

Solution: open all payment boxes.

Hint: I think you failed to mention restrictions, limitations and the optimization target.

If you want help to implement an optimization algorithm, the first thing you need to do is specify a cost function, i. e. a function that determines the value of a specific solution candidate. The purpose of this function is to determine how much better one candidate is when compared to another candidate, or at least whether that candidate is better or not.

Without such a function, there is no way to judge whether you found the solution, and therefore no way we can help you find an algorithm.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900