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
a0033a7b
Commit
a0033a7b
authored
Nov 10, 2015
by
Georgios Dagkakis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
second example to be able to define the volume its package contains
parent
27f54900
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
42 additions
and
0 deletions
+42
-0
dream/simulation/Examples/MilkPlant02.py
dream/simulation/Examples/MilkPlant02.py
+42
-0
No files found.
dream/simulation/Examples/MilkPlant02.py
0 → 100644
View file @
a0033a7b
from
dream.simulation.applications.MilkPlant.imports
import
*
from
dream.simulation.imports
import
ExcelHandler
,
ExitJobShop
from
dream.simulation.Globals
import
runSimulation
# how many liters is one milk pack
milkUnit
=
1.0
T1
=
MilkTank
(
'T1'
,
'T1'
,
capacity
=
3200
/
float
(
milkUnit
))
T2
=
MilkTank
(
'T2'
,
'T2'
,
capacity
=
2600
/
float
(
milkUnit
))
T3
=
MilkTank
(
'T3'
,
'T3'
,
capacity
=
7000
/
float
(
milkUnit
))
Tr1
=
MilkTransport
(
'Tr1'
,
'Tr1'
)
Tr2
=
MilkTransport
(
'Tr2'
,
'Tr2'
)
Tr3
=
MilkTransport
(
'Tr3'
,
'Tr3'
)
E
=
ExitJobShop
(
'E'
,
'Exit'
)
route1
=
[{
"stationIdsList"
:
[
"T1"
]},
{
"stationIdsList"
:
[
"Tr1"
],
"processingTime"
:{
'Fixed'
:{
'mean'
:
0.034682
*
milkUnit
}}},
{
"stationIdsList"
:
[
"T2"
]},
{
"stationIdsList"
:
[
"Tr2"
],
"processingTime"
:{
'Fixed'
:{
'mean'
:
0
}},
'volume'
:
1000
},
{
"stationIdsList"
:
[
"E"
]}]
route2
=
[{
"stationIdsList"
:
[
"T3"
]},
{
"stationIdsList"
:
[
"Tr3"
],
"processingTime"
:{
'Fixed'
:{
'mean'
:
0.222222
*
milkUnit
}}},
{
"stationIdsList"
:
[
"T2"
]},
{
"stationIdsList"
:
[
"Tr2"
],
"processingTime"
:{
'Fixed'
:{
'mean'
:
0
}},
'volume'
:
1000
},
{
"stationIdsList"
:
[
"E"
]}]
MPList
=
[]
for
i
in
range
(
int
(
865
/
float
(
milkUnit
))):
MP
=
MilkPack
(
'MT_A'
+
str
(
i
),
'MT_A'
+
str
(
i
),
route
=
list
(
route1
),
liters
=
milkUnit
,
fat
=
3.8
,
productId
=
1
)
MPList
.
append
(
MP
)
for
i
in
range
(
int
(
135
/
float
(
milkUnit
))):
MP
=
MilkPack
(
'MT_B'
+
str
(
i
),
'MT_B'
+
str
(
i
),
route
=
route2
,
currentStation
=
T3
,
liters
=
milkUnit
,
fat
=
0.1
,
productId
=
1
)
MPList
.
append
(
MP
)
runSimulation
([
T1
,
T2
,
T3
,
Tr1
,
Tr2
,
Tr3
,
E
]
+
MPList
,
1000
,
trace
=
'Yes'
)
ExcelHandler
.
outputTrace
(
'MilkPlant2'
)
print
1
\ No newline at end of file
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