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
4926f72e
Commit
4926f72e
authored
Mar 09, 2015
by
Georgios Dagkakis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
OperatorOperator to be able to be defined statically
parent
0053c151
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
7 deletions
+16
-7
dream/simulation/LineGenerationJSON.py
dream/simulation/LineGenerationJSON.py
+4
-1
dream/simulation/OperatorRouter.py
dream/simulation/OperatorRouter.py
+3
-1
dream/simulation/SkilledOperatorRouter.py
dream/simulation/SkilledOperatorRouter.py
+9
-4
dream/simulation/opAss_LPmethod.py
dream/simulation/opAss_LPmethod.py
+0
-1
No files found.
dream/simulation/LineGenerationJSON.py
View file @
4926f72e
...
@@ -274,7 +274,8 @@ def createObjectInterruptions():
...
@@ -274,7 +274,8 @@ def createObjectInterruptions():
inputDict
=
dict
(
element
)
inputDict
=
dict
(
element
)
# create the ObjectInterruption
# create the ObjectInterruption
objectInterruption
=
objectType
(
**
inputDict
)
objectInterruption
=
objectType
(
**
inputDict
)
G
.
ObjectInterruptionList
.
append
(
objectInterruption
)
if
not
'OperatorRouter'
in
str
(
objectType
):
G
.
ObjectInterruptionList
.
append
(
objectInterruption
)
# search inside the nodes for encapsulated ObjectInterruptions (failures etc)
# search inside the nodes for encapsulated ObjectInterruptions (failures etc)
# ToDo this will be cleaned a lot if we update the JSON notation:
# ToDo this will be cleaned a lot if we update the JSON notation:
...
@@ -339,6 +340,8 @@ def createObjectInterruptions():
...
@@ -339,6 +340,8 @@ def createObjectInterruptions():
thresholdTimeIsOnShift
=
thresholdTimeIsOnShift
)
thresholdTimeIsOnShift
=
thresholdTimeIsOnShift
)
G
.
ObjectInterruptionList
.
append
(
SS
)
G
.
ObjectInterruptionList
.
append
(
SS
)
G
.
ShiftSchedulerList
.
append
(
SS
)
G
.
ShiftSchedulerList
.
append
(
SS
)
# ===========================================================================
# ===========================================================================
...
...
dream/simulation/OperatorRouter.py
View file @
4926f72e
...
@@ -39,7 +39,7 @@ class Router(ObjectInterruption):
...
@@ -39,7 +39,7 @@ class Router(ObjectInterruption):
# The Broker is initiated within the Machine and considered as
# The Broker is initiated within the Machine and considered as
# black box for the ManPy end Developer
# black box for the ManPy end Developer
# =======================================================================
# =======================================================================
def
__init__
(
self
):
def
__init__
(
self
,
id
=
'Router01'
,
name
=
'Router01'
,
**
kw
):
ObjectInterruption
.
__init__
(
self
)
ObjectInterruption
.
__init__
(
self
)
self
.
type
=
"Router"
self
.
type
=
"Router"
self
.
isInitialized
=
False
self
.
isInitialized
=
False
...
@@ -52,6 +52,8 @@ class Router(ObjectInterruption):
...
@@ -52,6 +52,8 @@ class Router(ObjectInterruption):
self
.
preemptiveOperators
=
[]
# list of preemptiveOperators that should preempt their machines
self
.
preemptiveOperators
=
[]
# list of preemptiveOperators that should preempt their machines
self
.
criticalQueues
=
[]
self
.
criticalQueues
=
[]
self
.
pending
=
[]
# list of entities that require operators now
self
.
pending
=
[]
# list of entities that require operators now
self
.
id
=
id
self
.
name
=
name
from
Globals
import
G
from
Globals
import
G
G
.
RouterList
.
append
(
self
)
G
.
RouterList
.
append
(
self
)
...
...
dream/simulation/SkilledOperatorRouter.py
View file @
4926f72e
...
@@ -42,15 +42,19 @@ class SkilledRouter(Router):
...
@@ -42,15 +42,19 @@ class SkilledRouter(Router):
# TODO: we should maybe define a global schedulingRule criterion that will be
# TODO: we should maybe define a global schedulingRule criterion that will be
# chosen in case of multiple criteria for different Operators
# chosen in case of multiple criteria for different Operators
# =======================================================================
# =======================================================================
def
__init__
(
self
,
sorting
=
False
,
outputSolutions
=
True
):
def
__init__
(
self
,
id
=
'SkilledRouter01'
,
name
=
'SkilledRouter01'
,
sorting
=
False
,
outputSolutions
=
True
,
weightFactors
=
[
2
,
1
,
0
,
2
,
1
,
1
],
tool
=
{},
**
kw
):
Router
.
__init__
(
self
)
Router
.
__init__
(
self
)
# Flag used to notify the need for re-allocation of skilled operators to operatorPools
# Flag used to notify the need for re-allocation of skilled operators to operatorPools
self
.
allocation
=
False
self
.
allocation
=
False
# Flag used to notify the need to wait for endedLastProcessing signal
# Flag used to notify the need to wait for endedLastProcessing signal
waitEndProcess
=
False
waitEndProcess
=
False
self
.
outputSolutions
=
outputSolutions
self
.
outputSolutions
=
outputSolutions
self
.
id
=
'SkilledRouter01'
self
.
id
=
id
self
.
name
=
name
self
.
weightFactors
=
weightFactors
self
.
tool
=
tool
#===========================================================================
#===========================================================================
# the initialize method
# the initialize method
#===========================================================================
#===========================================================================
...
@@ -163,7 +167,8 @@ class SkilledRouter(Router):
...
@@ -163,7 +167,8 @@ class SkilledRouter(Router):
# as it doesn't support zero WIP levels
# as it doesn't support zero WIP levels
#===================================================================
#===================================================================
solution
=
opAss_LP
(
self
.
availableStationsDict
,
self
.
availableOperatorList
,
solution
=
opAss_LP
(
self
.
availableStationsDict
,
self
.
availableOperatorList
,
self
.
operators
,
previousAssignment
=
self
.
previousSolution
)
self
.
operators
,
previousAssignment
=
self
.
previousSolution
,
weightFactors
=
self
.
weightFactors
,
Tool
=
self
.
tool
)
# print '-------'
# print '-------'
# print self.env.now, solution
# print self.env.now, solution
...
...
dream/simulation/opAss_LPmethod.py
View file @
4926f72e
...
@@ -15,7 +15,6 @@ def opAss_LP(machineList, PBlist, PBskills, previousAssignment={}, weightFactors
...
@@ -15,7 +15,6 @@ def opAss_LP(machineList, PBlist, PBskills, previousAssignment={}, weightFactors
from
Globals
import
G
from
Globals
import
G
startPulp
=
time
.
time
()
startPulp
=
time
.
time
()
machines
=
machineList
.
keys
()
machines
=
machineList
.
keys
()
sumWIP
=
float
(
sum
([
machineList
[
mach
][
'WIP'
]
for
mach
in
machines
]))
sumWIP
=
float
(
sum
([
machineList
[
mach
][
'WIP'
]
for
mach
in
machines
]))
...
...
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