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
f7b761c8
Commit
f7b761c8
authored
Mar 05, 2014
by
Ioannis Papagiannopoulos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
temporary comments added to MachineManagedJob
parent
3de79738
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
7 deletions
+31
-7
dream/simulation/MachineManagedJob.py
dream/simulation/MachineManagedJob.py
+31
-7
No files found.
dream/simulation/MachineManagedJob.py
View file @
f7b761c8
...
@@ -85,6 +85,17 @@ class MachineManagedJob(MachineJobShop):
...
@@ -85,6 +85,17 @@ class MachineManagedJob(MachineJobShop):
#return according to the state of the Queue
#return according to the state of the Queue
return
len
(
activeObject
.
getActiveObjectQueue
())
<
activeObject
.
capacity
\
return
len
(
activeObject
.
getActiveObjectQueue
())
<
activeObject
.
capacity
\
and
activeObject
.
Up
and
activeObject
.
Up
# activeEntities=[]
# for entity in thecaller.getActiveObjectQueue():
# if entity.manager.checkIfResourceIsAvailable(self):
# activeEntities.append(entity)
#
# if len(activeEntities)>0:
# for entity in activeEntities:
# if activeObject.id in entity.remainingRoute[0].get('stationIdsList',[]):
# return len(activeObject.getActiveObjectQueue())<activeObject.capacity\
# and activeObject.Up
return
False
return
False
# =======================================================================
# =======================================================================
...
@@ -139,13 +150,19 @@ class MachineManagedJob(MachineJobShop):
...
@@ -139,13 +150,19 @@ class MachineManagedJob(MachineJobShop):
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
#make the operators List so that it holds only the manager of the current order
activeObject
.
operatorPool
.
operators
=
[
activeObject
.
giver
.
getActiveObjectQueue
()[
0
].
manager
]
activeObject
.
operatorPool
.
operators
=
[
activeObject
.
giver
.
getActiveObjectQueue
()[
0
].
manager
]
# # set the variable operatorAssignedTo to activeObject, the operator is then blocked
# activeObject.operatorPool.operators[0].operatorAssignedTo=activeObject
# # TESTING
# print now(), activeObject.operatorPool.operators[0].objName, 'got assigned to', activeObject.id
# read the load time of the machine
# read the load time of the machine
self
.
readLoadTime
()
self
.
readLoadTime
()
return
True
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
:
else
:
return
False
return
False
else
:
else
:
...
@@ -159,7 +176,7 @@ class MachineManagedJob(MachineJobShop):
...
@@ -159,7 +176,7 @@ class MachineManagedJob(MachineJobShop):
# =======================================================================
# =======================================================================
# to be called by canAcceptAndIsRequested and check for the operator
# to be called by canAcceptAndIsRequested and check for the operator
# =======================================================================
# =======================================================================
def
checkOperator
(
self
):
def
checkOperator
(
self
):
#, candidateEntity=None):
if
self
.
giver
.
getActiveObjectQueue
()[
0
].
manager
:
if
self
.
giver
.
getActiveObjectQueue
()[
0
].
manager
:
manager
=
self
.
giver
.
getActiveObjectQueue
()[
0
].
manager
manager
=
self
.
giver
.
getActiveObjectQueue
()[
0
].
manager
# print ''
# print ''
...
@@ -168,6 +185,13 @@ class MachineManagedJob(MachineJobShop):
...
@@ -168,6 +185,13 @@ class MachineManagedJob(MachineJobShop):
return
manager
.
checkIfResourceIsAvailable
()
return
manager
.
checkIfResourceIsAvailable
()
else
:
else
:
return
True
return
True
# if candidateEntity:
# if candidateEntity.manager:
# manager=candidateEntity.manager
# return manager.checkIfResourceIsAvailable()
# else:
# return True
# return False
# =======================================================================
# =======================================================================
# identifies the Entity to be obtained so that
# identifies the Entity to be obtained so that
...
...
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