Commit b9879de9 authored by Georgios Dagkakis's avatar Georgios Dagkakis

class_name removed from more objects

parent 40ccd691
......@@ -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
......
......@@ -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
......
......@@ -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"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment