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
06e912a9
Commit
06e912a9
authored
Apr 07, 2014
by
Ioannis Papagiannopoulos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
entityToGet updated also when operationType is only Processing
parent
fcf1f2e8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
47 additions
and
1 deletion
+47
-1
dream/simulation/MachineManagedJob.py
dream/simulation/MachineManagedJob.py
+47
-1
No files found.
dream/simulation/MachineManagedJob.py
View file @
06e912a9
...
...
@@ -132,7 +132,7 @@ class MachineManagedJob(MachineJobShop):
if
(
timeWaiting
>=
maxTimeWaiting
):
activeObject
.
giver
=
object
# set the giver
maxTimeWaiting
=
timeWaiting
# if the multOperationTypeList of the machine contains Load or Setup
if
(
activeObject
.
operatorPool
!=
'None'
and
(
any
(
type
==
'Load'
for
type
in
activeObject
.
multOperationTypeList
)
\
or
any
(
type
==
'Setup'
for
type
in
activeObject
.
multOperationTypeList
))):
if
isRequested
:
...
...
@@ -168,6 +168,52 @@ class MachineManagedJob(MachineJobShop):
# if entity not in self.entitiesToGet:
# self.entitiesToGet.append(entity)
# # activeObject.giver.assignExit()
# return True
else
:
return
False
# if the multOperationTypeList contains only Processing
elif
(
activeObject
.
operatorPool
!=
'None'
and
any
(
type
==
'Processing'
for
type
in
activeObject
.
multOperationTypeList
)):
if
isRequested
:
# TODO: check whether this entity is the one to be hand in
# to be used in operatorPreemptive
activeObject
.
requestingEntity
=
activeObject
.
giver
.
getActiveObjectQueue
()[
0
]
# TODO: update the object requesting the operator
activeObject
.
operatorPool
.
requestingObject
=
activeObject
.
giver
# TODO: update the last object calling the operatorPool
activeObject
.
operatorPool
.
receivingObject
=
activeObject
# TODO: the operator must not be available for the object to receive the entity
# the exit of the giver should not be assigned
# the manager must not be available for the entity to be delivered
# the machine can be appended to the activeCallersList of the manager
# there may be a problem with the activeCallersList as the Router may assign
# the operator to the machine while he is not needed for receiving the entity
# the entityToGet should be updated
if
activeObject
.
Up
and
len
(
activeObjectQueue
)
<
activeObject
.
capacity
:
#\
# and self.checkOperator()\
# and not activeObject.giver.exitIsAssigned():
# activeObject.giver.assignExit()
# # if the activeObject is not in manager's activeCallersList of the entityToGet
# if self not in activeObject.giver.getActiveObjectQueue()[0].manager.activeCallersList:
# # append it to the activeCallerList of the manager of the entity to be received
# activeObject.giver.getActiveObjectQueue()[0].manager.activeCallersList.append(self)
# # update entityToGet
# self.entityToGet=activeObject.giver.getActiveObjectQueue()[0]
self
.
entityToGet
=
activeObject
.
giver
.
getActiveObjectQueue
()[
0
]
#make the operators List so that it holds only the manager of the current order
activeObject
.
operatorPool
.
operators
=
[
activeObject
.
giver
.
getActiveObjectQueue
()[
0
].
manager
]
# read the load time of the machine
self
.
readLoadTime
()
return
True
# if activeObject.Up and len(activeObjectQueue)<activeObject.capacity:
# if not activeObject.giver.exitIsAssigned():
# for entity in activeObject.giver.getActiveObjectQueue():
# if activeObject.checkOperator(entity):
# if self not in entity.manager.activeCallersList:
# entity.manager.activeCallersList.append(self)
# if entity not in self.entitiesToGet:
# self.entitiesToGet.append(entity)
# # activeObject.giver.assignExit()
# 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