1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# ===========================================================================
# Copyright 2013 University of Limerick
#
# This file is part of DREAM.
#
# DREAM is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# DREAM is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with DREAM. If not, see <http://www.gnu.org/licenses/>.
# ===========================================================================
'''
Created on 18 Aug 2013
@author: George
'''
'''
Class that acts as an abstract. It should have no instances. All the Entities should inherit from it
'''
#The entity object
class Entity(object):
type="Entity"
def __init__(self, name, priority=0, dueDate=0, orderDate=0):
self.name=name
self.currentStop=None #contains the current object that the material is in
self.creationTime=0
self.startTime=0 #holds the startTime for the lifespan
#dimension data
self.width=1.0
self.height=1.0
self.length=1.0
self.priority=priority
self.dueDate=dueDate
self.orderDate=orderDate
self.schedule=[] #a list that holds information about the schedule of the entity (when it enters and exits every station)
self.currentStation=None
#outputs results to JSON File
def outputResultsJSON(self):
pass
#initializes all the Entity for a new simulation replication
def initialize(self):
pass