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
dbb723e0
Commit
dbb723e0
authored
Feb 04, 2014
by
Georgios Dagkakis
Committed by
Jérome Perrin
Feb 07, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
main script updated so that it does not read Machine/QueuePreemptive. Also Topology45 updated
parent
79508d88
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
90 deletions
+6
-90
dream/simulation/JSONInputs/Topology45.json
dream/simulation/JSONInputs/Topology45.json
+1
-1
dream/simulation/LineGenerationJSON.py
dream/simulation/LineGenerationJSON.py
+4
-88
dream/tests/dump/Topology45.json.result
dream/tests/dump/Topology45.json.result
+1
-1
No files found.
dream/simulation/JSONInputs/Topology45.json
View file @
dbb723e0
...
...
@@ -135,7 +135,7 @@
"wip"
:
[]
},
"Q3"
:
{
"_class"
:
"Dream.Queue
Preemptive
"
,
"_class"
:
"Dream.Queue
JobShop
"
,
"id"
:
"Q3"
,
"name"
:
"Queue4"
,
"isDummy"
:
"0"
,
...
...
dream/simulation/LineGenerationJSON.py
View file @
dbb723e0
...
...
@@ -163,8 +163,6 @@ def createObjects():
G
.
BrokersList
=
[]
G
.
OperatedMachineList
=
[]
G
.
BatchScrapMachineList
=
[]
G
.
MachinePreemptiveList
=
[]
G
.
QueuePreemptiveList
=
[]
G
.
OrderDecompositionList
=
[]
G
.
ConditionalBufferList
=
[]
G
.
MouldAssemblyBufferList
=
[]
...
...
@@ -465,74 +463,6 @@ def createObjects():
G
.
OperatedMachineList
.
append
(
M
)
# add the machine to the operatedMachines List
G
.
ObjList
.
append
(
M
)
elif
objClass
==
'Dream.MachinePreemptive'
:
from
MachinePreemptive
import
MachinePreemptive
id
=
element
.
get
(
'id'
,
'not found'
)
name
=
element
.
get
(
'name'
,
'not found'
)
processingTime
=
element
.
get
(
'processingTime'
,{})
distributionType
=
processingTime
.
get
(
'distributionType'
,
'not found'
)
mean
=
float
(
processingTime
.
get
(
'mean'
,
'0'
))
stdev
=
float
(
processingTime
.
get
(
'stdev'
,
'0'
))
min
=
float
(
processingTime
.
get
(
'min'
,
'0'
))
max
=
float
(
processingTime
.
get
(
'max'
,
'0'
))
failures
=
element
.
get
(
'failures'
,
{})
failureDistribution
=
failures
.
get
(
'failureDistribution'
,
'not found'
)
MTTF
=
float
(
failures
.
get
(
'MTTF'
,
'0'
))
MTTR
=
float
(
failures
.
get
(
'MTTR'
,
'0'
))
availability
=
float
(
failures
.
get
(
'availability'
,
'0'
))
# type of operation and related times
operationType
=
element
.
get
(
'operationType'
,
'not found'
)
setupTime
=
element
.
get
(
'setupTime'
,{})
setupDistribution
=
setupTime
.
get
(
'setupDistribution'
,
'not found'
)
setupMean
=
float
(
setupTime
.
get
(
'setupMean'
,
'0'
))
setupStdev
=
float
(
setupTime
.
get
(
'setupStdev'
,
'0'
))
setupMin
=
float
(
setupTime
.
get
(
'setupMin'
,
'0'
))
setupMax
=
float
(
setupTime
.
get
(
'setupMax'
,
'0'
))
loadTime
=
element
.
get
(
'loadTime'
,{})
loadDistribution
=
loadTime
.
get
(
'loadDistribution'
,
'not found'
)
loadMean
=
float
(
loadTime
.
get
(
'loadMean'
,
'0'
))
loadStdev
=
float
(
loadTime
.
get
(
'loadStdev'
,
'0'
))
loadMin
=
float
(
loadTime
.
get
(
'loadMin'
,
'0'
))
loadMax
=
float
(
loadTime
.
get
(
'loadMax'
,
'0'
))
resetOnPreemption
=
bool
(
int
(
element
.
get
(
'resetOnPreemption'
,
'0'
)))
if
len
(
G
.
OperatorPoolsList
)
>
0
:
for
operatorPool
in
G
.
OperatorPoolsList
:
# find the operatorPool assigned to the machine
if
(
id
in
operatorPool
.
coreObjectIds
):
# and add it to the machine's operatorPool
machineOperatorPoolList
=
operatorPool
# there must only one operator pool assigned to the machine,
# otherwise only one of them will be taken into account
else
:
machineOperatorPoolList
=
[]
# if there is no operatorPool assigned to the machine
else
:
# then machineOperatorPoolList/operatorPool is a list
machineOperatorPoolList
=
[]
# if there are no operatorsPool created then the
# then machineOperatorPoolList/operatorPool is a list
if
(
type
(
machineOperatorPoolList
)
is
list
):
# if the machineOperatorPoolList is a list
# find the operators assigned to it and add them to the list
for
operator
in
G
.
OperatorsList
:
# check which operator in the G.OperatorsList
if
(
id
in
operator
.
coreObjectIds
):
# (if any) is assigned to operate
machineOperatorPoolList
.
append
(
operator
)
# the machine with ID equal to id
# if there is no operator assigned then the list will be empty
r
=
'None'
for
repairman
in
G
.
RepairmanList
:
if
(
id
in
repairman
.
coreObjectIds
):
r
=
repairman
M
=
MachinePreemptive
(
id
,
name
,
1
,
distribution
=
distributionType
,
failureDistribution
=
failureDistribution
,
MTTF
=
MTTF
,
MTTR
=
MTTR
,
availability
=
availability
,
#repairman=r,
mean
=
mean
,
stdev
=
stdev
,
min
=
min
,
max
=
max
,
operatorPool
=
machineOperatorPoolList
,
operationType
=
operationType
,
loadDistribution
=
loadDistribution
,
setupDistribution
=
setupDistribution
,
setupMean
=
setupMean
,
setupStdev
=
setupStdev
,
setupMin
=
setupMin
,
setupMax
=
setupMax
,
loadMean
=
loadMean
,
loadStdev
=
loadStdev
,
loadMin
=
loadMin
,
loadMax
=
loadMax
,
repairman
=
r
,
resetOnPreemption
=
resetOnPreemption
)
M
.
nextIds
=
getSuccessorList
(
id
)
G
.
MachinePreemptiveList
.
append
(
M
)
# add machine to global MachinePreemptiveList
G
.
MachineJobShopList
.
append
(
M
)
G
.
MachineList
.
append
(
M
)
if
M
.
operatorPool
!=
"None"
:
G
.
OperatedMachineList
.
append
(
M
)
# add the machine to the operatedMachines List
G
.
ObjList
.
append
(
M
)
elif
objClass
==
'Dream.Exit'
:
id
=
element
.
get
(
'id'
,
'not found'
)
...
...
@@ -572,19 +502,6 @@ def createObjects():
G
.
QueueJobShopList
.
append
(
Q
)
G
.
ObjList
.
append
(
Q
)
elif
objClass
==
'Dream.QueuePreemptive'
:
from
QueuePreemptive
import
QueuePreemptive
id
=
element
.
get
(
'id'
,
'not found'
)
name
=
element
.
get
(
'name'
,
'not found'
)
capacity
=
int
(
element
.
get
(
'capacity'
,
'1'
))
isDummy
=
bool
(
int
(
element
.
get
(
'isDummy'
,
'0'
)))
schedulingRule
=
element
.
get
(
'schedulingRule'
,
'FIFO'
)
Q
=
QueuePreemptive
(
id
,
name
,
capacity
,
isDummy
,
schedulingRule
=
schedulingRule
)
Q
.
nextIds
=
getSuccessorList
(
id
)
G
.
QueueList
.
append
(
Q
)
G
.
QueuePreemptiveList
.
append
(
Q
)
G
.
ObjList
.
append
(
Q
)
elif
objClass
==
'Dream.QueueLIFO'
:
id
=
element
.
get
(
'id'
,
'not found'
)
name
=
element
.
get
(
'name'
,
'not found'
)
...
...
@@ -788,7 +705,7 @@ def createObjects():
CB
=
ConditionalBuffer
(
id
,
name
)
CB
.
nextIds
=
getSuccessorList
(
id
)
G
.
QueueList
.
append
(
CB
)
G
.
Queue
Preemptive
List
.
append
(
CB
)
G
.
Queue
JobShop
List
.
append
(
CB
)
G
.
ConditionalBufferList
.
append
(
CB
)
G
.
ObjList
.
append
(
CB
)
...
...
@@ -798,7 +715,7 @@ def createObjects():
MAB
=
MouldAssemblyBuffer
(
id
,
name
)
MAB
.
nextIds
=
getSuccessorList
(
id
)
G
.
QueueList
.
append
(
MAB
)
G
.
Queue
Preemptive
List
.
append
(
MAB
)
G
.
Queue
JobShop
List
.
append
(
MAB
)
G
.
MouldAssemblyBufferList
.
append
(
MAB
)
G
.
ObjList
.
append
(
MAB
)
...
...
@@ -864,7 +781,6 @@ def createObjects():
loadMean
=
loadMean
,
loadStdev
=
loadStdev
,
loadMin
=
loadMin
,
loadMax
=
loadMax
,
repairman
=
r
,
resetOnPreemption
=
resetOnPreemption
)
MA
.
nextIds
=
getSuccessorList
(
id
)
G
.
MachinePreemptiveList
.
append
(
MA
)
# add machine to global MachinePreemptiveList
G
.
MachineJobShopList
.
append
(
MA
)
G
.
MachineList
.
append
(
MA
)
G
.
MouldAssemblyList
.
append
(
MA
)
...
...
dream/tests/dump/Topology45.json.result
View file @
dbb723e0
...
...
@@ -220,7 +220,7 @@
"schedulingRule": "FIFO"
},
{
"_class": "Dream.Queue
Preemptive
",
"_class": "Dream.Queue
JobShop
",
"id": "Q3",
"schedulingRule": "FIFO"
},
...
...
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