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
92be67b6
Commit
92be67b6
authored
May 26, 2014
by
Ioannis Papagiannopoulos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
unused code removed
parent
8e5f31b4
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
14 deletions
+18
-14
dream/simulation/CoreObject.py
dream/simulation/CoreObject.py
+0
-6
dream/simulation/Entity.py
dream/simulation/Entity.py
+0
-4
dream/simulation/Exit.py
dream/simulation/Exit.py
+18
-4
No files found.
dream/simulation/CoreObject.py
View file @
92be67b6
...
...
@@ -484,12 +484,6 @@ class CoreObject(Process):
maxTimeWaiting
=
timeWaiting
return
giver
#===========================================================================
# checks whether the entity can proceed to a successor object
#===========================================================================
def
canEntityProceed
(
self
):
pass
# =======================================================================
# actions to be taken after the simulation ends
# =======================================================================
...
...
dream/simulation/Entity.py
View file @
92be67b6
...
...
@@ -65,10 +65,6 @@ class Entity(object):
self
.
candidateReceivers
=
[]
# list of candidateReceivers of the entity (those stations that can receive the entity
self
.
candidateReceiver
=
None
# the station that is finaly chosen to receive the entity
# variables used to avoid signalling the same object twice before it receives an entity
self
.
receiver
=
None
self
.
timeOfAssignement
=
0
# =======================================================================
# outputs results to JSON File
# =======================================================================
...
...
dream/simulation/Exit.py
View file @
92be67b6
...
...
@@ -102,10 +102,11 @@ class Exit(CoreObject):
activeEntity
=
CoreObject
.
getEntity
(
self
)
#run the default method
# if the entity is in the G.pendingEntities list then remove it from there
from
Globals
import
G
if
activeEntity
in
G
.
pendingEntities
:
G
.
pendingEntities
.
remove
(
activeEntity
)
if
activeEntity
in
G
.
EntityList
:
G
.
EntityList
.
remove
(
activeEntity
)
# if activeEntity in G.pendingEntities:
# G.pendingEntities.remove(activeEntity)
# if activeEntity in G.EntityList:
# G.EntityList.remove(activeEntity)
self
.
clear
(
activeEntity
)
self
.
totalLifespan
+=
now
()
-
activeEntity
.
startTime
#Add the entity's lifespan to the total one.
self
.
numOfExits
+=
1
# increase the exits by one
self
.
totalNumberOfUnitsExited
+=
activeEntity
.
numberOfUnits
# add the number of units that xited
...
...
@@ -115,6 +116,19 @@ class Exit(CoreObject):
del
self
.
Res
.
activeQ
[:]
return
activeEntity
@
staticmethod
def
clear
(
entity
):
from
Globals
import
G
def
deleteEntityfromlist
(
entity
,
list
):
if
entity
in
list
:
list
.
remove
(
entity
)
lists
=
(
G
.
EntityList
,
G
.
PartList
,
G
.
pendingEntities
,
G
.
WipList
)
# lists=(G.EntityList, G.PartList, G.BatchList, G.SubBatchList,
# G.JobList, G.OrderList, G.OrderComponentList, G.MouldList,
# G.pendingEntities, G.WipList)
for
list
in
lists
:
deleteEntityfromlist
(
entity
,
list
)
#===========================================================================
# haveToDispose of an exit must always return False
#===========================================================================
...
...
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