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
672da092
Commit
672da092
authored
Mar 20, 2015
by
Georgios Dagkakis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Machine to be able to count and ouput break time
parent
4320b0f8
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
88 additions
and
2 deletions
+88
-2
dream/simulation/CoreObject.py
dream/simulation/CoreObject.py
+12
-2
dream/simulation/JSONInputs/MachineBreak1.json
dream/simulation/JSONInputs/MachineBreak1.json
+75
-0
dream/simulation/Machine.py
dream/simulation/Machine.py
+1
-0
No files found.
dream/simulation/CoreObject.py
View file @
672da092
...
...
@@ -54,6 +54,7 @@ class CoreObject(ManPyObject):
self
.
WaitingForLoadOperator
=
[]
self
.
Loading
=
[]
self
.
SettingUp
=
[]
self
.
OnBreak
=
[]
# list that holds the objectInterruptions that have this element as victim
self
.
objectInterruptions
=
[]
...
...
@@ -639,7 +640,15 @@ class CoreObject(ManPyObject):
# if object is off shift add only the fail time before the shift ended
if
not
self
.
onShift
and
self
.
timeLastFailure
<
self
.
timeLastShiftEnded
:
self
.
totalFailureTime
+=
self
.
timeLastShiftEnded
-
self
.
timeLastFailure
# if the Operator is on break we have to add this break time to its total break time
if
self
.
onBreak
:
if
self
.
onShift
:
self
.
totalBreakTime
+=
self
.
env
.
now
-
self
.
timeLastBreakStarted
# if object is off shift add only the break time before the shift ended
if
not
self
.
onShift
and
self
.
timeLastBreakStarted
<
self
.
timeLastShiftEnded
:
self
.
totalBreakTime
+=
self
.
timeLastShiftEnded
-
self
.
timeLastBreakStarted
#if the object is off shift,add this to the off-shift time
if
activeObject
.
onShift
==
False
:
# if we ran the simulation for infinite time we have to identify the last event
...
...
@@ -654,7 +663,7 @@ class CoreObject(ManPyObject):
self
.
totalOffShiftTime
+=
now
-
self
.
timeLastShiftEnded
#object was idle when it was not in any other state
activeObject
.
totalWaitingTime
=
MaxSimtime
-
activeObject
.
totalWorkingTime
-
activeObject
.
totalBlockageTime
-
activeObject
.
totalFailureTime
-
activeObject
.
totalLoadTime
-
activeObject
.
totalSetupTime
-
self
.
totalOffShiftTime
activeObject
.
totalWaitingTime
=
MaxSimtime
-
activeObject
.
totalWorkingTime
-
activeObject
.
totalBlockageTime
-
activeObject
.
totalFailureTime
-
activeObject
.
totalLoadTime
-
activeObject
.
totalSetupTime
-
self
.
totalOffShiftTime
-
self
.
totalBreakTime
if
activeObject
.
totalBlockageTime
<
0
and
activeObject
.
totalBlockageTime
>-
0.00001
:
#to avoid some effects of getting negative cause of rounding precision
self
.
totalBlockageTime
=
0
...
...
@@ -671,6 +680,7 @@ class CoreObject(ManPyObject):
activeObject
.
Loading
.
append
(
100
*
self
.
totalLoadTime
/
MaxSimtime
)
activeObject
.
SettingUp
.
append
(
100
*
self
.
totalSetupTime
/
MaxSimtime
)
activeObject
.
OffShift
.
append
(
100
*
self
.
totalOffShiftTime
/
MaxSimtime
)
activeObject
.
OnBreak
.
append
(
100
*
self
.
totalBreakTime
/
MaxSimtime
)
activeObject
.
WipStat
.
append
(
self
.
wipStatList
.
tolist
())
# =======================================================================
...
...
dream/simulation/JSONInputs/MachineBreak1.json
0 → 100644
View file @
672da092
{
"graph"
:
{
"node"
:
{
"E1"
:
{
"interruptions"
:
{},
"top"
:
0.05688622754491013
,
"_class"
:
"Dream.Exit"
,
"left"
:
0.7083333333333333
},
"S1"
:
{
"name"
:
"Source"
,
"top"
:
0.9431137724550899
,
"entity"
:
"Dream.Part"
,
"interArrivalTime"
:
{
"Fixed"
:
{
"distributionType"
:
"Fixed"
,
"mean"
:
6
}
},
"interruptions"
:
{},
"_class"
:
"Dream.Source"
,
"left"
:
0.30208333333333337
},
"M1"
:
{
"name"
:
"Machine1"
,
"top"
:
0.5
,
"processingTime"
:
{
"Fixed"
:
{
"mean"
:
3.0
}
},
"interruptions"
:
{
"break"
:
{
"TTR"
:
{
"Fixed"
:
{
"mean"
:
5
}
},
"TTB"
:
{
"Fixed"
:
{
"mean"
:
40
}
}
}
},
"operationType"
:
"MT-Load-Processing"
,
"_class"
:
"Dream.Machine"
,
"left"
:
0.5625
}
},
"edge"
:
{
"3"
:
{
"source"
:
"M1"
,
"destination"
:
"E1"
,
"data"
:
{},
"_class"
:
"Dream.Edge"
},
"2"
:
{
"source"
:
"S1"
,
"destination"
:
"M1"
,
"data"
:
{},
"_class"
:
"Dream.Edge"
}
}
},
"_class"
:
"Dream.Simulation"
,
"general"
:
{
"console"
:
"No"
,
"numberOfReplications"
:
"1"
,
"trace"
:
"No"
,
"confidenceLevel"
:
"0.95"
,
"maxSimTime"
:
"100"
,
"_class"
:
"Dream.Configuration"
}
}
\ No newline at end of file
dream/simulation/Machine.py
View file @
672da092
...
...
@@ -1245,6 +1245,7 @@ class Machine(CoreObject):
json
[
'results'
][
'off_shift_ratio'
]
=
self
.
OffShift
json
[
'results'
][
'setup_ratio'
]
=
self
.
SettingUp
json
[
'results'
][
'loading_ratio'
]
=
self
.
Loading
json
[
'results'
][
'break_ratio'
]
=
self
.
OnBreak
G
.
outputJSON
[
'elementList'
].
append
(
json
)
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