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
25ab8b6d
Commit
25ab8b6d
authored
Feb 04, 2014
by
Georgios Dagkakis
Committed by
Jérome Perrin
Feb 07, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MachineJobShop updated so that when it gets an Entity it also reads setup and load time
parent
17a15983
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
1 deletion
+23
-1
dream/simulation/MachineJobShop.py
dream/simulation/MachineJobShop.py
+23
-1
No files found.
dream/simulation/MachineJobShop.py
View file @
25ab8b6d
...
@@ -47,10 +47,20 @@ class MachineJobShop(Machine):
...
@@ -47,10 +47,20 @@ class MachineJobShop(Machine):
# =======================================================================
# =======================================================================
def
getEntity
(
self
):
def
getEntity
(
self
):
activeEntity
=
Machine
.
getEntity
(
self
)
#run the default code
activeEntity
=
Machine
.
getEntity
(
self
)
#run the default code
# read the processing time from the corresponding remainingRoute entry
# read the processing/setup/load times from the corresponding remainingRoute entry
processingTime
=
activeEntity
.
remainingRoute
[
0
].
get
(
'processingTime'
,{})
processingTime
=
activeEntity
.
remainingRoute
[
0
].
get
(
'processingTime'
,{})
self
.
distType
=
processingTime
.
get
(
'distributionType'
,
'Fixed'
)
self
.
distType
=
processingTime
.
get
(
'distributionType'
,
'Fixed'
)
self
.
procTime
=
float
(
processingTime
.
get
(
'mean'
,
0
))
self
.
procTime
=
float
(
processingTime
.
get
(
'mean'
,
0
))
setupTime
=
activeEntity
.
remainingRoute
[
0
].
get
(
'setupTime'
,{})
self
.
distType
=
setupTime
.
get
(
'setupDistribution'
,
'Fixed'
)
self
.
setupTime
=
float
(
setupTime
.
get
(
'setupMean'
,
0
))
loadTime
=
activeEntity
.
remainingRoute
[
0
].
get
(
'loadTime'
,{})
self
.
distType
=
loadTime
.
get
(
'loadDistribution'
,
'Fixed'
)
self
.
loadTime
=
float
(
loadTime
.
get
(
'loadMean'
,
0
))
import
Globals
import
Globals
# read the list of next stations
# read the list of next stations
nextObjectIds
=
activeEntity
.
remainingRoute
[
1
].
get
(
'stationIdsList'
,[])
nextObjectIds
=
activeEntity
.
remainingRoute
[
1
].
get
(
'stationIdsList'
,[])
...
@@ -70,6 +80,18 @@ class MachineJobShop(Machine):
...
@@ -70,6 +80,18 @@ class MachineJobShop(Machine):
def
calculateProcessingTime
(
self
):
def
calculateProcessingTime
(
self
):
return
self
.
procTime
#this is the processing time for this unique entity
return
self
.
procTime
#this is the processing time for this unique entity
# =======================================================================
# calculates the setup time
# =======================================================================
def
calculateSetupTime
(
self
):
return
self
.
setupTime
#this is the setup time for this unique entity
# =======================================================================
# calculates the Load time
# =======================================================================
def
calculateLoadTime
(
self
):
return
self
.
loadTime
#this is the load time for this unique entity
# =======================================================================
# =======================================================================
# checks if the Queue can accept an entity
# checks if the Queue can accept an entity
# it checks also the next station of the Entity
# it checks also the next station of the Entity
...
...
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