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
3162647f
Commit
3162647f
authored
Feb 16, 2015
by
Georgios Dagkakis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
general attributes passed into the algorithm. Not read yet
parent
95a0705f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
4 deletions
+5
-4
dream/plugins/AddDemandPlannerGenerator.py
dream/plugins/AddDemandPlannerGenerator.py
+2
-1
dream/simulation/applications/DemandPlanning/ImportInput.py
dream/simulation/applications/DemandPlanning/ImportInput.py
+1
-1
dream/simulation/applications/DemandPlanning/executor_ACO.py
dream/simulation/applications/DemandPlanning/executor_ACO.py
+2
-2
No files found.
dream/plugins/AddDemandPlannerGenerator.py
View file @
3162647f
...
@@ -16,6 +16,7 @@ class AddDemandPlannerGenerator(plugin.InputPreparationPlugin):
...
@@ -16,6 +16,7 @@ class AddDemandPlannerGenerator(plugin.InputPreparationPlugin):
nodes
=
data
[
'graph'
][
'node'
]
nodes
=
data
[
'graph'
][
'node'
]
data_uri_encoded_input_data
=
data
[
'input'
].
get
(
self
.
configuration_dict
[
'input_id'
],
{})
data_uri_encoded_input_data
=
data
[
'input'
].
get
(
self
.
configuration_dict
[
'input_id'
],
{})
algorithmAttributes
=
copy
(
data
[
'general'
])
nodes
[
'DPG'
]
=
{
nodes
[
'DPG'
]
=
{
"name"
:
"DemandPlannerGenerator"
,
"name"
:
"DemandPlannerGenerator"
,
...
@@ -25,7 +26,7 @@ class AddDemandPlannerGenerator(plugin.InputPreparationPlugin):
...
@@ -25,7 +26,7 @@ class AddDemandPlannerGenerator(plugin.InputPreparationPlugin):
"stop"
:
0.5
,
"stop"
:
0.5
,
"_class"
:
"dream.simulation.EventGenerator.EventGenerator"
,
"_class"
:
"dream.simulation.EventGenerator.EventGenerator"
,
"method"
:
"dream.simulation.applications.DemandPlanning.executor_ACO.main"
,
"method"
:
"dream.simulation.applications.DemandPlanning.executor_ACO.main"
,
"argumentDict"
:
{
'input'
:
data_uri_encoded_input_data
}
"argumentDict"
:
{
'input'
:
data_uri_encoded_input_data
,
'algorithmAttributes'
:
algorithmAttributes
}
}
}
#print nodes
#print nodes
return
data
return
data
...
...
dream/simulation/applications/DemandPlanning/ImportInput.py
View file @
3162647f
...
@@ -43,7 +43,7 @@ def my_split(s, seps):
...
@@ -43,7 +43,7 @@ def my_split(s, seps):
res
+=
seq
.
split
(
sep
)
res
+=
seq
.
split
(
sep
)
return
res
return
res
def
ImportInput
(
input
):
def
ImportInput
(
input
,
algorithmAttributes
):
# general simulation input
# general simulation input
mime_type
,
attachement_data
=
input
[
len
(
'data:'
):].
split
(
';base64,'
,
1
)
mime_type
,
attachement_data
=
input
[
len
(
'data:'
):].
split
(
';base64,'
,
1
)
...
...
dream/simulation/applications/DemandPlanning/executor_ACO.py
View file @
3162647f
...
@@ -27,8 +27,8 @@ from AllocManagement_Hybrid import AllocManagement_Hybrid2
...
@@ -27,8 +27,8 @@ from AllocManagement_Hybrid import AllocManagement_Hybrid2
from
ImportInput
import
ImportInput
from
ImportInput
import
ImportInput
from
outputResults
import
outputResults
from
outputResults
import
outputResults
def
main
(
input
):
def
main
(
input
,
algorithmAttributes
):
assert
input
,
'no input is provided, the algorithm cannot run'
assert
input
,
'no input is provided, the algorithm cannot run'
ImportInput
(
input
)
ImportInput
(
input
,
algorithmAttributes
)
AllocManagement_Hybrid2
()
AllocManagement_Hybrid2
()
outputResults
()
outputResults
()
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