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
204fde5c
Commit
204fde5c
authored
Feb 04, 2014
by
Georgios Dagkakis
Committed by
Jérome Perrin
Feb 07, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MachineJobShop/ManagedJob updated so that the loadtime is read before the Entity is obtained
parent
87962157
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
4 deletions
+16
-4
dream/simulation/MachineJobShop.py
dream/simulation/MachineJobShop.py
+15
-4
dream/simulation/MachineManagedJob.py
dream/simulation/MachineManagedJob.py
+1
-0
No files found.
dream/simulation/MachineJobShop.py
View file @
204fde5c
...
...
@@ -56,10 +56,6 @@ class MachineJobShop(Machine):
setupTime
=
activeEntity
.
remainingRoute
[
0
].
get
(
'setupTime'
,{})
self
.
distType
=
setupTime
.
get
(
'setupDistribution'
,
'Fixed'
)
self
.
setupTime
=
float
(
setupTime
.
get
(
'setupMean'
,
0
))
loadTime
=
activeEntity
.
remainingRoute
[
0
].
get
(
'loadTime'
,{})
self
.
distType
=
loadTime
.
get
(
'loadDistribution'
,
'Fixed'
)
self
.
loadTime
=
float
(
loadTime
.
get
(
'loadMean'
,
0
))
import
Globals
# read the list of next stations
...
...
@@ -190,4 +186,19 @@ class MachineJobShop(Machine):
self
.
receiver
.
timeLastEntityEnded
=
now
()
#required to count blockage correctly in the preemptied station
reactivate
(
self
)
#just extend the default behaviour in order to read the load time from the Entity to be obtained
def
canAcceptAndIsRequested
(
self
):
if
Machine
.
canAcceptAndIsRequested
(
self
):
self
.
readLoadTime
()
return
True
return
False
#to be called by canAcceptAndIsRequested if it is to return True.
#the load timeof the Entity must be read
def
readLoadTime
(
self
):
self
.
giver
.
sortEntities
()
activeEntity
=
self
.
giver
.
getActiveObjectQueue
()[
0
]
loadTime
=
activeEntity
.
remainingRoute
[
0
].
get
(
'loadTime'
,{})
self
.
distType
=
loadTime
.
get
(
'loadDistribution'
,
'Fixed'
)
self
.
loadTime
=
float
(
loadTime
.
get
(
'loadMean'
,
0
))
\ No newline at end of file
dream/simulation/MachineManagedJob.py
View file @
204fde5c
...
...
@@ -101,6 +101,7 @@ class MachineManagedJob(MachineJobShop):
#make the operatorsList so that it holds only the manager of the current order
activeObject
.
operatorPool
.
operatorsList
=
[
activeObject
.
giver
.
getActiveObjectQueue
()[
0
].
manager
]
activeObject
.
operatorPool
.
operators
=
[
activeObject
.
giver
.
getActiveObjectQueue
()[
0
].
manager
]
self
.
readLoadTime
()
return
True
else
:
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