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
9986bb6c
Commit
9986bb6c
authored
Aug 14, 2014
by
Georgios Dagkakis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
blocking also to be calculate by the state
parent
9503d779
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
72 additions
and
42 deletions
+72
-42
dream/simulation/CoreObject.py
dream/simulation/CoreObject.py
+8
-2
dream/simulation/Machine.py
dream/simulation/Machine.py
+58
-34
dream/simulation/MachineJobShop.py
dream/simulation/MachineJobShop.py
+6
-6
No files found.
dream/simulation/CoreObject.py
View file @
9986bb6c
...
...
@@ -154,7 +154,12 @@ class CoreObject(object):
self
.
op_col_indx
=
None
# flag that locks the entry of an object so that it cannot receive entities
self
.
isLocked
=
False
# flag that shows if the Machine is processing state at any given time
self
.
isProcessing
=
False
# flag that shows if the Machine is blocked state at any given time
self
.
isBlocked
=
False
# =======================================================================
# the main process of the core object
# this is dummy, every object must have its own implementation
...
...
@@ -196,7 +201,8 @@ class CoreObject(object):
# as argument by getEntity of the receiver
# =======================================================================
def
removeEntity
(
self
,
entity
=
None
):
self
.
addBlockage
()
self
.
isBlocked
=
False
self
.
addBlockage
()
activeObjectQueue
=
self
.
Res
.
users
activeObjectQueue
.
remove
(
entity
)
#remove the Entity from the queue
...
...
dream/simulation/Machine.py
View file @
9986bb6c
This diff is collapsed.
Click to expand it.
dream/simulation/MachineJobShop.py
View file @
9986bb6c
...
...
@@ -44,8 +44,11 @@ class MachineJobShop(Machine):
# actions to be carried out when the processing of an Entity ends
# =======================================================================
def
endProcessingActions
(
self
):
# set isProcessing to False
self
.
isProcessing
=
False
# add working time
self
.
totalWorkingTime
+=
self
.
env
.
now
-
self
.
timeLastProcessingStarted
self
.
timeLastBlockageStarted
=
self
.
env
.
now
activeObject
=
self
.
getActiveObject
()
activeObjectQueue
=
activeObject
.
Res
.
users
...
...
@@ -87,11 +90,6 @@ class MachineJobShop(Machine):
#do this so that if it is overtime working it is not counted as off-shift time
if
not
activeObject
.
onShift
:
activeObject
.
timeLastShiftEnded
=
self
.
env
.
now
# update the total working time # the total processing time for this entity is what the distribution initially gave
# if not self.shouldPreempt:
# activeObject.totalWorkingTime+=activeObject.totalProcessingTimeInCurrentEntity
# else:
# activeObject.totalWorkingTime+=self.env.now-(self.timeLastEntityEntered)
# update the variables keeping track of Entity related attributes of the machine
activeObject
.
timeLastEntityEnded
=
self
.
env
.
now
# this holds the time that the last entity ended processing in Machine
activeObject
.
nameLastEntityEnded
=
activeObject
.
currentEntity
.
name
# this holds the name of the last entity that ended processing in Machine
...
...
@@ -99,7 +97,9 @@ class MachineJobShop(Machine):
# reset flags
self
.
shouldPreempt
=
False
self
.
isProcessingInitialWIP
=
False
# blocking starts
self
.
isBlocked
=
True
# TODO: collapse that to Machine
...
...
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