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
a7ef9db3
Commit
a7ef9db3
authored
Aug 05, 2014
by
Georgios Dagkakis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
changes so that the initial wip processing time may have different distribution than the others
parent
3daaafdc
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
3 deletions
+14
-3
dream/simulation/CoreObject.py
dream/simulation/CoreObject.py
+8
-0
dream/simulation/LineGenerationJSON.py
dream/simulation/LineGenerationJSON.py
+6
-3
No files found.
dream/simulation/CoreObject.py
View file @
a7ef9db3
...
...
@@ -689,6 +689,14 @@ class CoreObject(object):
# calculates the processing time
# =======================================================================
def
calculateProcessingTime
(
self
):
# this is only for processing of the initial wip
if
self
.
isProcessingInitialWIP
:
activeEntity
=
self
.
getActiveObjectQueue
()[
0
]
if
activeEntity
.
remainingProcessingTime
:
remainingProcessingTime
=
activeEntity
.
remainingProcessingTime
from
RandomNumberGenerator
import
RandomNumberGenerator
initialWIPrng
=
RandomNumberGenerator
(
self
,
**
remainingProcessingTime
)
return
initialWIPrng
.
generateNumber
()
return
self
.
rng
.
generateNumber
()
# this is if we have a default processing time for all the entities
# =======================================================================
...
...
dream/simulation/LineGenerationJSON.py
View file @
a7ef9db3
...
...
@@ -1155,6 +1155,7 @@ def createWIP():
G
.
WipList
.
append
(
P
)
G
.
EntityList
.
append
(
P
)
object
=
Globals
.
findObjectById
(
element
[
'id'
])
P
.
remainingProcessingTime
=
entity
.
get
(
'remainingProcessingTime'
,
{})
P
.
currentStation
=
object
elif
entityClass
==
'Dream.Batch'
:
...
...
@@ -1166,6 +1167,7 @@ def createWIP():
G
.
WipList
.
append
(
B
)
G
.
EntityList
.
append
(
B
)
object
=
Globals
.
findObjectById
(
element
[
'id'
])
B
.
remainingProcessingTime
=
entity
.
get
(
'remainingProcessingTime'
,
{})
B
.
currentStation
=
object
elif
entityClass
==
'Dream.SubBatch'
:
...
...
@@ -1177,9 +1179,9 @@ def createWIP():
# check if the parent batch is already created. If not, then create it
batch
=
None
for
entity
in
G
.
BatchList
:
if
entity
.
id
==
parentBatchId
:
batch
=
entity
for
b
in
G
.
BatchList
:
if
b
.
id
==
parentBatchId
:
batch
=
b
if
batch
:
#if the parent batch was found add the number of units of current sub-batch
batch
.
numberOfUnits
+=
numberOfUnits
else
:
#if the parent batch was not found create it
...
...
@@ -1193,6 +1195,7 @@ def createWIP():
G
.
WipList
.
append
(
SB
)
G
.
EntityList
.
append
(
SB
)
object
=
Globals
.
findObjectById
(
element
[
'id'
])
SB
.
remainingProcessingTime
=
entity
.
get
(
'remainingProcessingTime'
,
{})
SB
.
currentStation
=
object
if
entityClass
==
'Dream.Order'
:
...
...
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