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
7096353c
Commit
7096353c
authored
May 20, 2014
by
Ioannis Papagiannopoulos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
clean in operators and machines
parent
50838599
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
3 additions
and
69 deletions
+3
-69
dream/simulation/Machine.py
dream/simulation/Machine.py
+0
-15
dream/simulation/MachineManagedJob.py
dream/simulation/MachineManagedJob.py
+3
-33
dream/simulation/OperatedPoolBroker.py
dream/simulation/OperatedPoolBroker.py
+0
-2
dream/simulation/OperatorManagedJob.py
dream/simulation/OperatorManagedJob.py
+0
-19
No files found.
dream/simulation/Machine.py
View file @
7096353c
...
...
@@ -638,15 +638,6 @@ class Machine(CoreObject):
# has to block the predecessor giverObject to avoid conflicts with other competing machines
if
(
activeObject
.
operatorPool
!=
'None'
and
(
any
(
type
==
'Load'
for
type
in
activeObject
.
multOperationTypeList
))):
if
giverObject
.
haveToDispose
(
activeObject
):
#===============================================================
# # TODO: check whether this entity is the one to be hand in
# # to be used in operatorPreemptive
# activeObject.requestingEntity=giverObject.getActiveObjectQueue()[0]
# # TODO: update the objects requesting the operator
# activeObject.operatorPool.requestingObject=activeObject.giver
# # TODOD: update the last object calling the operatorPool
# activeObject.operatorPool.receivingObject=activeObject
#===============================================================
if
activeObject
.
checkOperator
()
\
and
activeObject
.
checkIfActive
()
and
len
(
activeObjectQueue
)
<
activeObject
.
capacity
:
if
not
giverObject
.
exitIsAssignedTo
():
...
...
@@ -699,12 +690,6 @@ class Machine(CoreObject):
else
:
return
True
# # =======================================================================
# # checks if the machine down or it can dispose the object
# # =======================================================================
# def ifCanDisposeOrHaveFailure(self):
# return self.Up==False or self.getReceiverObject().canAccept(self) or len(self.getActiveObjectQueue())==0
# =======================================================================
# get an entity from the giver
# =======================================================================
...
...
dream/simulation/MachineManagedJob.py
View file @
7096353c
...
...
@@ -117,15 +117,6 @@ class MachineManagedJob(MachineJobShop):
if
(
activeObject
.
operatorPool
!=
'None'
and
(
any
(
type
==
'Load'
for
type
in
activeObject
.
multOperationTypeList
)
\
or
any
(
type
==
'Setup'
for
type
in
activeObject
.
multOperationTypeList
))):
if
giverObject
.
haveToDispose
(
activeObject
):
#===============================================================
# # 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
#===============================================================
if
activeObject
.
checkIfActive
()
and
len
(
activeObjectQueue
)
<
activeObject
.
capacity
\
and
activeObject
.
checkOperator
(
giverObject
):
if
not
giverObject
.
exitIsAssignedTo
():
...
...
@@ -144,33 +135,12 @@ class MachineManagedJob(MachineJobShop):
# if the multOperationTypeList contains only Processing
elif
(
activeObject
.
operatorPool
!=
'None'
and
any
(
type
==
'Processing'
for
type
in
activeObject
.
multOperationTypeList
)):
if
giverObject
.
haveToDispose
(
activeObject
):
#===============================================================
# # 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 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
.
checkIfActive
()
and
len
(
activeObjectQueue
)
<
activeObject
.
capacity
:
#\
# and self.checkOperator()\
# and not activeObject.giver.exitIsAssignedTo():
# activeObject.giver.assignExitTo()
# # 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]
if
activeObject
.
checkIfActive
()
and
len
(
activeObjectQueue
)
<
activeObject
.
capacity
:
# the entityToGet should be updated
activeObject
.
entityToGet
=
giverObjectQueue
[
0
]
#make the operators List so that it holds only the manager of the current order
activeObject
.
operatorPool
.
operators
=
[
giverObjectQueue
[
0
].
manager
]
...
...
dream/simulation/OperatedPoolBroker.py
View file @
7096353c
...
...
@@ -114,7 +114,6 @@ class Broker(ObjectInterruption):
# ======= release a resource
elif
not
self
.
victim
.
isOperated
():
self
.
victim
.
currentOperator
.
totalWorkingTime
+=
now
()
-
self
.
victim
.
currentOperator
.
timeLastOperationStarted
# self.victim.outputTrace(self.victim.currentOperator.objName, "left "+ self.victim.objName)
yield
release
,
self
,
self
.
victim
.
operatorPool
.
getResource
(
self
.
victim
.
currentOperator
)
# signal the other brokers waiting for the same operators that they are now free
# also signal the stations that were not requested to receive because the operator was occupied
...
...
@@ -128,7 +127,6 @@ class Broker(ObjectInterruption):
# TODO: signalling the router will give the chance to it to take the control, but when will it eventually receive it.
# after signalling the broker will signal it's victim that it has finished it's processes
# TODO: this wont work for the moment. The actions that follow must be performed by all operated brokers.
# self.signalLoadStations()
self
.
printTrace
(
self
.
victim
.
currentOperator
.
objName
,
'released '
+
self
.
victim
.
id
)
# the victim current operator must be cleared after the operator is released
...
...
dream/simulation/OperatorManagedJob.py
View file @
7096353c
...
...
@@ -67,25 +67,6 @@ class OperatorManagedJob(Operator):
# return False
return
len
(
self
.
Res
.
activeQ
)
<
self
.
capacity
# #===========================================================================
# # assign an operator
# #===========================================================================
# def assignTo(self, callerObject=None):
# assert callerObject!=None, 'the operator cannot be assigned to None'
# self.operatorAssignedTo=callerObject
#
# #===========================================================================
# # un-assign an operator
# #===========================================================================
# def unAssign(self):
# self.operatorAssignedTo=None
#
# #===========================================================================
# # check whether the operator is assigned
# #===========================================================================
# def isAssignedTo(self):
# return self.operatorAssignedTo
#===========================================================================
# check if the operator has only one station as candidate option
#===========================================================================
...
...
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