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
095e5a71
Commit
095e5a71
authored
Jan 30, 2014
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
missing property
parent
5ed0999b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
50 additions
and
1 deletion
+50
-1
dream/simulation/GUI/Batches.py
dream/simulation/GUI/Batches.py
+37
-0
dream/simulation/GUI/Default.py
dream/simulation/GUI/Default.py
+13
-1
No files found.
dream/simulation/GUI/Batches.py
0 → 100644
View file @
095e5a71
from
copy
import
copy
import
json
import
time
import
random
import
operator
from
dream.simulation.GUI.Default
import
Simulation
as
DefaultSimulation
from
dream.simulation.GUI.Default
import
schema
class
Simulation
(
DefaultSimulation
):
def
getConfigurationDict
(
self
):
conf
=
DefaultSimulation
.
getConfigurationDict
(
self
)
conf
[
'Dream-LineClearance'
]
=
{
"_class"
:
"Dream.LineClearance"
,
"property_list"
:
conf
[
'Dream-Queue'
][
'property_list'
]}
conf
[
'Dream-BatchSource'
]
=
{
"_class"
:
"Dream.BatchSource"
,
"property_list"
:
conf
[
'Dream-Source'
][
'property_list'
]
\
+
[
schema
[
'batchNumberOfUnits'
]]
}
conf
[
'Dream-BatchDecomposition'
]
=
{
"_class"
:
"Dream.BatchDecomposition"
,
"property_list"
:
[
schema
[
'processingTime'
],
schema
[
'numberOfSubBatches'
]
]
}
conf
[
'Dream-BatchReassembly'
]
=
{
"_class"
:
"Dream.BatchReassembly"
,
"property_list"
:
[
schema
[
'processingTime'
],
schema
[
'numberOfSubBatches'
]
]
}
conf
[
'Dream-BatchScrapMachine'
]
=
{
"_class"
:
"Dream.BatchScrapMachine"
,
"property_list"
:
conf
[
'Dream-Machine'
][
'property_list'
]
}
return
conf
def
run
(
self
,
data
):
return
DefaultSimulation
.
run
(
self
.
_preprocess
(
data
))
dream/simulation/GUI/Default.py
View file @
095e5a71
...
...
@@ -104,7 +104,19 @@ schema = {
"type"
:
"string"
,
"_class"
:
"Dream.Property"
,
"_default"
:
"0.5"
}
},
"batchNumberOfUnits"
:
{
"id"
:
"batchNumberOfUnits"
,
"type"
:
"integer"
,
"_class"
:
"Dream.Property"
,
"_default"
:
"10"
},
"numberOfSubBatches"
:
{
"id"
:
"numberOfSubBatches"
,
"type"
:
"integer"
,
"_class"
:
"Dream.Property"
,
"_default"
:
"10"
},
}
# complex schemas (Dream.PropertyList)
...
...
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