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
18191053
Commit
18191053
authored
May 26, 2014
by
Ioannis Papagiannopoulos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
clean-up
parent
245b8ef7
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
5 additions
and
46 deletions
+5
-46
dream/simulation/BatchDecomposition.py
dream/simulation/BatchDecomposition.py
+0
-2
dream/simulation/Entity.py
dream/simulation/Entity.py
+2
-24
dream/simulation/Exit.py
dream/simulation/Exit.py
+3
-2
dream/simulation/Source.py
dream/simulation/Source.py
+0
-18
No files found.
dream/simulation/BatchDecomposition.py
View file @
18191053
...
...
@@ -179,8 +179,6 @@ class BatchDecomposition(CoreObject):
activeObjectQueue
.
append
(
subBatch
)
#append the sub-batch to the active object Queue
activeEntity
.
subBatchList
.
append
(
subBatch
)
subBatch
.
currentStation
=
self
# if the activeEntity is hot then the subBatches should be also hot
subBatch
.
hot
=
activeEntity
.
hot
# if the activeEntity is in the pendingEntities list then place the subBatches there
if
activeEntity
in
G
.
pendingEntities
:
G
.
pendingEntities
.
append
(
subBatch
)
...
...
dream/simulation/Entity.py
View file @
18191053
...
...
@@ -57,9 +57,6 @@ class Entity(object):
self
.
isCritical
=
isCritical
# flag to inform weather the entity is critical -> preemption
self
.
manager
=
None
# default value
self
.
numberOfUnits
=
1
# default value
# flag that signalizes that an entity is ready to enter a machine
# gets cold by the time it has finished its processing
self
.
hot
=
False
# variable used to differentiate entities with and entities without routes
self
.
family
=
'Entity'
...
...
@@ -104,25 +101,6 @@ class Entity(object):
router
.
conflictingEntities
.
append
(
self
)
return
availableReceiver
#===========================================================================
# assign the entity to a station
#===========================================================================
def
assignTo
(
self
,
object
=
None
):
self
.
receiver
=
object
self
.
timeOfAssignement
=
now
()
#===========================================================================
# unassign the entity from the object it is currently assigned to
#===========================================================================
def
unassign
(
self
):
self
.
receiver
=
None
self
.
timeOfAssignement
=
0
#===========================================================================
# returns the object the entity is currently assigned to
#===========================================================================
def
isAssignedTo
(
self
):
return
self
.
receiver
# =======================================================================
# outputs results to JSON File
# =======================================================================
...
...
dream/simulation/Exit.py
View file @
18191053
...
...
@@ -91,7 +91,6 @@ class Exit(CoreObject):
# get the active object and its internal queue
activeObject
=
self
.
getActiveObject
()
activeObjectQueue
=
self
.
getActiveObjectQueue
()
# giverObject=activeObject.getGiverObject()
giverObject
=
callerObject
assert
giverObject
,
'there must be a caller for canAcceptAndIsRequested'
return
giverObject
.
haveToDispose
(
self
)
...
...
@@ -105,13 +104,15 @@ class Exit(CoreObject):
from
Globals
import
G
if
activeEntity
in
G
.
pendingEntities
:
G
.
pendingEntities
.
remove
(
activeEntity
)
if
activeEntity
in
G
.
EntityList
:
G
.
EntityList
.
remove
(
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
self
.
totalTaktTime
+=
now
()
-
self
.
timeLastEntityLeft
# add the takt time
self
.
timeLastEntityLeft
=
now
()
# update the time that the last entity left from the Exit
activeObjectQueue
=
self
.
getActiveObjectQueue
()
del
activeObjectQueue
[:]
del
self
.
Res
.
activeQ
[:]
return
activeEntity
#===========================================================================
...
...
dream/simulation/Source.py
View file @
18191053
...
...
@@ -161,24 +161,6 @@ class Source(CoreObject):
activeEntity
=
entity
# at the newly created entity to the pendingEntities
G
.
pendingEntities
.
append
(
activeEntity
)
# TODO: if the successor of the object is a machine that is operated with operationType 'Load'
# then the flag hot of the activeEntity must be set to True
# to signalize that the entity has reached its final destination before the next Machine
# if the entity is not of type Job
if
activeEntity
.
family
==
'Entity'
:
successorsAreMachines
=
True
# for all the objects in the next list
for
object
in
self
.
next
:
# if the object is not in the MachineList
# TODO: We must consider also the case that entities can be blocked before they can reach
# the heating point. In such a case they must be removed from the G.pendingEntities list
# and added again after they are unblocked
if
not
object
in
G
.
MachineList
:
successorsAreMachines
=
False
break
# the hot flag should not be raised
if
successorsAreMachines
:
activeEntity
.
hot
=
True
#============================================================================
# sets the routing out element for the Source
...
...
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