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
27ec6797
Commit
27ec6797
authored
Aug 06, 2014
by
Georgios Dagkakis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MachineJobShop to be able to accept wip
parent
00224f30
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
1 deletion
+13
-1
dream/simulation/MachineJobShop.py
dream/simulation/MachineJobShop.py
+13
-1
No files found.
dream/simulation/MachineJobShop.py
View file @
27ec6797
...
@@ -93,8 +93,9 @@ class MachineJobShop(Machine):
...
@@ -93,8 +93,9 @@ class MachineJobShop(Machine):
activeObject
.
timeLastEntityEnded
=
self
.
env
.
now
# this holds the time that the last entity ended processing in 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
activeObject
.
nameLastEntityEnded
=
activeObject
.
currentEntity
.
name
# this holds the name of the last entity that ended processing in Machine
activeObject
.
completedJobs
+=
1
# Machine completed one more Job
activeObject
.
completedJobs
+=
1
# Machine completed one more Job
# reset
ing the preemption flag
# reset
flags
self
.
shouldPreempt
=
False
self
.
shouldPreempt
=
False
self
.
isProcessingInitialWIP
=
False
# TODO: collapse that to Machine
# TODO: collapse that to Machine
...
@@ -143,6 +144,17 @@ class MachineJobShop(Machine):
...
@@ -143,6 +144,17 @@ class MachineJobShop(Machine):
# calculates the processing time
# calculates the processing time
# =======================================================================
# =======================================================================
def
calculateProcessingTime
(
self
):
def
calculateProcessingTime
(
self
):
# this is only for processing of the initial wip
if
self
.
isProcessingInitialWIP
:
# read the processing/setup/load times from the first entry of the full route
activeEntity
=
self
.
getActiveObjectQueue
()[
0
]
processingTime
=
activeEntity
.
route
[
0
].
get
(
'processingTime'
,{})
self
.
distType
=
processingTime
.
get
(
'distributionType'
,
'Fixed'
)
self
.
procTime
=
float
(
processingTime
.
get
(
'mean'
,
0
))
setupTime
=
activeEntity
.
route
[
0
].
get
(
'setupTime'
,{})
self
.
distType
=
setupTime
.
get
(
'distributionType'
,
'Fixed'
)
self
.
setupTime
=
float
(
setupTime
.
get
(
'mean'
,
0
))
return
self
.
procTime
#this is the processing time for this unique entity
return
self
.
procTime
#this is the processing time for this unique entity
# =======================================================================
# =======================================================================
...
...
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