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
ddc62aa7
Commit
ddc62aa7
authored
Nov 28, 2013
by
Georgios Dagkakis
Committed by
Jérome Perrin
Dec 02, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Batch examples changes in order to reflect the documentation style of import
parent
26763833
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
27 deletions
+27
-27
dream/simulation/Examples/BatchDecomposition.py
dream/simulation/Examples/BatchDecomposition.py
+7
-7
dream/simulation/Examples/ClearBatchLines.py
dream/simulation/Examples/ClearBatchLines.py
+12
-12
dream/simulation/Examples/SerialBatchProcessing.py
dream/simulation/Examples/SerialBatchProcessing.py
+8
-8
No files found.
dream/simulation/Examples/BatchDecomposition.py
View file @
ddc62aa7
from
SimPy.Simulation
import
simulate
,
activate
,
initialize
from
Batch
import
Batch
from
BatchDecomposition
import
BatchDecomposition
from
BatchSource
import
BatchSource
from
Machine
import
Machine
from
Exit
import
Exit
from
Queue
import
Queue
from
Globals
import
G
from
simulation.
Batch
import
Batch
from
simulation.
BatchDecomposition
import
BatchDecomposition
from
simulation.
BatchSource
import
BatchSource
from
simulation.
Machine
import
Machine
from
simulation.
Exit
import
Exit
from
simulation.
Queue
import
Queue
from
simulation.
Globals
import
G
# define the objects of the model
...
...
dream/simulation/Examples/ClearBatchLines.py
View file @
ddc62aa7
from
SimPy.Simulation
import
simulate
,
activate
,
initialize
from
Globals
import
G
from
Machine
import
Machine
from
Exit
import
Exit
from
Queue
import
Queue
from
simulation.
Globals
import
G
from
simulation.
Machine
import
Machine
from
simulation.
Exit
import
Exit
from
simulation.
Queue
import
Queue
from
Batch
import
Batch
from
BatchDecomposition
import
BatchDecomposition
from
BatchReassembly
import
BatchReassembly
from
BatchSource
import
BatchSource
from
LineClearance
import
LineClearance
import
ExcelHandler
from
simulation.
Batch
import
Batch
from
simulation.
BatchDecomposition
import
BatchDecomposition
from
simulation.
BatchReassembly
import
BatchReassembly
from
simulation.
BatchSource
import
BatchSource
from
simulation.
LineClearance
import
LineClearance
import
simulation.
ExcelHandler
# choose to output trace or not
G
.
trace
=
'Yes'
# define the objects of the model
S
=
BatchSource
(
'S'
,
'Source'
,
mean
=
1.5
,
item
=
Batch
,
batchNumberOfUnits
=
100
)
Q
=
Queue
(
'Q'
,
'StartQueue'
,
capacity
=
100000
)
Q
=
Queue
(
'Q'
,
'StartQueue'
,
capacity
=
-
1
)
BD
=
BatchDecomposition
(
'BC'
,
'BatchDecomposition'
,
numberOfSubBatches
=
4
,
mean
=
1
)
M1
=
Machine
(
'M1'
,
'Machine1'
,
mean
=
0.5
)
Q1
=
LineClearance
(
'Q1'
,
'Queue1'
,
capacity
=
2
)
...
...
@@ -52,7 +52,7 @@ simulate(until=G.maxSimTime)
for
object
in
G
.
ObjList
:
object
.
postProcessing
()
# print trace
ExcelHandler
.
outputTrace
(
'Topology23
'
)
simulation
.
ExcelHandler
.
outputTrace
(
'Trace
'
)
# print the results
print
"the system produced"
,
E
.
numOfExits
,
"parts"
print
"the working ratio of"
,
M1
.
objName
,
"is"
,
(
M1
.
totalWorkingTime
/
G
.
maxSimTime
)
*
100
...
...
dream/simulation/Examples/SerialBatchProcessing.py
View file @
ddc62aa7
from
SimPy.Simulation
import
simulate
,
activate
,
initialize
from
Globals
import
G
from
Machine
import
Machine
from
Exit
import
Exit
from
Queue
import
Queue
from
simulation.
Globals
import
G
from
simulation.
Machine
import
Machine
from
simulation.
Exit
import
Exit
from
simulation.
Queue
import
Queue
from
Batch
import
Batch
from
BatchDecomposition
import
BatchDecomposition
from
BatchReassembly
import
BatchReassembly
from
BatchSource
import
BatchSource
from
simulation.
Batch
import
Batch
from
simulation.
BatchDecomposition
import
BatchDecomposition
from
simulation.
BatchReassembly
import
BatchReassembly
from
simulation.
BatchSource
import
BatchSource
# define the objects of the model
S
=
BatchSource
(
'S'
,
'Source'
,
mean
=
1.5
,
item
=
Batch
,
batchNumberOfUnits
=
100
)
...
...
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