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
3fb2da8f
Commit
3fb2da8f
authored
Sep 25, 2014
by
Ioannis Papagiannopoulos
Committed by
Georgios Dagkakis
Oct 07, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
corrections in createMould method of MouldAssembly
parent
6ad22e9b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
16 deletions
+21
-16
dream/simulation/MouldAssembly.py
dream/simulation/MouldAssembly.py
+21
-16
No files found.
dream/simulation/MouldAssembly.py
View file @
3fb2da8f
...
...
@@ -64,6 +64,7 @@ TODOs: check the case when a mould is already in the WIP by the beginning of the
from
MachineJobShop
import
MachineJobShop
import
simpy
from
Globals
import
G
from
RandomNumberGenerator
import
RandomNumberGenerator
# =======================================================================
# Error in the assembling of the mould
...
...
@@ -239,28 +240,32 @@ class MouldAssembly(MachineJobShop):
processDistType
=
processingTime
.
get
(
'distributionType'
,
'not found'
)
procTime
=
float
(
processingTime
.
get
(
'mean'
,
0
))
processOpType
=
processingTime
.
get
(
'operationType'
,
'not found'
)
# can be manual/automatic
processingTime
=
self
.
getOperationTime
(
processingTime
)
self
.
rng
=
RandomNumberGenerator
(
self
,
**
processingTime
)
self
.
procTime
=
self
.
rng
.
generateNumber
()
# setup operation
setupTime
=
firstStep
[
'setupTime'
]
# update the activeObject's processing time according to the readings in the mould's route
setupDistType
=
setup
.
get
(
'distributionType'
,
'not found'
)
setupTime
=
float
(
setup
.
get
(
'mean'
,
0
))
setupTime
=
firstStep
.
get
(
'setupTime'
,
None
)
if
setupTime
:
# update the activeObject's processing time according to the readings in the mould's route
setupDistType
=
setupTime
.
get
(
'distributionType'
,
'not found'
)
setTime
=
float
(
setupTime
.
get
(
'mean'
,
0
))
setupOpType
=
setupTime
.
get
(
'operationType'
,
'not found'
)
# can be manual/automatic
setupTime
=
self
.
getOperationTime
(
setupTime
)
self
.
stpRng
=
RandomNumberGenerator
(
self
,
**
setupTime
)
setupOpType
=
setup
.
get
(
'operationType'
,
'not found'
)
# can be manual/automatic
setupTime
=
self
.
getOperationTime
(
setupTime
)
self
.
stpRng
=
RandomNumberGenerator
(
self
,
**
setupTime
)
# update the first step of the route with the activeObjects id as sole element of the stationIdsList
route
.
insert
(
0
,
{
'stationIdsList'
:[
str
(
self
.
id
)],
'processingTime'
:{
'distributionType'
:
str
(
processDistType
),
\
'mean'
:
str
(
procTime
),
\
'operationType'
:
str
(
processOpType
)},
\
'setupTime'
:{
'distributionType'
:
str
(
setupDistType
),
\
'mean'
:
str
(
setupTime
),
\
'operationType'
:
str
(
setupOpType
)}})
# update the first step of the route with the activeObjects id as sole element of the stationIdsList
route
.
insert
(
0
,
{
'stationIdsList'
:[
str
(
self
.
id
)],
'processingTime'
:{
'distributionType'
:
str
(
processDistType
),
\
'mean'
:
str
(
procTime
),
\
'operationType'
:
str
(
processOpType
)},
\
'setupTime'
:{
'distributionType'
:
str
(
setupDistType
),
\
'mean'
:
str
(
setupTime
),
\
'operationType'
:
str
(
setupOpType
)}})
else
:
# update the first step of the route with the activeObjects id as sole element of the stationIdsList
route
.
insert
(
0
,
{
'stationIdsList'
:[
str
(
self
.
id
)],
'processingTime'
:{
'distributionType'
:
str
(
processDistType
),
\
'mean'
:
str
(
procTime
),
\
'operationType'
:
str
(
processOpType
)}})
#Below it is to assign an exit if it was not assigned in JSON
#have to talk about it with NEX
exitAssigned
=
False
...
...
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