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
61f2b4d5
Commit
61f2b4d5
authored
Nov 29, 2013
by
Georgios Dagkakis
Committed by
Jérome Perrin
Dec 02, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
LineGeneration.JSON was updated in order to use the setWIP method from Globals
parent
07faf48f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
19 deletions
+2
-19
dream/simulation/LineGenerationJSON.py
dream/simulation/LineGenerationJSON.py
+2
-19
No files found.
dream/simulation/LineGenerationJSON.py
View file @
61f2b4d5
...
...
@@ -84,6 +84,7 @@ import json
from
random
import
Random
import
sys
import
os.path
import
Globals
# ===========================================================================
# reads general simulation inputs
...
...
@@ -562,24 +563,6 @@ def createWIP():
G
.
EntityList
.
append
(
J
)
# ===========================================================================
# sets the WIP in the corresponding stations
# ===========================================================================
def
setWIP
():
#read the start station of the Entities and assign them to it
for
entity
in
G
.
WipList
:
objectId
=
entity
.
currentStation
# get the id of the object where the entity currently seats
object
=
None
for
obj
in
G
.
ObjList
:
if
obj
.
id
==
objectId
:
object
=
obj
# find the object in the 'G.ObjList
object
.
getActiveObjectQueue
().
append
(
entity
)
# append the entity to its Queue
import
Globals
object
.
receiver
=
Globals
.
findObjectById
(
entity
.
remainingRoute
[
1
][
0
])
entity
.
remainingRoute
.
pop
(
0
)
# remove data from the remaining route.
entity
.
schedule
.
append
([
object
,
now
()])
#append the time to schedule so that it can be read in the result
entity
.
currentStation
=
object
# update the current station of the entity
# ===========================================================================
# the main script that is ran
# ===========================================================================
...
...
@@ -618,7 +601,7 @@ def main(argv=[], input_data=None):
initialize
()
#initialize the simulation
createWIP
()
initializeObjects
()
setWIP
(
)
Globals
.
setWIP
(
G
.
EntityList
)
activateObjects
()
# if the simulation is ran until no more events are scheduled,
...
...
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