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
4f239696
Commit
4f239696
authored
Jul 23, 2014
by
Ioannis Papagiannopoulos
Committed by
Georgios Dagkakis
Sep 01, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
createOpeatorPool corrected + minor updates
parent
e088ab7e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
20 deletions
+12
-20
dream/simulation/Machine.py
dream/simulation/Machine.py
+12
-20
No files found.
dream/simulation/Machine.py
View file @
4f239696
...
...
@@ -89,6 +89,8 @@ class Machine(CoreObject):
self
.
MTTF
=
MTTF
self
.
MTTR
=
MTTR
self
.
availability
=
availability
# check whether the operators are provided with a skills set
self
.
skilledOperators
=
self
.
checkForSkilledOpertors
()
# create an operatorPool if needed
self
.
createOperatorPool
(
operatorPool
)
# holds the Operator currently processing the Machine
...
...
@@ -184,10 +186,6 @@ class Machine(CoreObject):
self
.
preemptQueue
=
self
.
env
.
event
()
# signal used for informing objectInterruption objects that the current entity processed has finished processnig
self
.
endedLastProcessing
=
self
.
env
.
event
()
# flag used to inform if the operators assigned to the station are skilled (skillsList)
self
.
skilledOperators
=
False
#===========================================================================
# create an operatorPool if needed
...
...
@@ -199,8 +197,6 @@ class Machine(CoreObject):
the list of operators provided
if the list is empty create operator pool with empty list
'''
# flag used to inform if the operators assigned to the station are skilled (skillsList)
self
.
skilledOperators
=
False
from
Globals
import
G
# XXX operatorPool is not None ?
# if a list of operators is provided as argument
...
...
@@ -214,18 +210,14 @@ class Machine(CoreObject):
self
.
operatorPool
=
operatorPool
# otherwise
else
:
# find out whether the operators are provided a list of skills
for
operator
in
G
.
OperatorsList
:
# in that case create an empty operatorPool
if
operator
.
skillsList
:
id
=
self
.
id
+
'_OP'
name
=
self
.
objName
+
'_operatorPool'
self
.
operatorPool
=
OperatorPool
(
id
,
name
,
operatorsList
=
[])
G
.
OperatorPoolsList
.
append
(
self
.
operatorPool
)
# and update the flag skilledOperators so whenever the OperatorPool is re-initialised to reset the operators list of the Pool
self
.
skilledOperators
=
True
break
if
not
self
.
skilledOperators
:
# if there are operators with skillList
if
self
.
skilledOperators
:
id
=
self
.
id
+
'_OP'
name
=
self
.
objName
+
'_operatorPool'
self
.
operatorPool
=
OperatorPool
(
id
,
name
,
operatorsList
=
[])
G
.
OperatorPoolsList
.
append
(
self
.
operatorPool
)
# otherwise create no operatorPool
else
:
self
.
operatorPool
=
'None'
# update the operatorPool coreObjects list
if
self
.
operatorPool
!=
'None'
:
...
...
@@ -624,15 +616,14 @@ class Machine(CoreObject):
# in case Machine just performed the last work before the scheduled maintenance signal the corresponding object
if
self
.
isWorkingOnTheLast
:
# for the scheduled Object interruptions
# XXX add the SkilledOperatorRouter to this list and perform the signalling only once
for
interruption
in
(
G
.
ShiftSchedulerList
+
G
.
ScheduledMaintenanceList
):
# if the objectInterruption is waiting for a a signal
if
interruption
.
victim
==
self
and
interruption
.
waitingSignal
:
# signal it and reset the flags
# interruption.victimEndedLastProcessing.succeed(self.env.now)
self
.
endedLastProcessing
.
succeed
(
self
.
env
.
now
)
interruption
.
waitinSignal
=
False
self
.
isWorkingOnTheLast
=
False
# =======================================================================
# actions to be carried out when the processing of an Entity ends
...
...
@@ -884,6 +875,7 @@ class Machine(CoreObject):
def
releaseOperator
(
self
):
self
.
outputTrace
(
self
.
currentOperator
.
objName
,
"released from "
+
self
.
objName
)
# set the flag operatorAssignedTo to None
# XXX in case of skilled operators which stay at the same station should that change
self
.
currentOperator
.
operatorAssignedTo
=
None
self
.
broker
.
invoke
()
self
.
toBeOperated
=
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