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
9a18397c
Commit
9a18397c
authored
Jun 10, 2014
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Entity: assign self.id in parent class
parent
30587d5d
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
5 additions
and
11 deletions
+5
-11
dream/simulation/Batch.py
dream/simulation/Batch.py
+1
-2
dream/simulation/CapacityProject.py
dream/simulation/CapacityProject.py
+0
-1
dream/simulation/Entity.py
dream/simulation/Entity.py
+2
-1
dream/simulation/GUI/CapacityJobShop.py
dream/simulation/GUI/CapacityJobShop.py
+0
-0
dream/simulation/Job.py
dream/simulation/Job.py
+0
-1
dream/simulation/Part.py
dream/simulation/Part.py
+2
-5
dream/simulation/SubBatch.py
dream/simulation/SubBatch.py
+0
-1
No files found.
dream/simulation/Batch.py
View file @
9a18397c
...
@@ -34,10 +34,9 @@ class Batch(Entity):
...
@@ -34,10 +34,9 @@ class Batch(Entity):
def
__init__
(
self
,
id
,
name
,
numberOfUnits
=
1
):
def
__init__
(
self
,
id
,
name
,
numberOfUnits
=
1
):
Entity
.
__init__
(
self
,
name
=
name
)
Entity
.
__init__
(
self
,
name
=
name
)
self
.
id
=
id
self
.
numberOfUnits
=
numberOfUnits
self
.
numberOfUnits
=
numberOfUnits
self
.
numberOfSubBatches
=
1
#integer that shows in how many sub batches is the batch broken
self
.
numberOfSubBatches
=
1
#integer that shows in how many sub batches is the batch broken
self
.
subBatchList
=
[]
#list that contains the sub-batches that this batch has been broken into
self
.
subBatchList
=
[]
#list that contains the sub-batches that this batch has been broken into
\ No newline at end of file
dream/simulation/CapacityProject.py
View file @
9a18397c
...
@@ -38,4 +38,3 @@ class CapacityProject(Entity):
...
@@ -38,4 +38,3 @@ class CapacityProject(Entity):
Entity
.
__init__
(
self
,
id
,
name
)
Entity
.
__init__
(
self
,
id
,
name
)
# a dict that shows the required capacity from every station
# a dict that shows the required capacity from every station
self
.
capacityRequirementDict
=
capacityRequirementDict
self
.
capacityRequirementDict
=
capacityRequirementDict
self
.
id
=
id
dream/simulation/Entity.py
View file @
9a18397c
...
@@ -36,6 +36,7 @@ class Entity(object):
...
@@ -36,6 +36,7 @@ class Entity(object):
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
):
self
.
name
=
name
self
.
name
=
name
self
.
id
=
id
# information on the object holding the entity
# information on the object holding the entity
# initialized as None and updated every time an entity enters a new object
# initialized as None and updated every time an entity enters a new object
# information on the lifespan of the entity
# information on the lifespan of the entity
...
@@ -76,4 +77,4 @@ class Entity(object):
...
@@ -76,4 +77,4 @@ class Entity(object):
# initializes all the Entity for a new simulation replication
# initializes all the Entity for a new simulation replication
# =======================================================================
# =======================================================================
def
initialize
(
self
):
def
initialize
(
self
):
pass
pass
\ No newline at end of file
dream/simulation/GUI/
Simple
JobShop.py
→
dream/simulation/GUI/
Capacity
JobShop.py
View file @
9a18397c
File moved
dream/simulation/Job.py
View file @
9a18397c
...
@@ -38,7 +38,6 @@ class Job(Entity): # inherits from the Entity c
...
@@ -38,7 +38,6 @@ class Job(Entity): # inherits from the Entity c
def
__init__
(
self
,
id
=
None
,
name
=
None
,
route
=
[],
priority
=
0
,
dueDate
=
None
,
orderDate
=
None
,
extraPropertyDict
=
None
,
isCritical
=
False
):
def
__init__
(
self
,
id
=
None
,
name
=
None
,
route
=
[],
priority
=
0
,
dueDate
=
None
,
orderDate
=
None
,
extraPropertyDict
=
None
,
isCritical
=
False
):
Entity
.
__init__
(
self
,
id
=
id
,
name
=
name
,
priority
=
priority
,
dueDate
=
dueDate
,
orderDate
=
orderDate
,
isCritical
=
isCritical
)
Entity
.
__init__
(
self
,
id
=
id
,
name
=
name
,
priority
=
priority
,
dueDate
=
dueDate
,
orderDate
=
orderDate
,
isCritical
=
isCritical
)
# instance specific attributes
# instance specific attributes
self
.
id
=
id
# id
# information on the routing and the stops of the entity
# information on the routing and the stops of the entity
self
.
route
=
route
# the route that the job follows,
self
.
route
=
route
# the route that the job follows,
# also contains the processing times in each station
# also contains the processing times in each station
...
...
dream/simulation/Part.py
View file @
9a18397c
...
@@ -32,9 +32,6 @@ from Entity import Entity
...
@@ -32,9 +32,6 @@ from Entity import Entity
#The part object
#The part object
class
Part
(
Entity
):
class
Part
(
Entity
):
type
=
"Part"
type
=
"Part"
def
__init__
(
self
,
id
=
None
,
name
=
None
):
Entity
.
__init__
(
self
,
id
=
id
,
name
=
name
)
dream/simulation/SubBatch.py
View file @
9a18397c
...
@@ -33,7 +33,6 @@ class SubBatch(Entity):
...
@@ -33,7 +33,6 @@ class SubBatch(Entity):
def
__init__
(
self
,
id
,
name
,
numberOfUnits
=
1
,
parentBatch
=
None
):
def
__init__
(
self
,
id
,
name
,
numberOfUnits
=
1
,
parentBatch
=
None
):
Entity
.
__init__
(
self
,
name
=
name
)
Entity
.
__init__
(
self
,
name
=
name
)
self
.
id
=
id
self
.
numberOfUnits
=
numberOfUnits
self
.
numberOfUnits
=
numberOfUnits
self
.
parentBatch
=
parentBatch
self
.
parentBatch
=
parentBatch
self
.
batchId
=
parentBatch
.
id
self
.
batchId
=
parentBatch
.
id
...
...
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