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
be9501e9
Commit
be9501e9
authored
Jun 03, 2014
by
Georgios Dagkakis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Router activation works now in multiple runs
parent
82b5b943
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
5 deletions
+12
-5
dream/simulation/LineGenerationJSON.py
dream/simulation/LineGenerationJSON.py
+4
-1
dream/simulation/Machine.py
dream/simulation/Machine.py
+3
-1
dream/simulation/MachineManagedJob.py
dream/simulation/MachineManagedJob.py
+4
-3
dream/simulation/OperatorRouter.py
dream/simulation/OperatorRouter.py
+1
-0
No files found.
dream/simulation/LineGenerationJSON.py
View file @
be9501e9
...
...
@@ -1274,7 +1274,10 @@ def main(argv=[], input_data=None):
G
.
env
=
simpy
.
Environment
()
# initialize the environment
G
.
maxSimTime
=
float
(
G
.
JSONData
[
'general'
].
get
(
'maxSimTime'
,
'100'
))
# read the maxSimTime in each replication
# since it may be changed for infinite ones
if
G
.
Router
:
G
.
Router
.
isActivated
=
False
G
.
Router
.
isInitialized
=
False
if
G
.
seed
:
G
.
Rnd
=
Random
(
'%s%s'
%
(
G
.
seed
,
i
))
else
:
...
...
dream/simulation/Machine.py
View file @
be9501e9
...
...
@@ -142,7 +142,7 @@ class Machine(CoreObject):
# otherwise set the already existing router as the machines Router
else
:
self
.
router
=
G
.
Router
#
lists to hold statistics of multiple runs
#lists to hold statistics of multiple runs
self
.
WaitingForOperator
=
[]
self
.
WaitingForLoadOperator
=
[]
self
.
Loading
=
[]
...
...
@@ -172,7 +172,9 @@ class Machine(CoreObject):
# initialise the router only once
if
not
self
.
router
.
isInitialized
:
self
.
router
.
initialize
()
if
not
self
.
router
.
isActivated
:
self
.
env
.
process
(
self
.
router
.
run
())
self
.
router
.
isActivated
=
True
for
operator
in
self
.
operatorPool
.
operators
:
operator
.
coreObjectIds
.
append
(
self
.
id
)
operator
.
coreObjects
.
append
(
self
)
...
...
dream/simulation/MachineManagedJob.py
View file @
be9501e9
...
...
@@ -64,12 +64,13 @@ class MachineManagedJob(MachineJobShop):
if
not
G
.
Router
:
self
.
router
=
Router
()
self
.
router
.
initialize
()
self
.
env
.
process
(
self
.
router
.
run
())
# activate(self.router,self.router.run())
G
.
Router
=
self
.
router
G
.
Router
=
self
.
router
# otherwise set the already existing router as the machines Router
else
:
self
.
router
=
G
.
Router
if
not
self
.
router
.
isActivated
:
self
.
env
.
process
(
self
.
router
.
run
())
self
.
router
.
isActivated
=
True
# holds the Entity that is to be obtained and will be updated by canAcceptAndIsRequested
self
.
entityToGet
=
None
...
...
dream/simulation/OperatorRouter.py
View file @
be9501e9
...
...
@@ -50,6 +50,7 @@ class Router(ObjectInterruption):
ObjectInterruption
.
__init__
(
self
)
self
.
type
=
"Router"
self
.
isInitialized
=
False
self
.
isActivated
=
False
self
.
candidateOperators
=
[]
self
.
multipleCriterionList
=
[]
self
.
schedulingRule
=
'WT'
...
...
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