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
07960299
Commit
07960299
authored
Dec 02, 2013
by
Ioannis Papagiannopoulos
Committed by
Sebastien Robin
Dec 11, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
variable exitAssignedToReceiver added. This variable assignes the exit of an object to a successor
parent
b60a693b
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
45 additions
and
4 deletions
+45
-4
dream/simulation/Assembly.py
dream/simulation/Assembly.py
+5
-1
dream/simulation/Conveyer.py
dream/simulation/Conveyer.py
+5
-0
dream/simulation/CoreObject.py
dream/simulation/CoreObject.py
+29
-3
dream/simulation/Dismantle.py
dream/simulation/Dismantle.py
+6
-0
No files found.
dream/simulation/Assembly.py
View file @
07960299
...
...
@@ -64,7 +64,11 @@ class Assembly(CoreObject):
self
.
predecessorIndex
=
0
#holds the index of the predecessor from which the Assembly will take an entity next
self
.
successorIndex
=
0
#holds the index of the successor where the Assembly will dispose an entity next
# ============================== variable that is used for the loading of machines =============
self
.
exitAssignedToReceiver
=
False
# by default the objects are not blocked
# when the entities have to be loaded to operatedMachines
# then the giverObjects have to be blocked for the time
# that the machine is being loaded
def
initialize
(
self
):
Process
.
__init__
(
self
)
...
...
dream/simulation/Conveyer.py
View file @
07960299
...
...
@@ -53,6 +53,11 @@ class Conveyer(CoreObject):
self
.
predecessorIndex
=
0
#holds the index of the predecessor from which the Conveyer will take an entity next
self
.
successorIndex
=
0
#holds the index of the successor where the Queue Conveyer dispose an entity next
# ============================== variable that is used for the loading of machines =============
self
.
exitAssignedToReceiver
=
False
# by default the objects are not blocked
# when the entities have to be loaded to operatedMachines
# then the giverObjects have to be blocked for the time
# that the machine is being loaded
def
initialize
(
self
):
Process
.
__init__
(
self
)
...
...
dream/simulation/CoreObject.py
View file @
07960299
...
...
@@ -63,8 +63,13 @@ class CoreObject(Process):
self
.
waitToDispose
=
False
#shows if the object waits to dispose an entity
# ============================== the below are currently used in Jobshop =======================
self
.
giver
=
None
#the CoreObject that the activeObject will take an Entity from
self
.
receiver
=
None
#the CoreObject that the activeObject will give an Entity to
self
.
giver
=
None
#the CoreObject that the activeObject will take an Entity from
self
.
receiver
=
None
#the CoreObject that the activeObject will give an Entity to
# ============================== variable that is used for the loading of machines =============
self
.
exitAssignedToReceiver
=
False
# by default the objects are not blocked
# when the entities have to be loaded to operatedMachines
# then the giverObjects have to be blocked for the time
# that the machine is being loaded
# ======================== the main process of the core object =================================
# ================ this is dummy, every object must have its own implementation ================
...
...
@@ -105,6 +110,9 @@ class CoreObject(Process):
activeObjectQueue
.
append
(
activeEntity
)
#remove the entity from the previous object
giverObject
.
removeEntity
()
# if the giverObject is blocked then unBlock it
if
giverObject
.
exitIsAssigned
():
giverObject
.
unAssignExit
()
#append the time to schedule so that it can be read in the result
#remember that every entity has it's schedule which is supposed to be updated every time
# the entity enters a new object
...
...
@@ -199,4 +207,22 @@ class CoreObject(Process):
# calculates the processing time
# =======================================================================
def
calculateProcessingTime
(
self
):
return
self
.
rng
.
generateNumber
()
# this is if we have a default processing time for all the entities
\ No newline at end of file
return
self
.
rng
.
generateNumber
()
# this is if we have a default processing time for all the entities
# =======================================================================
# checks if the machine is blocked
# =======================================================================
def
exitIsAssigned
(
self
):
return
self
.
exitAssignedToReceiver
# =======================================================================
# assign Exit of the object
# =======================================================================
def
assignExit
(
self
):
self
.
exitAssignedToReceiver
=
True
# =======================================================================
# unblock the object
# =======================================================================
def
unAssignExit
(
self
):
self
.
exitAssignedToReceiver
=
False
\ No newline at end of file
dream/simulation/Dismantle.py
View file @
07960299
...
...
@@ -63,6 +63,12 @@ class Dismantle(CoreObject):
self
.
Blockage
=
[]
self
.
predecessorIndex
=
0
#holds the index of the predecessor from which the Dismantle will take an entity next
self
.
successorIndex
=
0
#holds the index of the successor where the Dismantle will dispose an entity next
# ============================== variable that is used for the loading of machines =============
self
.
exitAssignedToReceiver
=
False
# by default the objects are not blocked
# when the entities have to be loaded to operatedMachines
# then the giverObjects have to be blocked for the time
# that the machine is being loaded
def
initialize
(
self
):
...
...
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