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

model/env/SIdentical.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: SIdentical.h,v 1.5 2003/01/08 18:57:13 meierb Exp $
00008 
00009  Purpose : 
00010 
00011  RCS-Log:
00012  $Log: SIdentical.h,v $
00013  Revision 1.5  2003/01/08 18:57:13  meierb
00014  added randomized release times
00015 
00016  Revision 1.1.1.1  2002/12/02 22:26:19  meierb
00017  my_schedule
00018 
00019  Revision 1.3  2002/11/10 18:05:42  taeubig
00020  namespace and header include changes
00021 
00022  Revision 1.2  2002/11/07 12:33:25  taeubig
00023  Added class keyword to friend declaration
00024 
00025  Revision 1.1  2002/08/29 12:59:59  taeubig
00026  Added the sources
00027 
00028  Revision 1.1  2000/05/29 19:44:28  taeubig
00029  Moved environment related files into subdirectory env
00030 
00031  Revision 1.11  2000/05/24 12:46:03  taeubig
00032  New compiler (gcc-2.95) and new Qt (2.1)
00033  Replaced "list" by "leda_list" etc.
00034 
00035  Revision 1.10  2000/01/13 16:44:12  zoidl
00036  added javadoc comments
00037 
00038  Revision 1.9  1999/12/02 02:26:21  taeubig
00039  Project now compiles with gcc 2.95.2
00040  (inheritance of class SSingle corrected)
00041 
00042  Revision 1.8  1999/06/17 16:34:29  hall
00043  STopology changed, tuned STSysSchedEvent-stuff and lost more!
00044 
00045  Revision 1.7  1999/04/27 13:39:17  schickin
00046  well folks, that's the first demo version that really runs 8-)
00047 
00048  Revision 1.6  1999/03/31 11:13:23  hall
00049  added a few output operators and save routines
00050 
00051  Revision 1.5  1999/03/29 12:48:51  schickin
00052  design of modifiers changed (SFooMod is now a member of SFoo). the stuff
00053  compiles and a simple test program runs fine.
00054 
00055  Revision 1.4  1999/03/23 14:26:39  schickin
00056  a lot of new code in /model: things compile but have no functionality
00057 
00058  Revision 1.3  1999/02/12 11:55:38  hall
00059  impl. SEnvironment slice
00060 
00061  Revision 1.2  1999/01/29 10:03:35  schickin
00062  Project-Headers added.
00063 
00064 
00065  * #end# ************************************************************* */
00066 
00067 #ifndef SIDENTICAL_H
00068 #define SIDENTICAL_H
00069 
00070 // system header files
00071 #include <LEDA/matrix.h>
00072 #include <LEDA/vector.h>
00073 
00074 // project header files
00075 #include "SIdenticalMod.h"
00076 #include "SUniform.h"
00077 
00078 // -----------------------------------------------------------------------
00084 class SIdentical : public virtual SUniform {
00085   TYPEINFO1(SIdentical, "P", SUniform);
00086   friend class SIdenticalMod;
00087  public:
00090   SIdentical() : _mod(*this) {};
00091   
00092   // inherited member functions
00095   virtual SEnvironmentMod &getModifier()
00096     { return _mod; };
00097   
00098   /* Return the number of machines.
00099    */
00100   virtual int getNumOfMachines() const { return _speedsMat.dim1(); };
00101   
00107   virtual const leda_matrix &getSpeedsMatrix() const { 
00108     return _speedsMat; 
00109   };
00116   virtual double getSpeed(int machine, const SJob& job) const {
00117     return 1.0;
00118   };
00119   
00126   virtual const leda_vector &getSpeedsVector() {
00127     return _speedsVec;
00128   }
00132   virtual double getSpeed(int machine) const {
00133     return 1.0;
00134   }
00135 private:
00136   SIdenticalMod _mod;
00137   leda_matrix _speedsMat;
00138   leda_vector _speedsVec;
00139 };
00140 // -----------------------------------------------------------------------
00141 std::ostream& operator<<(std::ostream& out, SIdentical &env);  
00142 // -----------------------------------------------------------------------
00143 
00144 #endif //SIDENTICAL_H

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