From 9c228e8b32a61820da649ec46d7a5e403f7df441 Mon Sep 17 00:00:00 2001
From: Georgios Dagkakis <georgios.dagkakis@ul.ie>
Date: Thu, 7 Aug 2014 09:28:45 +0100
Subject: [PATCH] class_name removed from more objects

---
 dream/simulation/CapacityStation.py | 5 +++--
 dream/simulation/Operator.py        | 4 ++--
 dream/simulation/Repairman.py       | 1 -
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/dream/simulation/CapacityStation.py b/dream/simulation/CapacityStation.py
index ce90fc15..2fb226f3 100644
--- a/dream/simulation/CapacityStation.py
+++ b/dream/simulation/CapacityStation.py
@@ -34,7 +34,7 @@ import simpy
 #                            the CapacityStation object
 # ===========================================================================
 class CapacityStation(Queue):
-    class_name = 'Dream.CapacityStation'
+    family='CapacityStation'
     
     #===========================================================================
     # the __init__ method of the CapacityStation
@@ -65,8 +65,9 @@ class CapacityStation(Queue):
     # =======================================================================
     def outputResultsJSON(self):
         from Globals import G
-        json = {'_class': self.class_name,
+        json = {'_class': 'Dream.%s' % self.__class__.__name__,
                 'id': self.id,
+                'family': self.family,
                 'results': {}}
         if (G.numberOfReplications == 1):
             # if we had just one replication output the results as numbers
diff --git a/dream/simulation/Operator.py b/dream/simulation/Operator.py
index d126a591..2e2bba94 100644
--- a/dream/simulation/Operator.py
+++ b/dream/simulation/Operator.py
@@ -35,8 +35,7 @@ from ObjectResource import ObjectResource
 #                 the resource that operates the machines
 # ===========================================================================
 class Operator(ObjectResource):
-    class_name = 'Dream.Operator'
-    
+    family='Operator'  
     
     def __init__(self, id, name, capacity=1, schedulingRule='FIFO'):
         ObjectResource.__init__(self)
@@ -357,6 +356,7 @@ class Operator(ObjectResource):
         from Globals import getConfidenceIntervals
         json = {'_class': self.class_name,
                 'id': self.id,
+                'family': self.family,
                 'results': {}}
         if(G.numberOfReplications==1):
             json['results']['working_ratio']=100*self.totalWorkingTime/G.maxSimTime
diff --git a/dream/simulation/Repairman.py b/dream/simulation/Repairman.py
index 71c6876f..5a8643d6 100644
--- a/dream/simulation/Repairman.py
+++ b/dream/simulation/Repairman.py
@@ -34,7 +34,6 @@ from Operator import Operator
 #                 the resource that repairs the machines
 # ===========================================================================
 class Repairman(Operator):
-    class_name = 'Dream.Repairman'
     def __init__(self, id, name, capacity=1):
         Operator.__init__(self,id=id, name=name, capacity=capacity)
         self.type="Repairman"
-- 
2.30.9