Commit 5a2f1cd0 authored by Georgios Dagkakis's avatar Georgios Dagkakis Committed by Jérome Perrin

class_name removed from Exit also and Job updated

parent 6e665e46
......@@ -34,7 +34,8 @@ from CoreObject import CoreObject
# The exit object
# ===========================================================================
class Exit(CoreObject):
class_name = 'Dream.Exit'
family='Exit'
def __init__(self, id, name=None):
if not name:
name = id
......@@ -215,7 +216,7 @@ class Exit(CoreObject):
def outputResultsJSON(self):
from Globals import G
from Globals import getConfidenceIntervals
json = { '_class': self.class_name,
json = { '_class': 'Dream.%s' % self.__class__.__name__,
'id': self.id,
'results': {} }
if(G.numberOfReplications==1):
......
......@@ -33,7 +33,8 @@ from Entity import Entity
# The job object
# =======================================================================
class Job(Entity): # inherits from the Entity class
type="Job"
type='Job'
family='Job'
def __init__(self, id=None, name=None, route=[], priority=0, dueDate=None, orderDate=None, extraPropertyDict=None,isCritical=False):
Entity.__init__(self, id=id,name=name, priority=priority, dueDate=dueDate, orderDate=orderDate, isCritical=isCritical)
......@@ -56,10 +57,9 @@ class Job(Entity): # inherits from the Entity c
def outputResultsJSON(self):
from Globals import G
if(G.numberOfReplications==1): #if we had just one replication output the results to excel
json={} # dictionary holding information related to the specific entity
json['_class'] = 'Dream.Job'
json['id'] = str(self.id)
json['results'] = {}
json = { '_class': 'Dream.%s' % self.__class__.__name__,
'id': self.id,
'results': {} }
#json['extraPropertyDict'] = self.extraPropertyDict
#if the Job has reached an exit, input completion time in the results
......
......@@ -43,6 +43,8 @@ from RandomNumberGenerator import RandomNumberGenerator
# the Machine object
# ===========================================================================
class Machine(CoreObject):
family='Server'
# =======================================================================
# initialise the id the capacity, of the resource and the distribution
# =======================================================================
......
......@@ -32,6 +32,8 @@ from CoreObject import CoreObject
# the Queue object
# ===========================================================================
class Queue(CoreObject):
family='Buffer'
#===========================================================================
# the __init__ method of the Queue
#===========================================================================
......
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