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
a2385933
Commit
a2385933
authored
Mar 20, 2015
by
Georgios Dagkakis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cleanup unused attribute
parent
131045b3
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
4 deletions
+5
-4
dream/simulation/Break.py
dream/simulation/Break.py
+3
-1
dream/simulation/LineGenerationJSON.py
dream/simulation/LineGenerationJSON.py
+2
-3
No files found.
dream/simulation/Break.py
View file @
a2385933
...
...
@@ -34,13 +34,15 @@ from ObjectInterruption import ObjectInterruption
class
Break
(
ObjectInterruption
):
def
__init__
(
self
,
id
=
''
,
name
=
''
,
victim
=
None
,
distribution
=
{},
deteriorationType
=
'constant'
,
def
__init__
(
self
,
id
=
''
,
name
=
''
,
victim
=
None
,
distribution
=
{},
endUnfinished
=
True
,
offShiftAnticipation
=
0
,
**
kw
):
ObjectInterruption
.
__init__
(
self
,
id
,
name
,
victim
=
victim
)
self
.
rngTTB
=
RandomNumberGenerator
(
self
,
distribution
.
get
(
'TTB'
,{
'Fixed'
:{
'mean'
:
100
}}))
self
.
rngTTR
=
RandomNumberGenerator
(
self
,
distribution
.
get
(
'TTR'
,{
'Fixed'
:{
'mean'
:
10
}}))
self
.
type
=
"Break"
# end current wip before going to break
self
.
endUnfinished
=
endUnfinished
# if the break is close to end of shift below a limit it will be suspended
self
.
offShiftAnticipation
=
offShiftAnticipation
def
initialize
(
self
):
...
...
dream/simulation/LineGenerationJSON.py
View file @
a2385933
...
...
@@ -348,12 +348,11 @@ def createObjectInterruptions():
if
br
:
victim
=
Globals
.
findObjectById
(
element
[
'id'
])
endUnfinished
=
bool
(
int
(
br
.
get
(
'endUnfinished'
,
1
)))
deteriorationType
=
br
.
get
(
'deteriorationType'
,
'constant'
)
offShiftAnticipation
=
br
.
get
(
'offShiftAnticipation'
,
0
)
BR
=
Break
(
victim
=
victim
,
distribution
=
br
,
endUnfinished
=
endUnfinished
,
deteriorationType
=
deteriorationType
,
BR
=
Break
(
victim
=
victim
,
distribution
=
br
,
endUnfinished
=
endUnfinished
,
offShiftAnticipation
=
offShiftAnticipation
)
G
.
ObjectInterruptionList
.
append
(
BR
)
G
.
Failure
List
.
append
(
BR
)
G
.
Break
List
.
append
(
BR
)
# ===========================================================================
# creates the entities that are wip
...
...
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