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

model/env/SUnrelated.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: SUnrelated.h,v 1.6 2003/01/24 10:04:59 hall Exp $
00008 
00009  Purpose : 
00010 
00011  RCS-Log:
00012  $Log: SUnrelated.h,v $
00013  Revision 1.6  2003/01/24 10:04:59  hall
00014  brdCast stuff
00015 
00016  Revision 1.5  2003/01/08 18:57:13  meierb
00017  added randomized release times
00018 
00019  Revision 1.2  2002/12/12 19:08:56  meierb
00020  *** empty log message ***
00021 
00022  Revision 1.1.1.1  2002/12/02 22:26:19  meierb
00023  my_schedule
00024 
00025  Revision 1.3  2002/11/10 18:05:42  taeubig
00026  namespace and header include changes
00027 
00028  Revision 1.2  2002/11/07 12:33:25  taeubig
00029  Added class keyword to friend declaration
00030 
00031  Revision 1.1  2002/08/29 12:59:59  taeubig
00032  Added the sources
00033 
00034  Revision 1.2  2001/05/16 13:20:00  taeubig
00035  QT headers are included last because of "slots" conflict
00036 
00037  Revision 1.1  2000/05/29 19:44:43  taeubig
00038  Moved environment related files into subdirectory env
00039 
00040  Revision 1.12  2000/05/24 12:46:34  taeubig
00041  New compiler (gcc-2.95) and new Qt (2.1)
00042  Replaced "list" by "leda_list" etc.
00043 
00044  Revision 1.11  2000/01/13 16:44:11  zoidl
00045  added javadoc comments
00046 
00047  Revision 1.10  1999/06/17 16:34:55  hall
00048  STopology changed, tuned STSysSchedEvent-stuff and lost more!
00049 
00050  Revision 1.9  1999/05/06 14:51:45  schickin
00051  event handling by jobs and machines redesigned
00052 
00053  Revision 1.8  1999/04/27 13:39:49  schickin
00054  well folks, that's the first demo version that really runs 8-)
00055 
00056  Revision 1.7  1999/03/31 11:13:38  hall
00057  added a few output operators and save routines
00058 
00059  Revision 1.6  1999/03/29 12:49:06  schickin
00060  design of modifiers changed (SFooMod is now a member of SFoo). the stuff
00061  compiles and a simple test program runs fine.
00062 
00063  Revision 1.5  1999/03/23 14:27:04  schickin
00064  a lot of new code in /model: things compile but have no functionality
00065 
00066  Revision 1.4  1999/02/12 11:55:56  hall
00067  impl. SEnvironment slice
00068 
00069  Revision 1.3  1999/02/10 15:05:55  schickin
00070  model-directory can be compiled now
00071 
00072  Revision 1.2  1999/01/29 10:04:04  schickin
00073  Project-Headers added.
00074 
00075 
00076  * #end# ************************************************************* */
00077 
00078 #ifndef SUNRELATED_H
00079 #define SUNRELATED_H
00080 
00081 // system header files
00082 #include <LEDA/matrix.h>
00083 
00084 // project header files
00085 #include "SEnvironment.h"
00086 #include "SUnrelatedMod.h"
00087 #include "../SMachines.h"
00088 #include "../jobs/SJob.h"
00089 
00090 // -----------------------------------------------------------------------
00096 class SUnrelated : public virtual SEnvironment {
00097   TYPEINFO0(SUnrelated, "R");
00098   friend class SUnrelatedMod;
00099 public:
00102   SUnrelated() : _mod(*this) {};
00103 
00104   // inherited member functions
00105   
00108   virtual SEnvironmentMod &getModifier() { return _mod; };
00109 
00110   /* Return the number of machines.
00111    */
00112   virtual int getNumOfMachines() const { return _speedsMat.dim1(); };
00113 
00114   // new member functions
00115   
00120   virtual const leda_matrix &getSpeedsMatrix() const { 
00121     return _speedsMat; 
00122   };
00123 
00129   virtual double getSpeed(int machine, const SJob& job) const {
00130     return _speedsMat(machine, job.getIndex());
00131   };
00132   
00139   virtual double getRemProcTimeOn(SJob& job,
00140           const SMachines& machines) const
00141   {  return job.getRemProcTime() / getSpeed(machines.getPos(job), job); };
00142 
00143 private:
00144   SUnrelatedMod _mod;
00145   leda_matrix _speedsMat;
00146 };
00147 // -----------------------------------------------------------------------
00148 std::ostream& operator<<(std::ostream& out, SUnrelated &env);  
00149 // -----------------------------------------------------------------------
00150 
00151 #endif //SUNRELATED_H

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