Sei sulla pagina 1di 12

PIZZA MAKERS SCHEDULER

Shivam Kajale Anand Naik Akash


Konda
Pizza Makers Scheduler
A program which tells a pizza maker the
order in which he must cater to the orders
received so that each customer faces the
minimum average waiting time.
However, once a customers waiting time
comes close to about 30 minutes, his order
receives higher priority. This has been
incorporated by introducing an appropriate
scaling factor.
Data Structure Explored
A 2-dimensional list is used to save the data
entered by the user and some other data
required for computation.
Each order has 6 parameters associated with it.

Three of these are directly entered by the user


and others are updated by the program with
each new entry.
Implementation
The program is implemented on Python 2.7.
It makes use of some in-built list methods, viz.
list.sort(), list.append(), list.remove(n)
The program loads in terminal. A dedicated
GUI hasnt been designed.
Next order to be processed is suggested using
a greedy approach.
Implementation
The external interface accepts three queries

1.Make Entry
.This enables entering a new order.
.Input is a 3 tuple consisting of the time since
the order was placed, cooking time required
and expected home delivery time.
.An order ID is generated for each order
placed.
.An estimate of time needed for delivery is
given.
Implementation
The external interface accepts three queries

2. Make Enquiry
This enables a customer to receive an
estimate of how much longer will the delivery
take.
This estimate is provided against the order Id.
Implementation
The external interface accepts three queries

3. Next Order
The pizza maker is told which order he must
process next to achieve the average minimum
waiting time for his customers.
Functions used in the main
program
The while loop used at the end is the main
program. The following functions are used in
the while loop are:
makeEntry()
getNextPizzaId()
makeEnquiry(order_id)

These functions are built using some other


supporting functions.
Supporting functions for functions in
main program

calcApparentCT(ct, personal_waiting_time)

updateExpectedDT()

updateApparentCT()

updatePersonalWT(increment)

updateQueue(iwt, ct, order_id)


Challenges
Proof

Scope for improvement


Classify orders as 30 minutes delivery guaranteed
or not. Then work out an algorithm to ensure
maximum successful time bound deliveries while
minimizing overall waiting time.
Increase the number of ovens

Potrebbero piacerti anche