visualization and simulation in scheduling

4
1 Introduction Sch edu lin g the ory pla ys an imp ortantro le in opt imi zat ion of resources, and is used in many manufacturing and service industries. In the last fifty years, many optimal and heuris- tic alg ori thms have be en proposed , but there is gr owi ng demand for tra nsparent and re ali sti c re pr esentation of results in schedulin g. The obj ect ive of vis ual izatio n and simula tion is to make these theoretical results accessible to non-experts in scheduling theory. Especially production scheduling and plann ing needs to be rep res ente d in a tran spar ent form. The goal of this work is therefore to extend the existing TORSCHE Scheduling Toolbox for Matlab [1] by a new tool for graphic visualization of time schedules. Sched uling optimize s the utili zatio n of res our ces with given constraints in time. In other words, scheduling solves the problem how to assign given resources to given tasks in time [2]. Production scheduling is a branch of scheduling mostly aimed at automated production lines and industrial production in general [3]. In this paper, visualization means gra phi c re pr ese nta tion of a sch edu le in time, whe reas simula - tion monitores the influence of some parameters on a whole system. Thi s wor k eme rg es fr om the TOR SCHE Schedulin g Tool- box for Matlab [http://rtime.felk .cvut.cz/schedulin g-toolbox /],  which pro vides data structur es and algor ithms for time sched- uling. Therefore, the whole project is realized in the Matlab pro gramming environ ment [htt p://ww w.mathworks.co m/]. One of the related tools is TrueTime [4] – a Matlab based tool for real-time simulation for wide spectrum of problems, e.g. digital filters, embedded systems and wireless networks. For vi sualizat io n, Op en GL (Open Graphics Li br ar y) [http://www.opengl.or g/] is a standard specification defining a cross-platform API for writing applications that produce 2D and 3D comput er gra phi cs. Thi s mea ns tha t vis ual ization can be realized by OpenGL at an y op er at io n sy st em. On the ot he r hand, Matlab includes the Virtual Reality toolbox, which is also a sufficient tool for visualization of scheduling results. From the scheduling area there are also some closely related  works . Optimiza tion using simu lation was desc ribed by Fis h- man [5], and the use of simulation based optimization in real production was briefly described by Manlig and Sramek [6].  Vis ualiz ation in sched uling has been studied at Karls ruhe University [7] and an application for visualization of process scheduling has been developed there. The main goal of this paper is to present the application for visualization and simulation of scheduling results in the Matlabenvironment VIS IS (VIsualization and SImula tion in Scheduling). This application uses the Matlab-based simula- tio n environmentSimuli nk and the Vi rtual Reali ty too lbo x for gra phi c vis ual iza tio n. Two areas of usa ge ar e con sid er ed: sim- ulation for monitoring the influence of scheduling on the syst em funct ion (e. g. for digi tal filters), and time visua lizat ion (e.g. graphic represPentation of execution on a production line in time). This tool will be freely available in the next ver- sion of TORSCHE. To the best of our knowledge, there is no such a tool providing visualization of scheduled processes in this range. This paper is organized as follows: Section 2 provides the basic notation used in scheduling theory. Section 3 describes the impl emen ta ti on of VI SIS. In Se ct io n 4, e xa mples of si mu- lation and visualization are provided and a comparison with TrueTime is shown. The last section concludes the work. 2 Representation of results in scheduling Sch edu lin g pr oblemscan be div ide d int o thr ee cat ego rie s: resources (processors or machines), constraints and criteri- ons. Gen era lly acc epted not ati on of theprobl em has the for m  |  |  , where   stands for types of processors used,    repre- sents tasks and characteristics of resources, and    denotes the optimality criterion [2]. For example, 1|  r  j , ~  d  j |C max  rep- resents the pro blem with one pro cess or (resource), give n release date and deadline for each task, while the objective is to minimize the latest completion time. The  C max  value is the most frequently used criterion, because it represents the thr oug hpu t of the sys tem[8]. Genera lly , sch edu lin g is NP- -hard problem. Polynomial algorithms are therefore known only for the limited number of problems. This leads to an exponential rise in the time nee ded to find the optimal solution in dependence on the number of input tasks. The most common graphic representation of scheduling results is the Gantt chart [http://www.ganttchart.com/], first established by Henry Gantt in 1910. The Gantt chart has discrete time values on the  x axis and processors on the y axis (see Fig. 1). Tasks are represented by a rectangle area on the intersection of the appropriate processor and the assigned time. The form of the Gantt chart is identical for all time 12  © Czech Technical University Publishing House  http://ctn.cvut.cz/ap/  Acta Polytechnica Vol. 48 No. 3/2008  Visualization and Simulation in Scheduling R. Čapek This paper deals with the representation of scheduling results and it introduces a new tool for visualization and simulation in time  scheduling called VISIS. The purpose of this t ool is to provi de an environment fo r visualizatio n, e.g. in productio n line scheduling. T he  simulation also pr oposes a way to simu late the influence of a schedule on a user defined sy stem, e.g. for design ing filters in digita l signal  processing. VISIS arises from representing scheduling results using the well-known Gantt chart. The applicatio n is implemented in the  Matlab progra mming environm ent using Simul ink and the Virtua l Reality tool box.  Keywords: Schedulin g, visualizati on, simulation, Matlab, VISIS.

Transcript of visualization and simulation in scheduling

Page 1: visualization and simulation in scheduling

8/10/2019 visualization and simulation in scheduling

http://slidepdf.com/reader/full/visualization-and-simulation-in-scheduling 1/3

1 IntroductionScheduling theoryplays an importantrole in optimization

of resources, and is used in many manufacturing and serviceindustries. In the last fifty years, many optimal and heuris-tic algorithms have been proposed, but there is growingdemandfor transparentand realistic representation of resultsin scheduling. The objective of visualization and simulation isto make these theoretical results accessible to non-expertsin scheduling theory. Especially production scheduling andplanning needs to be represented in a transparent form.The goal of this work is therefore to extend the existingTORSCHE Scheduling Toolbox for Matlab [1] by a new toolfor graphic visualization of time schedules.

Scheduling optimizes the utilization of resources withgiven constraints in time. In other words, scheduling solvesthe problem how to assign given resources to given tasks intime [2]. Production scheduling is a branch of schedulingmostly aimed at automated production lines and industrialproduction in general [3]. In this paper, visualization meansgraphic representation of a schedule in time, whereas simula-tion monitores the influence of some parameters on a wholesystem.

This work emerges from the TORSCHE Scheduling Tool-box for Matlab [http://rtime.felk.cvut.cz/scheduling-toolbox/], whichprovides data structures and algorithmsfor timesched-uling. Therefore, the whole project is realized in the Matlabprogramming environment [http://www.mathworks.com/].One of the related tools is TrueTime [4] – a Matlab basedtool for real-time simulation for wide spectrum of problems,e.g. digital filters, embedded systems and wireless networks.For visualization, OpenGL (Open Graphics Library)[http://www.opengl.org/] is a standard specification defining across-platform API for writing applications that produce 2Dand 3D computer graphics. This means that visualization canbe realized by OpenGL at any operation system. On the otherhand, Matlab includes the Virtual Reality toolbox, which isalso a sufficient tool for visualization of scheduling results.From the scheduling area there are also some closely related works. Optimization using simulation was described by Fish-man [5], and the use of simulation based optimization in realproduction was briefly described by Manlig and Sramek [6]. Visualization in scheduling has been studied at KarlsruheUniversity [7] and an application for visualization of processscheduling has been developed there.

The main goal of this paper is to present the applicationfor visualization and simulation of scheduling results in theMatlabenvironment– VISIS (VIsualization andSImulation inScheduling). This application uses the Matlab-based simula-tion environmentSimulink andtheVirtual Reality toolbox forgraphic visualization. Two areas of usage are considered: sim-ulation for monitoring the influence of scheduling on thesystem function (e.g. for digital filters), and time visualization(e.g. graphic represPentation of execution on a productionline in time). This tool will be freely available in the next ver-sion of TORSCHE. To the best of our knowledge, there is nosuch a tool providing visualization of scheduled processes inthis range.

This paper is organized as follows: Section 2 provides thebasic notation used in scheduling theory. Section 3 describesthe implementation of VISIS. In Section 4, examples of simu-lation and visualization are provided and a comparison withTrueTime is shown. The last section concludes the work.

2 Representation of results inschedulingScheduling problemscanbe divided into three categories:

resources (processors or machines), constraints and criteri-ons. Generallyaccepted notation of theproblem has theform | | , where stands for types of processors used, repre-sents tasks and characteristics of resources, and denotesthe optimality criterion [2]. For example, 1| r j, ~ d j| C

max rep-

resents the problem with one processor (resource), givenrelease date and deadline for each task, while the objectiveis to minimize the latest completion time. The Cmax valueis the most frequently used criterion, because it representsthe throughput of thesystem[8]. Generally, scheduling is NP--hard problem. Polynomial algorithms are therefore knownonly for the limited number of problems. This leads to anexponential rise in the time needed to find the optimalsolution in dependence on the number of input tasks.

The most common graphic representation of schedulingresults is the Gantt chart [http://www.ganttchart.com/], firstestablished by Henry Gantt in 1910. The Gantt chart hasdiscrete time values on the x axis and processors on the y axis(see Fig. 1). Tasks are represented by a rectangle area on theintersection of the appropriate processor and the assignedtime. The form of the Gantt chart is identical for all time

12 © Czech Technical University Publishing House http://ctn.cvut.cz/ap/

Acta Polytechnica Vol. 48 No. 3/2008

Visualization and Simulation inSchedulingR. ČapekThis paper deals with the representation of scheduling results and it introduces a new tool for visualization and simulation in time

scheduling called VISIS. The purpose of this tool is to provide an environment for visualization, e.g. in production line scheduling. The simulation also proposes a way to simulate the influence of a schedule on a user defined system, e.g. for designing filters in digital signal processing. VISIS arises from representing scheduling results using the well-known Gantt chart. The application is implemented in the Matlab programming environment using Simulink and the Virtual Reality toolbox.

Keywords: Scheduling, visualization, simulation, Matlab, VISIS.

Page 2: visualization and simulation in scheduling

8/10/2019 visualization and simulation in scheduling

http://slidepdf.com/reader/full/visualization-and-simulation-in-scheduling 2/3

schedules represented by the start times and processing timesof the tasks. For the hoist scheduling problem [9], there isanother way to display the results (see Fig. 2). It is a chart withdiscrete time values on the xaxis again and on the yaxis thereare tanks where the material is processed. The time scheduleis then represented by lines denoting the moves of the hoists,

one type for loaded hoists, one for empty hoists, and one formaterial storage in tanks. This type of chart is special for thehoist scheduling problem, and it gives a better idea of thefinal result, although understanding is at first quite difficult. Visualizationshould arise fromthe individual problemdefini-tion instead of one general form.

3 Implementation As mentioned above, this project is realized completely in

the Matlab environment, and the output of the application isa Simulink scheme. Graphicalobjects forvisualization are cre-ated in VRedit (part of the Virtual Reality toolbox for Matlab)and the final visualization is displayed using the Virtual Real-ity toolbox. The VRedit environment allows us to define basicgeometrical objects, text, background, textures and complexpredefined objects. Each object in Virtual Reality has its ownset of variable parameters. The numerical value of any para-meter can be directly changed from Simulink.

The VISIS implementation provides several functionsavailable for users. For maximum simplicity of usage, theSimulink scheme is generated automatically. This outputschemecontains onemasked subsystemrepresenting thecon-trol system. In the case of visualization, there is another blockreferencing the predefined virtual reality world. The mask of the control subsystem has inputs and outputs with user-de-fined names and sizes. The core of the control subsystem isthe S-function block, which contains the main control func-tion. This function updates theoutputs according to thegivenschedule and the actual values of the inputs. This controlfunction is also generated automatically, and all needed ex-ternal data is created in the Matlab workspace before thesimulation begins. The S-function block has only one inputand output port as default so the in/out signals are inte-grated/divided to reach user defined number of inputs andoutputs. This subsystem is then masked as one block withappropriate ports. The Simulink scheme and code for theS-function block are both generated as text files from theprepared templates. The control function is called for eachsampleof Simulink,and theoutputs are updated according tothe schedule and the actual Simulink time.

All implemented functions can be called as standard Mat-lab functions. Users of VISIS are expected to have basicknowledge of using the TORSCHE toolbox, and to be able tocreate their own project in the Virtual Reality toolbox. Thefirst step in simulating or visualizing is to create a set of tasks(function taskset). Then the code of the operations has to beassigned to the tasks by the adduserparam function. This func-tion reads data from the given text file, and the user-definedcode is assigned to appropriate tasks in the taskset accordingto the format of the text file. The next step is to define theinput and output ports for the control block and inputs of the Virtual Reality block, if needed. Then the set of tasks has tobe scheduled using an appropriate scheduling algorithmand all created structures are passed to the main function

taskset2simulink, which creates the Simulink scheme and themain control function. Any other block can be added to thescheme before simulation begins. The application checks thecontrol function after it has been created, and if there is anystructural error, a warning is displayed. Then a visualizationcan be seenin the Virtual Reality world, with the standard

possibility to save any frame or video stream during thesimulation.

4 Examples and experimental results4.1 Hoist scheduling visualization

The hoist scheduling problem is chosen as an example for visualization. The classic representation of one period by theGantt chart is shown in Fig. 1, where each task represents onemove of a loaded hoist.

This representation does not reflect empty hoist moves.Temporary stays of the material in the tanks are also notclearly visible.A schedule of material moves is displayed inFig. 2. This representation gives a better idea about the real-ization of the schedule, and it also displays a sequence of

© Czech Technical University Publishing House http://ctn.cvut.cz/ap/ 13

Acta Polytechnica Vol. 48 No. 3/2008

Fig. 1: Gantt chart for hoist scheduling

Fig. 2: Special chart for hoist scheduling

Fig. 3: Frame of visualization

Page 3: visualization and simulation in scheduling

8/10/2019 visualization and simulation in scheduling

http://slidepdf.com/reader/full/visualization-and-simulation-in-scheduling 3/3