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
3e1b8dcd
Commit
3e1b8dcd
authored
Jun 13, 2014
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update gantt widget to support capacity project
parent
9cae3eb4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
7 deletions
+14
-7
dream/platform/static/src/dream.js
dream/platform/static/src/dream.js
+13
-6
dream/simulation/GUI/CapacityProject.py
dream/simulation/GUI/CapacityProject.py
+1
-1
No files found.
dream/platform/static/src/dream.js
View file @
3e1b8dcd
...
@@ -453,10 +453,13 @@
...
@@ -453,10 +453,13 @@
// we should be able to define in the backend which station is visible
// we should be able to define in the backend which station is visible
return
input_data
.
nodes
[
station
].
_class
!=
"
Dream.QueueManagedJob
"
&&
return
input_data
.
nodes
[
station
].
_class
!=
"
Dream.QueueManagedJob
"
&&
input_data
.
nodes
[
station
].
_class
!=
"
Dream.OperatorManagedJob
"
&&
input_data
.
nodes
[
station
].
_class
!=
"
Dream.OperatorManagedJob
"
&&
input_data
.
nodes
[
station
].
_class
!=
"
Dream.ExitJobShop
"
input_data
.
nodes
[
station
].
_class
!=
"
Dream.ExitJobShop
"
&&
input_data
.
nodes
[
station
].
_class
!=
"
Dream.CapacityStationBuffer
"
&&
input_data
.
nodes
[
station
].
_class
!=
"
Dream.CapacityStationExit
"
&&
input_data
.
nodes
[
station
].
_class
!=
"
Dream.Queue
"
};
};
if
(
obj
.
_class
===
'
Dream.Job
'
)
{
if
(
obj
.
_class
===
'
Dream.Job
'
||
obj
.
_class
===
'
Dream.CapacityProject
'
)
{
// find the corresponding input
// find the corresponding input
var
input_job
=
null
,
input_order
=
null
;
var
input_job
=
null
,
input_order
=
null
;
// find the input order and order component for this job
// find the input order and order component for this job
...
@@ -468,7 +471,7 @@
...
@@ -468,7 +471,7 @@
if
(
order
.
id
==
obj
.
id
)
{
if
(
order
.
id
==
obj
.
id
)
{
input_job
=
input_order
=
order
;
input_job
=
input_order
=
order
;
}
}
if
(
input_job
===
null
)
{
if
(
input_job
===
null
&&
order
.
componentsList
)
{
for
(
var
j
=
0
;
j
<
order
.
componentsList
.
length
;
j
++
){
for
(
var
j
=
0
;
j
<
order
.
componentsList
.
length
;
j
++
){
var
component
=
order
.
componentsList
[
j
];
var
component
=
order
.
componentsList
[
j
];
if
(
component
.
id
==
obj
.
id
){
if
(
component
.
id
==
obj
.
id
){
...
@@ -498,10 +501,14 @@
...
@@ -498,10 +501,14 @@
if
(
isVisibleStation
(
schedule
[
'
stationId
'
]))
{
if
(
isVisibleStation
(
schedule
[
'
stationId
'
]))
{
var
entrance_date
=
new
Date
(
start_date
.
getTime
());
var
entrance_date
=
new
Date
(
start_date
.
getTime
());
entrance_date
.
setTime
(
entrance_date
.
getTime
()
+
schedule
[
'
entranceTime
'
]
*
1000
*
3600
);
entrance_date
.
setTime
(
entrance_date
.
getTime
()
+
schedule
[
'
entranceTime
'
]
*
1000
*
3600
);
if
(
obj
[
'
results
'
][
'
schedule
'
][
i
+
1
])
{
if
(
schedule
[
'
exitTime
'
])
{
duration
=
obj
[
'
results
'
][
'
schedule
'
][
i
+
1
][
'
entranceTime
'
]
-
schedule
[
'
entranceTime
'
]
;
duration
=
(
schedule
[
'
exitTime
'
]
-
schedule
[
'
entranceTime
'
])
;
}
else
{
}
else
{
duration
=
obj
[
'
results
'
].
completionTime
-
schedule
[
'
entranceTime
'
];
if
(
obj
[
'
results
'
][
'
schedule
'
][
i
+
1
])
{
duration
=
obj
[
'
results
'
][
'
schedule
'
][
i
+
1
][
'
entranceTime
'
]
-
schedule
[
'
entranceTime
'
];
}
else
{
duration
=
obj
[
'
results
'
].
completionTime
-
schedule
[
'
entranceTime
'
];
}
}
}
if
(
duration
>
0.0
)
{
if
(
duration
>
0.0
)
{
var
task_start_date
=
new
Date
(
start_date
.
getTime
());
var
task_start_date
=
new
Date
(
start_date
.
getTime
());
...
...
dream/simulation/GUI/CapacityProject.py
View file @
3e1b8dcd
...
@@ -27,7 +27,7 @@ class Simulation(DefaultSimulation):
...
@@ -27,7 +27,7 @@ class Simulation(DefaultSimulation):
conf
[
"Dream-Configuration"
][
"gui"
][
"station_utilisation_graph"
]
=
0
conf
[
"Dream-Configuration"
][
"gui"
][
"station_utilisation_graph"
]
=
0
conf
[
"Dream-Configuration"
][
"gui"
][
"capacity_utilisation_graph"
]
=
1
conf
[
"Dream-Configuration"
][
"gui"
][
"capacity_utilisation_graph"
]
=
1
conf
[
"Dream-Configuration"
][
"gui"
][
"job_schedule_spreadsheet"
]
=
1
conf
[
"Dream-Configuration"
][
"gui"
][
"job_schedule_spreadsheet"
]
=
1
conf
[
"Dream-Configuration"
][
"gui"
][
"job_gantt"
]
=
0
# XXX does not work
conf
[
"Dream-Configuration"
][
"gui"
][
"job_gantt"
]
=
1
# XXX does not work
conf
[
"Dream-Configuration"
][
"gui"
][
"queue_stat"
]
=
0
conf
[
"Dream-Configuration"
][
"gui"
][
"queue_stat"
]
=
0
conf
[
"Dream-Configuration"
][
"gui"
][
"debug_json"
]
=
1
conf
[
"Dream-Configuration"
][
"gui"
][
"debug_json"
]
=
1
...
...
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