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
83b3c602
Commit
83b3c602
authored
Aug 22, 2014
by
Georgios Dagkakis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
part to read in new way
parent
e5a772d1
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
15 deletions
+10
-15
dream/simulation/Entity.py
dream/simulation/Entity.py
+3
-1
dream/simulation/LineGenerationJSON.py
dream/simulation/LineGenerationJSON.py
+1
-13
dream/simulation/Part.py
dream/simulation/Part.py
+6
-1
No files found.
dream/simulation/Entity.py
View file @
83b3c602
...
...
@@ -34,7 +34,8 @@ import simpy
class
Entity
(
object
):
type
=
"Entity"
def
__init__
(
self
,
id
=
None
,
name
=
None
,
priority
=
0
,
dueDate
=
None
,
orderDate
=
None
,
isCritical
=
False
):
def
__init__
(
self
,
id
=
None
,
name
=
None
,
priority
=
0
,
dueDate
=
None
,
orderDate
=
None
,
isCritical
=
False
,
remainingProcessingTime
=
0
):
self
.
name
=
name
self
.
id
=
id
# information on the object holding the entity
...
...
@@ -68,6 +69,7 @@ class Entity(object):
self
.
candidateReceiver
=
None
# the station that is finaly chosen to receive the entity
# alias used for printing the Route
self
.
alias
=
None
self
.
remainingProcessingTime
=
remainingProcessingTime
# =======================================================================
# outputs results to JSON File
...
...
dream/simulation/LineGenerationJSON.py
View file @
83b3c602
...
...
@@ -374,7 +374,7 @@ def createWIP():
inputDict
=
dict
(
entity
)
inputDict
.
pop
(
'_class'
)
if
entityClass
in
[
'Dream.CapacityEntity'
,
'Dream.CapacityProject'
]:
if
entityClass
in
[
'Dream.CapacityEntity'
,
'Dream.CapacityProject'
,
'Dream.Part'
]:
entity
=
entityType
(
**
inputDict
)
G
.
EntityList
.
append
(
entity
)
object
=
Globals
.
findObjectById
(
element
[
'id'
])
...
...
@@ -531,18 +531,6 @@ def createWIP():
G
.
WipList
.
append
(
J
)
G
.
EntityList
.
append
(
J
)
elif
entityClass
==
'Dream.Part'
:
id
=
entity
.
get
(
'id'
,
'not found'
)
name
=
entity
.
get
(
'name'
,
'not found'
)
P
=
Part
(
id
,
name
)
G
.
PartList
.
append
(
P
)
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'
:
id
=
entity
.
get
(
'id'
,
'not found'
)
name
=
entity
.
get
(
'name'
,
'not found'
)
...
...
dream/simulation/Part.py
View file @
83b3c602
...
...
@@ -30,8 +30,13 @@ models a part entity that flows through the system
from
Globals
import
G
from
Entity
import
Entity
#The part object
class
Part
(
Entity
):
type
=
"Part"
def
__init__
(
self
,
id
=
None
,
name
=
None
,
remainingProcessingTime
=
0
):
Entity
.
__init__
(
self
,
id
,
name
,
remainingProcessingTime
=
remainingProcessingTime
)
from
Globals
import
G
G
.
PartList
.
append
(
self
)
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