Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
dream
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
dream
Commits
5e38cf4a
Commit
5e38cf4a
authored
Oct 24, 2013
by
Ioannis Papagiannopoulos
Committed by
Sebastien Robin
Nov 06, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comments added to Entity.py
parent
30906a7a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
9 deletions
+14
-9
dream/simulation/Entity.py
dream/simulation/Entity.py
+14
-9
No files found.
dream/simulation/Entity.py
View file @
5e38cf4a
...
@@ -25,30 +25,35 @@ Created on 18 Aug 2013
...
@@ -25,30 +25,35 @@ Created on 18 Aug 2013
Class that acts as an abstract. It should have no instances. All the Entities should inherit from it
Class that acts as an abstract. It should have no instances. All the Entities should inherit from it
'''
'''
#
The entity object
#
======================== The entity object ================================
class
Entity
(
object
):
class
Entity
(
object
):
type
=
"Entity"
type
=
"Entity"
def
__init__
(
self
,
name
,
priority
=
0
,
dueDate
=
0
,
orderDate
=
0
):
def
__init__
(
self
,
name
,
priority
=
0
,
dueDate
=
0
,
orderDate
=
0
):
self
.
name
=
name
self
.
name
=
name
# information on the object holding the entity
# initialized as None and updated every time an entity enters a new object
self
.
currentStop
=
None
#contains the current object that the material is in
self
.
currentStop
=
None
#contains the current object that the material is in
# information on the lifespan of the entity
self
.
creationTime
=
0
self
.
creationTime
=
0
self
.
startTime
=
0
#holds the startTime for the lifespan
self
.
startTime
=
0
#holds the startTime for the lifespan
#
dimension data
#
dimension data of the entity
self
.
width
=
1.0
self
.
width
=
1.0
self
.
height
=
1.0
self
.
height
=
1.0
self
.
length
=
1.0
self
.
length
=
1.0
# information concerning the sorting of the entities inside (for example) queues
self
.
priority
=
priority
self
.
priority
=
priority
self
.
dueDate
=
dueDate
self
.
dueDate
=
dueDate
self
.
orderDate
=
orderDate
self
.
orderDate
=
orderDate
self
.
schedule
=
[]
#a list that holds information about the schedule of the entity (when it enters and exits every station)
# a list that holds information about the schedule
# of the entity (when it enters and exits every station)
self
.
schedule
=
[]
self
.
currentStation
=
None
self
.
currentStation
=
None
#
outputs results to JSON File
#
=============== outputs results to JSON File ==========================
def
outputResultsJSON
(
self
):
def
outputResultsJSON
(
self
):
pass
pass
#
initializes all the Entity for a new simulation replication
#
=====initializes all the Entity for a new simulation replication ======
def
initialize
(
self
):
def
initialize
(
self
):
pass
pass
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment