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
d0c4497e
Commit
d0c4497e
authored
Feb 23, 2015
by
Georgios Dagkakis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
corrections in plugin to work with many orders
parent
be0f80ee
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1599 additions
and
3322 deletions
+1599
-3322
dream/plugins/CapacityProjectGantt.py
dream/plugins/CapacityProjectGantt.py
+8
-4
dream/simulation/Examples/GUI_models/CapacityProject7Orders.json
...imulation/Examples/GUI_models/CapacityProject7Orders.json
+1591
-3318
No files found.
dream/plugins/CapacityProjectGantt.py
View file @
d0c4497e
...
...
@@ -37,11 +37,11 @@ class CapacityProjectGantt(plugin.OutputPreparationPlugin, TimeSupportMixin):
id
=
element
[
'id'
],
text
=
'Project %s'
%
element
[
'id'
],
type
=
'project'
,
open
=
Tru
e
)
open
=
Fals
e
)
projectSchedule
=
element
[
'results'
].
get
(
'schedule'
,{})
for
record
in
projectSchedule
:
task_dict
[
record
[
'stationId'
]]
=
dict
(
task_dict
[
element
[
'id'
]
+
record
[
'stationId'
]]
=
dict
(
id
=
record
[
'stationId'
],
parent
=
element
[
'id'
],
text
=
record
[
'stationId'
],
...
...
@@ -49,7 +49,7 @@ class CapacityProjectGantt(plugin.OutputPreparationPlugin, TimeSupportMixin):
record
[
'entranceTime'
]).
strftime
(
date_format
),
stop_date
=
self
.
convertToRealWorldTime
(
record
[
'exitTime'
]).
strftime
(
date_format
),
open
=
Tru
e
,
open
=
Fals
e
,
duration
=
int
(
record
[
'exitTime'
])
-
int
(
record
[
'entranceTime'
])
)
...
...
@@ -58,9 +58,13 @@ class CapacityProjectGantt(plugin.OutputPreparationPlugin, TimeSupportMixin):
result
[
self
.
configuration_dict
[
'output_id'
]]
=
dict
(
time_unit
=
self
.
getTimeUnitText
(),
task_list
=
sorted
(
task_dict
.
values
(),
key
=
lambda
task
:
(
task
.
get
(
'
order_
id'
),
key
=
lambda
task
:
(
task
.
get
(
'id'
),
task
.
get
(
'type'
)
==
'project'
,
task
.
get
(
'start_date'
))))
import
json
outputJSONString
=
json
.
dumps
(
task_dict
,
indent
=
5
)
outputJSONFile
=
open
(
'task_dict.json'
,
mode
=
'w'
)
outputJSONFile
.
write
(
outputJSONString
)
return
data
#
...
...
dream/simulation/Examples/GUI_models/CapacityProject7Orders.json
View file @
d0c4497e
This source diff could not be displayed because it is too large. You can
view the blob
instead.
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