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
d99462ff
Commit
d99462ff
authored
Nov 06, 2013
by
Georgios Dagkakis
Committed by
Sebastien Robin
Nov 06, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
LineGenerationJSON.py updated so that it can read also BatchScrapMachineObjects
parent
292b94e1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
0 deletions
+37
-0
dream/simulation/LineGenerationJSON.py
dream/simulation/LineGenerationJSON.py
+37
-0
No files found.
dream/simulation/LineGenerationJSON.py
View file @
d99462ff
...
...
@@ -75,6 +75,7 @@ from SubBatch import SubBatch
from
BatchSource
import
BatchSource
from
BatchDecomposition
import
BatchDecomposition
from
BatchReassembly
import
BatchReassembly
from
BatchScrapMachine
import
BatchScrapMachine
from
LineClearance
import
LineClearance
import
ExcelHandler
...
...
@@ -141,6 +142,7 @@ def createObjects():
G
.
BatchSourceList
=
[]
G
.
BatchReassemblyList
=
[]
G
.
LineClearanceList
=
[]
G
.
BatchScrapMachine
=
[]
# -----------------------------------------------------------------------
# loop through all the model resources
...
...
@@ -220,6 +222,41 @@ def createObjects():
G
.
MachineList
.
append
(
M
)
# add machine to global MachineList
G
.
ObjList
.
append
(
M
)
# add machine to ObjList
elif
objClass
==
'Dream.BatchScrapMachine'
:
id
=
element
.
get
(
'id'
,
'not found'
)
name
=
element
.
get
(
'name'
,
'not found'
)
processingTime
=
element
.
get
(
'processingTime'
,
'not found'
)
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'
))
scrapQuantity
=
element
.
get
(
'scrapQuantity'
,
'not found'
)
scrapDistributionType
=
scrapQuantity
.
get
(
'distributionType'
,
'not found'
)
scrMean
=
int
(
scrapQuantity
.
get
(
'mean'
,
'0'
))
scrStdev
=
float
(
scrapQuantity
.
get
(
'stdev'
,
'0'
))
scrMin
=
int
(
scrapQuantity
.
get
(
'min'
,
'0'
))
scrMax
=
int
(
scrapQuantity
.
get
(
'max'
,
'0'
))
failures
=
element
.
get
(
'failures'
,
'not found'
)
failureDistribution
=
failures
.
get
(
'failureDistribution'
,
'not found'
)
MTTF
=
float
(
failures
.
get
(
'MTTF'
,
'0'
))
MTTR
=
float
(
failures
.
get
(
'MTTR'
,
'0'
))
availability
=
float
(
failures
.
get
(
'availability'
,
'0'
))
r
=
'None'
for
repairman
in
G
.
RepairmanList
:
# check which repairman in the G.RepairmanList
if
(
id
in
repairman
.
coreObjectIds
):
# (if any) is assigned to repair
r
=
repairman
# the machine with ID equal to id
M
=
BatchScrapMachine
(
id
,
name
,
1
,
distribution
=
distributionType
,
failureDistribution
=
failureDistribution
,
MTTF
=
MTTF
,
MTTR
=
MTTR
,
availability
=
availability
,
repairman
=
r
,
mean
=
mean
,
stdev
=
stdev
,
min
=
min
,
max
=
max
,
scrMean
=
scrMean
,
scrStdev
=
scrStdev
,
scrMin
=
scrMin
,
scrMax
=
scrMax
)
M
.
nextIds
=
getSuccessorList
(
id
)
# update the nextIDs list of the machine
G
.
MachineList
.
append
(
M
)
# add machine to global MachineList
G
.
BatchScrapMachine
.
append
(
M
)
G
.
ObjList
.
append
(
M
)
# add machine to ObjList
elif
objClass
==
'Dream.MachineJobShop'
:
id
=
element
.
get
(
'id'
,
'not found'
)
name
=
element
.
get
(
'name'
,
'not found'
)
...
...
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