Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

logging/SGanttChart.h

Go to the documentation of this file.
00001 /* #start# ***********************************************************
00002 
00003                              Scheduling Simulator
00004                     Lehrstuhl f"ur Effiziente Algorithmen
00005                        Technische Universit"at M"unchen
00006 
00007  File    : $Id: SGanttChart.h,v 1.3 2002/11/13 19:00:13 taeubig Exp $
00008 
00009  Purpose : 
00010 
00011  RCS-Log:
00012  $Log: SGanttChart.h,v $
00013  Revision 1.3  2002/11/13 19:00:13  taeubig
00014  Adaptation of leda_seq_item for the old LEDA releases
00015 
00016  Revision 1.2  2002/11/10 20:32:20  taeubig
00017  namespace and header include changes
00018 
00019  Revision 1.1  2002/08/29 12:59:58  taeubig
00020  Added the sources
00021 
00022  Revision 1.9  2000/05/24 12:34:31  taeubig
00023  New compiler (gcc-2.95) and new Qt (2.1)
00024  Replaced "list" by "leda_list" etc.
00025 
00026  Revision 1.8  2000/01/17 10:17:25  zoidl
00027  little changes in javadocs
00028 
00029  Revision 1.7  2000/01/11 12:55:14  zoidl
00030  added javadoc comments
00031 
00032  Revision 1.6  1999/12/28 17:07:22  zoidl
00033  reset() on JOBRESET
00034 
00035  Revision 1.5  1999/12/14 11:33:22  zoidl
00036  added SGanttChart::reset(), call before new scheduling !
00037 
00038  Revision 1.4  1999/12/13 20:13:29  zoidl
00039  Gantt charts are build by SChartLog now, added support for shop jobs
00040 
00041  Revision 1.3  1999/11/03 12:35:19  zoidl
00042  changed from pointer to member variables
00043 
00044  Revision 1.2  1999/11/03 08:12:03  schickin
00045  Use of macros NOCOPY and DUMMYIO clarified
00046 
00047  Revision 1.1  1999/11/02 22:19:18  zoidl
00048  added SGanttChart
00049 
00050 
00051  * #end# ************************************************************* */
00052 
00053 #ifndef SGANTTCHART_H
00054 #define SGANTTCHART_H
00055 
00056 // system header files
00057 #include <LEDA/array.h>
00058 #include <LEDA/list.h>
00059 #ifndef leda_list_item
00060 #define leda_list_item list_item
00061 #endif
00062 #include <LEDA/sortseq.h>
00063 #ifndef leda_seq_item
00064 #define leda_seq_item seq_item
00065 #endif
00066 
00067 // project header files
00068 #include "../model/STaskSystem.h"
00069 
00074 class SGanttChart {
00075  public:
00076   NOCOPY(SGanttChart);
00077   DUMMYIO(SGanttChart);
00078 
00083   SGanttChart(STaskSystem& ts);
00084   
00088   ~SGanttChart();
00089 
00098   void jobAllocated(int jobIdx, int machine, double time, int operation = -1);
00105   void jobDeallocated(int jobIdx, int machine, double time);
00106   
00120   int getJob(int mach, double time, int& operation) const;
00121   
00136   int getMachine(int jobIdx, double time, int operation=-1) const;
00137 
00153   int getExecInfo(int jobIdx, leda_array<double>& start, leda_array<double>& end,
00154         leda_array<int>& machine, leda_array<int>& operation) const;
00155 
00163   const leda_list<double>& getTimeSteps() const 
00164     { return _timeSteps; }
00165 
00169   void reset();
00170   
00171  private:
00172   STaskSystem& _rTaskSys;
00173   // stores the list of time steps
00174   leda_list<double> _timeSteps;
00175   
00176   // stores the info about an execution interval of a job on a machine
00177   struct ExecIntrvlInfo {
00178     double startTime;
00179     double endTime;
00180     int machine;
00181     int operation;
00182   };
00183   
00184   // stores execution intervals for each job
00185   typedef leda_list<ExecIntrvlInfo*> JobToInfoList;
00186   leda_array<JobToInfoList> _jobToExecIntrvl; 
00187   // stores "time -> job" for each machine
00188   typedef leda_sortseq<double,int> TimeToJobSeq;
00189   leda_array<TimeToJobSeq*> _machAndTimeToJob;
00190 };
00191 
00192 #endif // SGANTTCHART_H

Generated on Thu May 22 16:48:08 2003 for Sketch-it! by doxygen1.2.18