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