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
cc5d571e
Commit
cc5d571e
authored
Aug 25, 2014
by
Georgios Dagkakis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
objects to be able to accept additional keywords and cleanup of deprecated code
parent
3cc9ee98
Changes
47
Show whitespace changes
Inline
Side-by-side
Showing
47 changed files
with
55 additions
and
107 deletions
+55
-107
dream/simulation/Assembly.py
dream/simulation/Assembly.py
+1
-1
dream/simulation/Batch.py
dream/simulation/Batch.py
+1
-1
dream/simulation/BatchDecomposition.py
dream/simulation/BatchDecomposition.py
+1
-1
dream/simulation/BatchReassembly.py
dream/simulation/BatchReassembly.py
+1
-1
dream/simulation/BatchScrapMachine.py
dream/simulation/BatchScrapMachine.py
+1
-1
dream/simulation/BatchSource.py
dream/simulation/BatchSource.py
+1
-1
dream/simulation/CapacityEntity.py
dream/simulation/CapacityEntity.py
+2
-1
dream/simulation/CapacityProject.py
dream/simulation/CapacityProject.py
+1
-1
dream/simulation/CapacityStation.py
dream/simulation/CapacityStation.py
+1
-1
dream/simulation/CapacityStationBuffer.py
dream/simulation/CapacityStationBuffer.py
+2
-1
dream/simulation/CapacityStationController.py
dream/simulation/CapacityStationController.py
+2
-1
dream/simulation/CapacityStationExit.py
dream/simulation/CapacityStationExit.py
+1
-1
dream/simulation/ConditionalBuffer.py
dream/simulation/ConditionalBuffer.py
+1
-1
dream/simulation/Conveyer.py
dream/simulation/Conveyer.py
+1
-1
dream/simulation/Dismantle.py
dream/simulation/Dismantle.py
+1
-1
dream/simulation/Entity.py
dream/simulation/Entity.py
+1
-1
dream/simulation/EventGenerator.py
dream/simulation/EventGenerator.py
+1
-1
dream/simulation/Exit.py
dream/simulation/Exit.py
+1
-1
dream/simulation/ExitJobShop.py
dream/simulation/ExitJobShop.py
+1
-9
dream/simulation/Failure.py
dream/simulation/Failure.py
+1
-1
dream/simulation/Frame.py
dream/simulation/Frame.py
+1
-1
dream/simulation/Job.py
dream/simulation/Job.py
+2
-1
dream/simulation/LineGenerationJSON.py
dream/simulation/LineGenerationJSON.py
+1
-10
dream/simulation/Machine.py
dream/simulation/Machine.py
+1
-1
dream/simulation/MachineJobShop.py
dream/simulation/MachineJobShop.py
+1
-9
dream/simulation/MachineManagedJob.py
dream/simulation/MachineManagedJob.py
+0
-8
dream/simulation/Mould.py
dream/simulation/Mould.py
+1
-1
dream/simulation/MouldAssembly.py
dream/simulation/MouldAssembly.py
+1
-2
dream/simulation/MouldAssemblyBuffer.py
dream/simulation/MouldAssemblyBuffer.py
+1
-1
dream/simulation/ObjectInterruption.py
dream/simulation/ObjectInterruption.py
+1
-1
dream/simulation/ObjectResource.py
dream/simulation/ObjectResource.py
+1
-1
dream/simulation/Operator.py
dream/simulation/Operator.py
+1
-1
dream/simulation/OperatorManagedJob.py
dream/simulation/OperatorManagedJob.py
+1
-1
dream/simulation/OperatorPool.py
dream/simulation/OperatorPool.py
+1
-1
dream/simulation/Order.py
dream/simulation/Order.py
+2
-1
dream/simulation/OrderComponent.py
dream/simulation/OrderComponent.py
+2
-1
dream/simulation/OrderDesign.py
dream/simulation/OrderDesign.py
+2
-1
dream/simulation/Part.py
dream/simulation/Part.py
+1
-1
dream/simulation/Queue.py
dream/simulation/Queue.py
+2
-1
dream/simulation/QueueJobShop.py
dream/simulation/QueueJobShop.py
+1
-9
dream/simulation/QueueManagedJob.py
dream/simulation/QueueManagedJob.py
+3
-13
dream/simulation/Repairman.py
dream/simulation/Repairman.py
+1
-1
dream/simulation/RoutingQueue.py
dream/simulation/RoutingQueue.py
+0
-8
dream/simulation/ScheduledMaintenance.py
dream/simulation/ScheduledMaintenance.py
+1
-1
dream/simulation/ShiftScheduler.py
dream/simulation/ShiftScheduler.py
+1
-1
dream/simulation/Source.py
dream/simulation/Source.py
+1
-1
dream/simulation/SubBatch.py
dream/simulation/SubBatch.py
+1
-1
No files found.
dream/simulation/Assembly.py
View file @
cc5d571e
...
...
@@ -41,7 +41,7 @@ class Assembly(CoreObject):
#===========================================================================
# initialize the object
#===========================================================================
def
__init__
(
self
,
id
=
''
,
name
=
''
,
processingTime
=
None
,
inputsDict
=
None
):
def
__init__
(
self
,
id
=
''
,
name
=
''
,
processingTime
=
None
,
inputsDict
=
None
,
**
kw
):
self
.
type
=
"Assembly"
#String that shows the type of object
self
.
next
=
[]
#list with the next objects in the flow
self
.
previous
=
[]
#list with the previous objects in the flow
...
...
dream/simulation/Batch.py
View file @
cc5d571e
...
...
@@ -34,7 +34,7 @@ from SubBatch import SubBatch
class
Batch
(
Entity
):
type
=
"Batch"
def
__init__
(
self
,
id
,
name
,
numberOfUnits
=
1
,
remainingProcessingTime
=
0
,
unitsToProcess
=
0
):
def
__init__
(
self
,
id
,
name
,
numberOfUnits
=
1
,
remainingProcessingTime
=
0
,
unitsToProcess
=
0
,
**
kw
):
Entity
.
__init__
(
self
,
name
=
name
,
id
=
id
,
remainingProcessingTime
=
remainingProcessingTime
)
self
.
numberOfUnits
=
int
(
numberOfUnits
)
self
.
numberOfSubBatches
=
1
#integer that shows in how many sub batches is the batch broken
...
...
dream/simulation/BatchDecomposition.py
View file @
cc5d571e
...
...
@@ -45,7 +45,7 @@ class BatchDecomposition(CoreObject):
# =======================================================================
#initialize the id, the capacity of the object and the distribution
# =======================================================================
def
__init__
(
self
,
id
,
name
,
processingTime
=
None
,
numberOfSubBatches
=
1
,
operator
=
'None'
):
def
__init__
(
self
,
id
,
name
,
processingTime
=
None
,
numberOfSubBatches
=
1
,
operator
=
'None'
,
**
kw
):
CoreObject
.
__init__
(
self
,
id
,
name
)
self
.
type
=
"BatchDecomposition"
#String that shows the type of object
...
...
dream/simulation/BatchReassembly.py
View file @
cc5d571e
...
...
@@ -44,7 +44,7 @@ class BatchReassembly(CoreObject):
# =======================================================================
#initialize the id, the capacity of the object and the distribution
# =======================================================================
def
__init__
(
self
,
id
,
name
,
numberOfSubBatches
=
1
,
processingTime
=
None
,
operator
=
'None'
):
def
__init__
(
self
,
id
,
name
,
numberOfSubBatches
=
1
,
processingTime
=
None
,
operator
=
'None'
,
**
kw
):
CoreObject
.
__init__
(
self
,
id
,
name
)
self
.
type
=
"BatchRassembly"
#String that shows the type of object
if
not
processingTime
:
...
...
dream/simulation/BatchScrapMachine.py
View file @
cc5d571e
...
...
@@ -45,7 +45,7 @@ class BatchScrapMachine(Machine):
# =======================================================================
def
__init__
(
self
,
id
,
name
,
capacity
=
1
,
\
processingTime
=
None
,
repairman
=
'None'
,
\
scrapQuantity
=
{}):
scrapQuantity
=
{}
,
**
kw
):
if
not
processingTime
:
processingTime
=
{
'distributionType'
:
'Fixed'
,
'mean'
:
1
}
...
...
dream/simulation/BatchSource.py
View file @
cc5d571e
...
...
@@ -32,7 +32,7 @@ from RandomNumberGenerator import RandomNumberGenerator
class
BatchSource
(
Source
):
def
__init__
(
self
,
id
,
name
,
interarrivalTime
=
None
,
entity
=
'Dream.Batch'
,
batchNumberOfUnits
=
1
):
entity
=
'Dream.Batch'
,
batchNumberOfUnits
=
1
,
**
kw
):
Source
.
__init__
(
self
,
id
=
id
,
name
=
name
,
interarrivalTime
=
interarrivalTime
,
entity
=
entity
)
self
.
numberOfUnits
=
int
(
batchNumberOfUnits
)
...
...
dream/simulation/CapacityEntity.py
View file @
cc5d571e
...
...
@@ -34,7 +34,8 @@ from Entity import Entity
class
CapacityEntity
(
Entity
):
type
=
"CapacityEntity"
def
__init__
(
self
,
id
=
None
,
name
=
None
,
capacityProjectId
=
None
,
requiredCapacity
=
10
,
priority
=
0
,
dueDate
=
0
,
orderDate
=
0
,
isCritical
=
False
):
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
)
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
...
...
dream/simulation/CapacityProject.py
View file @
cc5d571e
...
...
@@ -35,7 +35,7 @@ class CapacityProject(Entity):
type
=
"CapacityProject"
def
__init__
(
self
,
id
=
None
,
name
=
None
,
capacityRequirementDict
=
{},
earliestStartDict
=
{},
dueDate
=
0
,
assemblySpaceRequirement
=
0
):
assemblySpaceRequirement
=
0
,
**
kw
):
Entity
.
__init__
(
self
,
id
,
name
,
dueDate
=
dueDate
)
# a dict that shows the required capacity from every station
self
.
capacityRequirementDict
=
capacityRequirementDict
...
...
dream/simulation/CapacityStation.py
View file @
cc5d571e
...
...
@@ -40,7 +40,7 @@ class CapacityStation(Queue):
# the __init__ method of the CapacityStation
#===========================================================================
def
__init__
(
self
,
id
,
name
,
capacity
=
float
(
"inf"
),
intervalCapacity
=
[],
schedulingRule
=
"FIFO"
,
gatherWipStat
=
False
,
sharedResources
=
{}):
sharedResources
=
{}
,
**
kw
):
Queue
.
__init__
(
self
,
id
,
name
,
capacity
=
capacity
)
# a list that holds the capacity (manhours) that is available in each interval
self
.
intervalCapacity
=
intervalCapacity
...
...
dream/simulation/CapacityStationBuffer.py
View file @
cc5d571e
...
...
@@ -35,7 +35,8 @@ class CapacityStationBuffer(Queue):
#===========================================================================
# the __init__ method of the CapacityStationBuffer
#===========================================================================
def
__init__
(
self
,
id
,
name
,
requireFullProject
=
False
,
capacity
=
float
(
"inf"
),
isDummy
=
False
,
schedulingRule
=
"FIFO"
,
gatherWipStat
=
False
):
def
__init__
(
self
,
id
,
name
,
requireFullProject
=
False
,
capacity
=
float
(
"inf"
),
isDummy
=
False
,
schedulingRule
=
"FIFO"
,
gatherWipStat
=
False
,
**
kw
):
Queue
.
__init__
(
self
,
id
,
name
,
capacity
=
capacity
)
self
.
isLocked
=
True
self
.
requireFullProject
=
requireFullProject
# flag that shows if here the whole project is assembled
...
...
dream/simulation/CapacityStationController.py
View file @
cc5d571e
...
...
@@ -33,7 +33,8 @@ from Globals import G
class
CapacityStationController
(
EventGenerator
):
def
__init__
(
self
,
id
=
id
,
name
=
None
,
start
=
0
,
stop
=
float
(
'inf'
),
interval
=
1
,
duration
=
0
,
method
=
None
,
argumentDict
=
None
,
dueDateThreshold
=
float
(
'inf'
),
prioritizeIfCanFinish
=
False
):
duration
=
0
,
method
=
None
,
argumentDict
=
None
,
dueDateThreshold
=
float
(
'inf'
),
prioritizeIfCanFinish
=
False
,
**
kw
):
EventGenerator
.
__init__
(
self
,
id
,
name
,
start
,
stop
,
interval
,
duration
,
method
,
argumentDict
)
# attribute used by optimization in calculateWhatIsToBeProcessed
...
...
dream/simulation/CapacityStationExit.py
View file @
cc5d571e
...
...
@@ -38,7 +38,7 @@ class CapacityStationExit(Exit):
#===========================================================================
# the __init__ method of the CapacityStationExit
#===========================================================================
def
__init__
(
self
,
id
,
name
=
None
,
nextCapacityStationBufferId
=
None
):
def
__init__
(
self
,
id
,
name
=
None
,
nextCapacityStationBufferId
=
None
,
**
kw
):
Exit
.
__init__
(
self
,
id
,
name
)
self
.
isLocked
=
True
self
.
nextCapacityStationBufferId
=
nextCapacityStationBufferId
# the id of the next station. If it is None it
...
...
dream/simulation/ConditionalBuffer.py
View file @
cc5d571e
...
...
@@ -43,7 +43,7 @@ class ConditionalBuffer(QueueManagedJob):
# whereas the default capacity is set to infinity
# =======================================================================
def
__init__
(
self
,
id
,
name
,
capacity
=-
1
,
isDummy
=
False
,
schedulingRule
=
"FIFO"
):
schedulingRule
=
"FIFO"
,
**
kw
):
QueueManagedJob
.
__init__
(
self
,
id
=
id
,
name
=
name
,
capacity
=
capacity
,
isDummy
=
isDummy
,
schedulingRule
=
schedulingRule
)
...
...
dream/simulation/Conveyer.py
View file @
cc5d571e
...
...
@@ -40,7 +40,7 @@ class Conveyer(CoreObject):
#===========================================================================
# the conveyer __init__ method
#===========================================================================
def
__init__
(
self
,
id
,
name
,
length
,
speed
):
def
__init__
(
self
,
id
,
name
,
length
,
speed
,
**
kw
):
CoreObject
.
__init__
(
self
,
id
,
name
)
self
.
type
=
"Conveyer"
self
.
speed
=
float
(
speed
)
#the speed of the conveyer in m/sec
...
...
dream/simulation/Dismantle.py
View file @
cc5d571e
...
...
@@ -42,7 +42,7 @@ class Dismantle(CoreObject):
#===========================================================================
# initialize the object
#===========================================================================
def
__init__
(
self
,
id
=
''
,
name
=
''
,
processingTime
=
None
):
def
__init__
(
self
,
id
=
''
,
name
=
''
,
processingTime
=
None
,
**
kw
):
self
.
type
=
'Dismantle'
self
.
previous
=
[]
#list with the previous objects in the flow
...
...
dream/simulation/Entity.py
View file @
cc5d571e
...
...
@@ -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
):
isCritical
=
False
,
remainingProcessingTime
=
0
,
**
kw
):
self
.
name
=
name
self
.
id
=
id
# information on the object holding the entity
...
...
dream/simulation/EventGenerator.py
View file @
cc5d571e
...
...
@@ -32,7 +32,7 @@ from ObjectInterruption import ObjectInterruption
class
EventGenerator
(
ObjectInterruption
):
def
__init__
(
self
,
id
=
id
,
name
=
None
,
start
=
0
,
stop
=
float
(
'inf'
),
interval
=
1
,
duration
=
0
,
method
=
None
,
argumentDict
=
None
):
duration
=
0
,
method
=
None
,
argumentDict
=
None
,
**
kw
):
ObjectInterruption
.
__init__
(
self
)
self
.
id
=
id
self
.
name
=
name
...
...
dream/simulation/Exit.py
View file @
cc5d571e
...
...
@@ -37,7 +37,7 @@ class Exit(CoreObject):
family
=
'Exit'
def
__init__
(
self
,
id
=
''
,
name
=
''
,
inputsDict
=
{}
):
def
__init__
(
self
,
id
,
name
,
**
kw
):
self
.
type
=
"Exit"
# XXX needed ?
#lists to hold statistics of multiple runs
self
.
Exits
=
[]
...
...
dream/simulation/ExitJobShop.py
View file @
cc5d571e
...
...
@@ -34,14 +34,6 @@ from Exit import Exit
# the ExitJobShop object
# ===========================================================================
class
ExitJobShop
(
Exit
):
# =======================================================================
# parses inputs if they are given in a dictionary
# =======================================================================
def
parseInputs
(
self
,
inputsDict
):
Exit
.
parseInputs
(
self
,
inputsDict
)
from
Globals
import
G
G
.
ExitJobShopList
.
append
(
self
)
# =======================================================================
# set all the objects in previous
...
...
dream/simulation/Failure.py
View file @
cc5d571e
...
...
@@ -35,7 +35,7 @@ from ObjectInterruption import ObjectInterruption
class
Failure
(
ObjectInterruption
):
def
__init__
(
self
,
victim
=
None
,
distribution
=
None
,
index
=
0
,
repairman
=
None
,
offshift
=
False
,
deteriorationType
=
'constant'
):
deteriorationType
=
'constant'
,
**
kw
):
#Process.__init__(self)
ObjectInterruption
.
__init__
(
self
,
victim
)
if
distribution
:
...
...
dream/simulation/Frame.py
View file @
cc5d571e
...
...
@@ -35,7 +35,7 @@ class Frame(Entity):
type
=
"Frame"
capacity
=
4
#the number of parts that the frame can take
def
__init__
(
self
,
id
=
None
,
name
=
None
):
def
__init__
(
self
,
id
=
None
,
name
=
None
,
**
kw
):
Entity
.
__init__
(
self
,
id
=
id
,
name
=
name
)
self
.
Res
=
Resource
(
self
.
capacity
)
...
...
dream/simulation/Job.py
View file @
cc5d571e
...
...
@@ -36,7 +36,8 @@ class Job(Entity): # inherits from the Entity c
type
=
'Job'
family
=
'Job'
def
__init__
(
self
,
id
=
None
,
name
=
None
,
route
=
[],
priority
=
0
,
dueDate
=
0
,
orderDate
=
0
,
extraPropertyDict
=
None
,
isCritical
=
False
):
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
)
# instance specific attributes
# information on the routing and the stops of the entity
...
...
dream/simulation/LineGenerationJSON.py
View file @
cc5d571e
...
...
@@ -258,15 +258,6 @@ def createObjectResourcesAndCoreObjects():
if
issubclass
(
objectType
,
CoreObject
):
# remove data that has to do with wip or object interruption. CoreObjects do not need it
inputDict
=
dict
(
element
)
if
'wip'
in
inputDict
:
del
inputDict
[
'wip'
]
if
'failures'
in
inputDict
:
del
inputDict
[
'failures'
]
if
'shift'
in
inputDict
:
del
inputDict
[
'shift'
]
if
'scheduledMaintenance'
in
inputDict
:
del
inputDict
[
'scheduledMaintenance'
]
# create the CoreObject
coreObject
=
objectType
(
**
inputDict
)
# update the nextIDs list of the object
...
...
dream/simulation/Machine.py
View file @
cc5d571e
...
...
@@ -54,7 +54,7 @@ class Machine(CoreObject):
operatorPool
=
'None'
,
operationType
=
'None'
,
\
setupTime
=
None
,
loadTime
=
None
,
preemption
=
{},
canDeliverOnInterruption
=
False
):
canDeliverOnInterruption
=
False
,
**
kw
):
self
.
type
=
"Machine"
#String that shows the type of object
CoreObject
.
__init__
(
self
,
id
,
name
)
from
Globals
import
G
...
...
dream/simulation/MachineJobShop.py
View file @
cc5d571e
...
...
@@ -32,14 +32,6 @@ from Machine import Machine
# ===========================================================================
class
MachineJobShop
(
Machine
):
# =======================================================================
# parses inputs if they are given in a dictionary
# =======================================================================
def
parseInputs
(
self
,
inputsDict
):
Machine
.
parseInputs
(
self
,
inputsDict
)
from
Globals
import
G
G
.
MachineJobShopList
.
append
(
self
)
# =======================================================================
# set all the objects in previous and next
# =======================================================================
...
...
dream/simulation/MachineManagedJob.py
View file @
cc5d571e
...
...
@@ -39,14 +39,6 @@ from MachineJobShop import MachineJobShop
# ===========================================================================
class
MachineManagedJob
(
MachineJobShop
):
# =======================================================================
# parses inputs if they are given in a dictionary
# =======================================================================
def
parseInputs
(
self
,
inputsDict
):
MachineJobShop
.
parseInputs
(
self
,
inputsDict
)
from
Globals
import
G
G
.
MachineManagedJobList
.
append
(
self
)
# =======================================================================
# initialise the MachineManagedJob
# =======================================================================
...
...
dream/simulation/Mould.py
View file @
cc5d571e
...
...
@@ -42,7 +42,7 @@ class Mould(Job): # inherits from the Job class
orderDate
=
None
,
extraPropertyDict
=
None
,
order
=
None
,
isCritical
=
False
):
isCritical
=
False
,
**
kw
):
Job
.
__init__
(
self
,
id
,
name
,
route
,
priority
,
dueDate
,
orderDate
,
extraPropertyDict
,
isCritical
)
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/MouldAssembly.py
View file @
cc5d571e
...
...
@@ -81,8 +81,7 @@ class MouldAssembly(MachineManagedJob):
# =======================================================================
# parses inputs if they are given in a dictionary
# =======================================================================
def
parseInputs
(
self
,
inputsDict
):
MachineManagedJob
.
parseInputs
(
self
,
inputsDict
)
def
parseInputs
(
self
,
**
kw
):
from
Globals
import
G
G
.
MouldAssemblyList
.
append
(
self
)
...
...
dream/simulation/MouldAssemblyBuffer.py
View file @
cc5d571e
...
...
@@ -46,7 +46,7 @@ class MouldAssemblyBuffer(QueueManagedJob):
# whereas the default capacity is set to infinity
# =======================================================================
def
__init__
(
self
,
id
,
name
,
capacity
=-
1
,
isDummy
=
False
,
schedulingRule
=
"FIFO"
):
schedulingRule
=
"FIFO"
,
**
kw
):
QueueManagedJob
.
__init__
(
self
,
id
=
id
,
name
=
name
,
capacity
=
capacity
,
isDummy
=
isDummy
,
schedulingRule
=
schedulingRule
)
...
...
dream/simulation/ObjectInterruption.py
View file @
cc5d571e
...
...
@@ -34,7 +34,7 @@ import simpy
#===============================================================================
class
ObjectInterruption
(
object
):
def
__init__
(
self
,
victim
=
None
):
def
__init__
(
self
,
victim
=
None
,
**
kw
):
self
.
victim
=
victim
# variable used to hand in control to the objectInterruption
self
.
call
=
False
...
...
dream/simulation/ObjectResource.py
View file @
cc5d571e
...
...
@@ -32,7 +32,7 @@ import simpy
# ===========================================================================
class
ObjectResource
(
object
):
def
__init__
(
self
):
def
__init__
(
self
,
**
kw
):
self
.
initialized
=
False
# list that holds the objectInterruptions that have this element as victim
self
.
objectInterruptions
=
[]
...
...
dream/simulation/Operator.py
View file @
cc5d571e
...
...
@@ -37,7 +37,7 @@ from ObjectResource import ObjectResource
class
Operator
(
ObjectResource
):
family
=
'Operator'
def
__init__
(
self
,
id
,
name
,
capacity
=
1
,
schedulingRule
=
'FIFO'
,
skills
=
[],
available
=
True
):
def
__init__
(
self
,
id
,
name
,
capacity
=
1
,
schedulingRule
=
'FIFO'
,
skills
=
[],
available
=
True
,
**
kw
):
ObjectResource
.
__init__
(
self
)
self
.
id
=
id
self
.
objName
=
name
...
...
dream/simulation/OperatorManagedJob.py
View file @
cc5d571e
...
...
@@ -35,7 +35,7 @@ from Operator import Operator
# ===========================================================================
class
OperatorManagedJob
(
Operator
):
def
__init__
(
self
,
id
,
name
,
capacity
=
1
,
schedulingRule
=
"FIFO"
):
def
__init__
(
self
,
id
,
name
,
capacity
=
1
,
schedulingRule
=
"FIFO"
,
**
kw
):
Operator
.
__init__
(
self
,
id
=
id
,
name
=
name
,
capacity
=
capacity
,
schedulingRule
=
schedulingRule
)
from
Globals
import
G
G
.
OperatorManagedJobsList
.
append
(
self
)
...
...
dream/simulation/OperatorPool.py
View file @
cc5d571e
...
...
@@ -37,7 +37,7 @@ from Operator import Operator
# ===========================================================================
class
OperatorPool
(
ObjectResource
):
def
__init__
(
self
,
id
,
name
,
capacity
=
1
,
operatorsList
=
'None'
):
def
__init__
(
self
,
id
,
name
,
capacity
=
1
,
operatorsList
=
'None'
,
**
kw
):
capacity
=
int
(
capacity
or
1
)
...
...
dream/simulation/Order.py
View file @
cc5d571e
...
...
@@ -45,7 +45,8 @@ class Order(Job):
manager
=
None
,
basicsEnded
=
0
,
componentsReadyForAssembly
=
0
,
extraPropertyDict
=
None
):
extraPropertyDict
=
None
,
**
kw
):
Job
.
__init__
(
self
,
id
=
id
,
name
=
name
,
route
=
route
,
priority
=
priority
,
dueDate
=
dueDate
,
orderDate
=
orderDate
,
extraPropertyDict
=
extraPropertyDict
)
# self.isCritical=isCritical # flag to inform weather the order is critical -> preemption
...
...
dream/simulation/OrderComponent.py
View file @
cc5d571e
...
...
@@ -44,7 +44,8 @@ class OrderComponent(Job): # inherits from the
order
=
None
,
requestingComponent
=
None
,
readyForAssembly
=
0
,
isCritical
=
False
):
isCritical
=
False
,
**
kw
):
Job
.
__init__
(
self
,
id
,
name
,
route
,
priority
,
dueDate
,
orderDate
,
extraPropertyDict
,
isCritical
)
self
.
auxiliaryList
=
[]
# Holds the auxiliary components that the component needs for a certain processing
self
.
order
=
order
# parent order of the order component
...
...
dream/simulation/OrderDesign.py
View file @
cc5d571e
...
...
@@ -43,7 +43,8 @@ class OrderDesign(Job): # inherits from the Job
extraPropertyDict
=
None
,
order
=
None
,
requestingComponent
=
None
,
isCritical
=
False
):
isCritical
=
False
,
**
kw
):
Job
.
__init__
(
self
,
id
,
name
,
route
,
priority
,
dueDate
,
orderDate
,
extraPropertyDict
,
isCritical
)
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 @
cc5d571e
...
...
@@ -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
):
def
__init__
(
self
,
id
=
None
,
name
=
None
,
remainingProcessingTime
=
0
,
**
kw
):
Entity
.
__init__
(
self
,
id
,
name
,
remainingProcessingTime
=
remainingProcessingTime
)
dream/simulation/Queue.py
View file @
cc5d571e
...
...
@@ -37,7 +37,8 @@ class Queue(CoreObject):
#===========================================================================
# the __init__ method of the Queue
#===========================================================================
def
__init__
(
self
,
id
=
''
,
name
=
''
,
capacity
=
1
,
isDummy
=
False
,
schedulingRule
=
"FIFO"
,
level
=
None
,
gatherWipStat
=
False
,
inputsDict
=
{}):
def
__init__
(
self
,
id
=
''
,
name
=
''
,
capacity
=
1
,
isDummy
=
False
,
schedulingRule
=
"FIFO"
,
level
=
None
,
gatherWipStat
=
False
,
**
kw
):
self
.
type
=
"Queue"
# String that shows the type of object
CoreObject
.
__init__
(
self
,
id
,
name
)
capacity
=
float
(
capacity
)
...
...
dream/simulation/QueueJobShop.py
View file @
cc5d571e
...
...
@@ -33,14 +33,6 @@ from Queue import Queue
# ===========================================================================
class
QueueJobShop
(
Queue
):
# =======================================================================
# parses inputs if they are given in a dictionary
# =======================================================================
def
parseInputs
(
self
,
inputsDict
):
Queue
.
parseInputs
(
self
,
inputsDict
)
from
Globals
import
G
G
.
QueueJobShopList
.
append
(
self
)
# =======================================================================
# set all the objects in previous and next
# =======================================================================
...
...
dream/simulation/QueueManagedJob.py
View file @
cc5d571e
...
...
@@ -41,22 +41,12 @@ class NoCallerError(Exception):
# ===========================================================================
class
QueueManagedJob
(
QueueJobShop
):
def
__init__
(
self
,
id
=
''
,
name
=
''
,
capacity
=
1
,
isDummy
=
False
,
schedulingRule
=
"FIFO"
,
inputsDict
=
{}):
if
inputsDict
:
QueueJobShop
.
__init__
(
self
,
inputsDict
=
inputsDict
)
else
:
def
__init__
(
self
,
id
,
name
,
capacity
=
1
,
isDummy
=
False
,
schedulingRule
=
"FIFO"
,
**
kw
):
QueueJobShop
.
__init__
(
self
,
id
=
id
,
name
=
name
,
capacity
=
capacity
,
isDummy
=
isDummy
,
schedulingRule
=
schedulingRule
)
# variable used by the sortEntities method
# to identify the object it will be sorting for (manager.checkIfResourceIsAvailable(self.objectSortingFor))
self
.
objectSortingFor
=
None
# =======================================================================
# parses inputs if they are given in a dictionary
# =======================================================================
def
parseInputs
(
self
,
inputsDict
):
QueueJobShop
.
parseInputs
(
self
,
inputsDict
)
from
Globals
import
G
G
.
QueueManagedJobList
.
append
(
self
)
# =======================================================================
# set all the objects in previous and next
...
...
dream/simulation/Repairman.py
View file @
cc5d571e
...
...
@@ -34,7 +34,7 @@ from Operator import Operator
# the resource that repairs the machines
# ===========================================================================
class
Repairman
(
Operator
):
def
__init__
(
self
,
id
,
name
,
capacity
=
1
):
def
__init__
(
self
,
id
,
name
,
capacity
=
1
,
**
kw
):
Operator
.
__init__
(
self
,
id
=
id
,
name
=
name
,
capacity
=
capacity
)
self
.
type
=
"Repairman"
from
Globals
import
G
...
...
dream/simulation/RoutingQueue.py
View file @
cc5d571e
...
...
@@ -34,14 +34,6 @@ from Queue import Queue
# ===========================================================================
class
RoutingQueue
(
Queue
):
# =======================================================================
# parses inputs if they are given in a dictionary
# =======================================================================
def
parseInputs
(
self
,
inputsDict
):
Queue
.
parseInputs
(
self
,
inputsDict
)
from
Globals
import
G
G
.
RoutingQueueList
.
append
(
self
)
# =======================================================================
# checks if the Queue can dispose an entity to the following object
# it checks also who called it and returns TRUE
...
...
dream/simulation/ScheduledMaintenance.py
View file @
cc5d571e
...
...
@@ -38,7 +38,7 @@ class ScheduledMaintenance(ObjectInterruption):
# =======================================================================
# the __init__() method of the class
# =======================================================================
def
__init__
(
self
,
victim
=
None
,
start
=
0
,
duration
=
1
,
endStatus
=
'interrupted'
):
def
__init__
(
self
,
victim
=
None
,
start
=
0
,
duration
=
1
,
endStatus
=
'interrupted'
,
**
kw
):
'''
interrupted : the maintenance starts immediately
loaded : the maintenance starts as soon as the victim has ended processing
...
...
dream/simulation/ShiftScheduler.py
View file @
cc5d571e
...
...
@@ -39,7 +39,7 @@ class ShiftScheduler(ObjectInterruption):
# =======================================================================
# the __init__() method of the class
# =======================================================================
def
__init__
(
self
,
victim
=
None
,
shiftPattern
=
[],
endUnfinished
=
False
,
receiveBeforeEndThreshold
=
0.0
):
def
__init__
(
self
,
victim
=
None
,
shiftPattern
=
[],
endUnfinished
=
False
,
receiveBeforeEndThreshold
=
0.0
,
**
kw
):
ObjectInterruption
.
__init__
(
self
,
victim
)
self
.
type
=
'ShiftScheduler'
self
.
shiftPattern
=
shiftPattern
...
...
dream/simulation/Source.py
View file @
cc5d571e
...
...
@@ -78,7 +78,7 @@ class Source(CoreObject):
#===========================================================================
# the __init__method of the Source class
#===========================================================================
def
__init__
(
self
,
id
,
name
,
interarrivalTime
=
None
,
entity
=
'Dream.Part'
):
def
__init__
(
self
,
id
,
name
,
interarrivalTime
=
None
,
entity
=
'Dream.Part'
,
**
kw
):
# Default values
if
not
interarrivalTime
:
interarrivalTime
=
{
'distributionType'
:
'Fixed'
,
'mean'
:
1
}
...
...
dream/simulation/SubBatch.py
View file @
cc5d571e
...
...
@@ -32,7 +32,7 @@ class SubBatch(Entity):
type
=
"SubBatch"
def
__init__
(
self
,
id
,
name
,
numberOfUnits
=
1
,
parentBatch
=
None
,
parentBatchName
=
None
,
parentBatchId
=
None
,
remainingProcessingTime
=
0
,
unitsToProcess
=
0
):
remainingProcessingTime
=
0
,
unitsToProcess
=
0
,
**
kw
):
Entity
.
__init__
(
self
,
name
=
name
,
id
=
id
,
remainingProcessingTime
=
remainingProcessingTime
)
self
.
numberOfUnits
=
int
(
numberOfUnits
)
self
.
parentBatch
=
parentBatch
...
...
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