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
f42a545a
Commit
f42a545a
authored
Aug 28, 2014
by
Georgios Dagkakis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Entity types can receive currentStation also in creation
parent
bb1ebfcb
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
28 additions
and
18 deletions
+28
-18
dream/simulation/Batch.py
dream/simulation/Batch.py
+4
-2
dream/simulation/CapacityEntity.py
dream/simulation/CapacityEntity.py
+2
-2
dream/simulation/Entity.py
dream/simulation/Entity.py
+4
-3
dream/simulation/Examples/SettingWip1.py
dream/simulation/Examples/SettingWip1.py
+1
-1
dream/simulation/Job.py
dream/simulation/Job.py
+3
-2
dream/simulation/Mould.py
dream/simulation/Mould.py
+5
-3
dream/simulation/OrderComponent.py
dream/simulation/OrderComponent.py
+4
-1
dream/simulation/Part.py
dream/simulation/Part.py
+2
-2
dream/simulation/SubBatch.py
dream/simulation/SubBatch.py
+3
-2
No files found.
dream/simulation/Batch.py
View file @
f42a545a
...
...
@@ -34,8 +34,10 @@ from SubBatch import SubBatch
class
Batch
(
Entity
):
type
=
"Batch"
def
__init__
(
self
,
id
,
name
,
numberOfUnits
=
1
,
remainingProcessingTime
=
0
,
unitsToProcess
=
0
,
**
kw
):
Entity
.
__init__
(
self
,
name
=
name
,
id
=
id
,
remainingProcessingTime
=
remainingProcessingTime
)
def
__init__
(
self
,
id
,
name
,
numberOfUnits
=
1
,
currentStation
=
None
,
remainingProcessingTime
=
0
,
unitsToProcess
=
0
,
**
kw
):
Entity
.
__init__
(
self
,
name
=
name
,
id
=
id
,
remainingProcessingTime
=
remainingProcessingTime
,
currentStation
=
currentStation
)
self
.
numberOfUnits
=
int
(
numberOfUnits
)
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
...
...
dream/simulation/CapacityEntity.py
View file @
f42a545a
...
...
@@ -35,8 +35,8 @@ class CapacityEntity(Entity):
type
=
"CapacityEntity"
def
__init__
(
self
,
id
=
None
,
name
=
None
,
capacityProjectId
=
None
,
requiredCapacity
=
10
,
priority
=
0
,
dueDate
=
0
,
orderDate
=
0
,
isCritical
=
False
,
**
kw
):
Entity
.
__init__
(
self
,
id
,
name
,
priority
,
dueDate
,
orderDate
,
isCritical
)
orderDate
=
0
,
currentStation
=
None
,
isCritical
=
False
,
**
kw
):
Entity
.
__init__
(
self
,
id
,
name
,
priority
,
dueDate
,
orderDate
,
isCritical
,
currentStation
=
currentStation
)
self
.
capacityProjectId
=
capacityProjectId
# the project id hat the capacity Entity is part of
self
.
capacityProject
=
None
# the project that the capacity Entity is part of. It is defined in initialize
self
.
requiredCapacity
=
requiredCapacity
# the capacity that the capacity entity requires from the following station
...
...
dream/simulation/Entity.py
View file @
f42a545a
...
...
@@ -35,7 +35,7 @@ class Entity(object):
type
=
"Entity"
def
__init__
(
self
,
id
=
None
,
name
=
None
,
priority
=
0
,
dueDate
=
0
,
orderDate
=
0
,
isCritical
=
False
,
remainingProcessingTime
=
0
,
**
kw
):
isCritical
=
False
,
remainingProcessingTime
=
0
,
currentStation
=
None
,
**
kw
):
self
.
name
=
name
self
.
id
=
id
# information on the object holding the entity
...
...
@@ -54,7 +54,7 @@ class Entity(object):
# a list that holds information about the schedule
# of the entity (when it enters and exits every station)
self
.
schedule
=
[]
self
.
currentStation
=
None
self
.
currentStation
=
currentStation
# values to be used in the internal processing of compoundObjects
self
.
internal
=
False
# informs if the entity is being processed internally
if
isinstance
(
isCritical
,
unicode
):
...
...
@@ -75,7 +75,8 @@ class Entity(object):
# alias used for printing the Route
self
.
alias
=
None
self
.
remainingProcessingTime
=
remainingProcessingTime
# the current station of the entity
# =======================================================================
# outputs results to JSON File
# =======================================================================
...
...
dream/simulation/Examples/SettingWip1.py
View file @
f42a545a
...
...
@@ -5,7 +5,7 @@ from dream.simulation.Globals import runSimulation, G
Q
=
Queue
(
'Q1'
,
'Queue'
,
capacity
=
1
)
M
=
Machine
(
'M1'
,
'Machine'
,
processingTime
=
{
'distributionType'
:
'Fixed'
,
'mean'
:
0.25
})
E
=
Exit
(
'E1'
,
'Exit'
)
P1
=
Part
(
'P1'
,
'Part1'
)
P1
=
Part
(
'P1'
,
'Part1'
,
currentStation
=
Q
)
# set the current station
P1
.
currentStation
=
Q
...
...
dream/simulation/Job.py
View file @
f42a545a
...
...
@@ -37,8 +37,9 @@ class Job(Entity): # inherits from the Entity c
family
=
'Job'
def
__init__
(
self
,
id
=
None
,
name
=
None
,
route
=
[],
priority
=
0
,
dueDate
=
0
,
orderDate
=
0
,
extraPropertyDict
=
None
,
isCritical
=
False
,
**
kw
):
Entity
.
__init__
(
self
,
id
=
id
,
name
=
name
,
priority
=
priority
,
dueDate
=
dueDate
,
orderDate
=
orderDate
,
isCritical
=
isCritical
)
extraPropertyDict
=
None
,
currentStation
=
None
,
isCritical
=
False
,
**
kw
):
Entity
.
__init__
(
self
,
id
=
id
,
name
=
name
,
priority
=
priority
,
dueDate
=
dueDate
,
currentStation
=
currentStation
,
orderDate
=
orderDate
,
isCritical
=
isCritical
)
# instance specific attributes
# information on the routing and the stops of the entity
self
.
route
=
route
# the route that the job follows,
...
...
dream/simulation/Mould.py
View file @
f42a545a
...
...
@@ -38,12 +38,14 @@ class Mould(Job): # inherits from the Job class
name
=
None
,
route
=
[],
priority
=
0
,
dueDate
=
None
,
orderDate
=
None
,
dueDate
=
0
,
orderDate
=
0
,
extraPropertyDict
=
None
,
order
=
None
,
currentStation
=
None
,
isCritical
=
False
,
**
kw
):
Job
.
__init__
(
self
,
id
,
name
,
route
,
priority
,
dueDate
,
orderDate
,
extraPropertyDict
,
isCritical
)
Job
.
__init__
(
self
,
id
,
name
,
route
=
route
,
priority
=
priority
,
dueDate
=
dueDate
,
orderDate
=
orderDate
,
extraPropertyDict
=
extraPropertyDict
,
isCritical
=
isCritical
,
currentStation
=
currentStation
)
self
.
order
=
order
# parent order of the order component
# TODO: in case the order is not given as argument (when the component is given as WIP) have to give a manager as argument
# or create the initiate the parent order not as WIP
...
...
dream/simulation/OrderComponent.py
View file @
f42a545a
...
...
@@ -45,8 +45,11 @@ class OrderComponent(Job): # inherits from the
requestingComponent
=
None
,
readyForAssembly
=
0
,
isCritical
=
False
,
currentStation
=
None
,
**
kw
):
Job
.
__init__
(
self
,
id
,
name
,
route
,
priority
,
dueDate
,
orderDate
,
extraPropertyDict
,
isCritical
)
Job
.
__init__
(
self
,
id
,
name
,
route
=
route
,
priority
=
priority
,
dueDate
=
dueDate
,
orderDate
=
orderDate
,
extraPropertyDict
=
extraPropertyDict
,
isCritical
=
isCritical
,
currentStation
=
currentStation
)
self
.
auxiliaryList
=
[]
# Holds the auxiliary components that the component needs for a certain processing
self
.
order
=
order
# parent order of the order component
# TODO: in case the order is not given as argument (when the component is given as WIP) have to give a manager as argument
...
...
dream/simulation/Part.py
View file @
f42a545a
...
...
@@ -33,7 +33,7 @@ from Entity import Entity
#The part object
class
Part
(
Entity
):
type
=
"Part"
def
__init__
(
self
,
id
=
None
,
name
=
None
,
remainingProcessingTime
=
0
,
**
kw
):
Entity
.
__init__
(
self
,
id
,
name
,
remainingProcessingTime
=
remainingProcessingTime
)
def
__init__
(
self
,
id
=
None
,
name
=
None
,
remainingProcessingTime
=
0
,
currentStation
=
None
,
**
kw
):
Entity
.
__init__
(
self
,
id
,
name
,
remainingProcessingTime
=
remainingProcessingTime
,
currentStation
=
currentStation
)
dream/simulation/SubBatch.py
View file @
f42a545a
...
...
@@ -32,8 +32,9 @@ class SubBatch(Entity):
type
=
"SubBatch"
def
__init__
(
self
,
id
,
name
,
numberOfUnits
=
1
,
parentBatch
=
None
,
parentBatchName
=
None
,
parentBatchId
=
None
,
remainingProcessingTime
=
0
,
unitsToProcess
=
0
,
**
kw
):
Entity
.
__init__
(
self
,
name
=
name
,
id
=
id
,
remainingProcessingTime
=
remainingProcessingTime
)
remainingProcessingTime
=
0
,
currentStation
=
None
,
unitsToProcess
=
0
,
**
kw
):
Entity
.
__init__
(
self
,
name
=
name
,
id
=
id
,
remainingProcessingTime
=
remainingProcessingTime
,
currentStation
=
currentStation
)
self
.
numberOfUnits
=
int
(
numberOfUnits
)
self
.
parentBatch
=
parentBatch
self
.
unitsToProcess
=
int
(
unitsToProcess
)
...
...
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