Answered step by step
Verified Expert Solution
Question
1 Approved Answer
HW 1 : VBA IN MS EXCEL - A GREEDY ALGORITHM FOR SCHEDULING PROBLEM You are going to use Greedy.xlsm workbook for homework which
HW: VBA IN MS EXCEL
A GREEDY ALGORITHM FOR SCHEDULING PROBLEM
You are going to use "Greedy.xlsm workbook for homework which requires a greedy
algorithm to solve a scheduling problem. You need to assign tasks to existing workstations
using a greedy algorithm as described below.
A Greedy Algorithm for Scheduling Problem
Having tasks to be assigned to workstations, a simple Greedy algorithm selects the
unassigned task with the maximum processing time at each step and assigns it to the
workstation with the smallest total processing time.
An example is given below:
Suppose we have tasks with the following processing times: and
minutes.
And suppose we have workstations on which these tasks can be processed.
At each step, the algorithm selects the unassigned task with the maximum processing time
and assigns it to the workstation with the least total processing time.
The result is as follows:
S
S
The algorithm makes choices and finds the solution in iterations. You can check how the
algorithm works manually.
ASSIGNMENT
You are expected to create a sub procedure that runs the Greedy Algorithm to assign
tasks with no precedence relation to the two available stations A and B
In the Assignment sheet of the attached file Greedy.xlsm you will see a table containing the
following columns:
Department of Industrial Engineering, Middle East Technical University
IE : Production and Service Information Systems
HW : VBA IN MS EXCEL SOLVING A SINGLEROW LAYOUT
Tasks: the task names are listed in this column. We have tasks from T to T
Task Times: Processing times of the tasks are displayed in this column. Given task
times are just random integers you may change them for testing your code
Due time: Shows the due time of the corresponding task assuming that you are
currently at time zero.
Assigned Station: Initially, this column is empty. Your code is expected to:
o type A for the tasks that are assigned to the first station.
o type B for the tasks that are assigned to the second station.
Order in Station: Initially, this column is also empty. Your code is expected to type
the order of the task in the station that it is assigned to
Status: For each task in the list, show the status Finished in time, finished late,
inprocess or waiting at the time given next to cell Current Time cell K
Finishing Time: The time when the task is finished. Leave blank if it is not finished
yet at the time given next to cell Current Time cell K
Macro : Create a macro that carries out the algorithm defined in Assign your macro to
Assign Tasks button in Assignment sheet.
Macro : Create another macro that gives the Status and Finishing Time information.
Assign this macro to View Status button. This macro should also display the machine status
indicating the current task in process and the next task to be processed for each machine in
cells K:L
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started