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
82d5ffd3
Commit
82d5ffd3
authored
Feb 26, 2014
by
Sebastien Robin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ParJobShop: fixed issues to have two orders working in the GUI
parent
1cd58978
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
65 additions
and
36 deletions
+65
-36
dream/platform/static/src/dream.js
dream/platform/static/src/dream.js
+61
-34
dream/simulation/GUI/PartJobShop.py
dream/simulation/GUI/PartJobShop.py
+4
-2
No files found.
dream/platform/static/src/dream.js
View file @
82d5ffd3
...
@@ -405,26 +405,36 @@
...
@@ -405,26 +405,36 @@
var
job_index
=
parseInt
(
obj
[
"
id
"
]);
var
job_index
=
parseInt
(
obj
[
"
id
"
]);
input_job
=
data
.
wip_part_spreadsheet
[
job_index
];
input_job
=
data
.
wip_part_spreadsheet
[
job_index
];
var
i
=
job_index
;
var
i
=
job_index
;
while
(
data
.
wip_part_spreadsheet
[
i
][
0
]
===
null
)
{
while
(
data
.
wip_part_spreadsheet
[
i
][
0
]
===
null
||
data
.
wip_part_spreadsheet
[
i
][
0
]
===
""
)
{
i
=
i
-
1
;
i
=
i
-
1
;
}
}
input_order
=
data
.
wip_part_spreadsheet
[
i
];
input_order
=
data
.
wip_part_spreadsheet
[
i
];
};
};
var
duration
=
0
;
var
duration
=
0
;
console
.
log
(
"
input_job
"
,
input_job
);
if
(
configuration
[
'
Dream-Configuration
'
].
gui
.
wip_spreadsheet
)
{
gantt_data
.
data
.
push
({
gantt_data
.
data
.
push
({
id
:
obj
[
'
id
'
],
id
:
obj
[
'
id
'
],
text
:
input_job
[
1
],
text
:
input_job
[
1
],
start_date
:
start_date
,
start_date
:
start_date
,
duration
:
obj
[
'
results
'
].
completionTime
,
duration
:
obj
[
'
results
'
].
completionTime
,
project
:
1
,
project
:
1
,
open
:
false
,
open
:
false
,
parent
:
"
by_job
"
parent
:
"
by_job
"
});
});
}
else
if
(
configuration
[
'
Dream-Configuration
'
].
gui
.
wip_part_spreadsheet
)
{
if
(
input_job
==
input_order
)
{
// if we are on the order definition
gantt_data
.
data
.
push
({
id
:
input_order
[
0
],
text
:
input_order
[
0
],
project
:
1
,
open
:
false
,
parent
:
"
by_job
"
});
}
};
$
.
each
(
obj
[
'
results
'
][
'
schedule
'
],
function
(
i
,
schedule
)
{
$
.
each
(
obj
[
'
results
'
][
'
schedule
'
],
function
(
i
,
schedule
)
{
console
.
log
(
"
schedule
"
,
schedule
);
// Filter intermediate steps in part job shop
// Filter intermediate steps in part job shop
if
(
isVisibleStation
(
schedule
[
'
stationId
'
]))
{
if
(
isVisibleStation
(
schedule
[
'
stationId
'
]))
{
if
(
configuration
[
'
Dream-Configuration
'
].
gui
.
wip_spreadsheet
)
{
if
(
configuration
[
'
Dream-Configuration
'
].
gui
.
wip_spreadsheet
)
{
...
@@ -441,7 +451,6 @@
...
@@ -441,7 +451,6 @@
schedule
[
'
stepNumber
'
]
schedule
[
'
stepNumber
'
]
]);
]);
}
else
if
(
configuration
[
'
Dream-Configuration
'
].
gui
.
wip_part_spreadsheet
)
{
}
else
if
(
configuration
[
'
Dream-Configuration
'
].
gui
.
wip_part_spreadsheet
)
{
console
.
log
(
"
XXXXX going to push wip_part spreadsheet_data
"
,
input_order
,
input_job
);
spreadsheet_data
.
push
([
spreadsheet_data
.
push
([
input_order
[
0
]
+
"
-
"
+
input_job
[
4
],
input_order
[
0
]
+
"
-
"
+
input_job
[
4
],
obj
[
'
id
'
],
obj
[
'
id
'
],
...
@@ -461,35 +470,53 @@
...
@@ -461,35 +470,53 @@
duration
=
obj
[
'
results
'
].
completionTime
-
schedule
[
'
entranceTime
'
];
duration
=
obj
[
'
results
'
].
completionTime
-
schedule
[
'
entranceTime
'
];
}
}
if
(
duration
>
0.0
)
{
if
(
duration
>
0.0
)
{
var
task_start_date
=
new
Date
(
start_date
.
getTime
());
if
(
configuration
[
'
Dream-Configuration
'
].
gui
.
wip_spreadsheet
)
{
task_start_date
.
setDate
(
task_start_date
.
getDate
()
+
schedule
[
'
entranceTime
'
]);
var
task_start_date
=
new
Date
(
start_date
.
getTime
());
gantt_data
.
data
.
push
({
task_start_date
.
setDate
(
task_start_date
.
getDate
()
+
schedule
[
'
entranceTime
'
]);
id
:
obj
[
'
id
'
]
+
'
.
'
+
schedule
[
'
stepNumber
'
],
gantt_data
.
data
.
push
({
text
:
schedule
[
'
stationId
'
],
id
:
obj
[
'
id
'
]
+
'
.
'
+
schedule
[
'
stepNumber
'
],
start_date
:
task_start_date
,
text
:
schedule
[
'
stationId
'
],
duration
:
duration
,
start_date
:
task_start_date
,
parent
:
obj
[
'
id
'
]
duration
:
duration
,
});
parent
:
obj
[
'
id
'
]
console
.
log
(
"
going to push gantt by station
"
,
obj
,
schedule
);
});
gantt_data
.
data
.
push
({
console
.
log
(
"
going to push gantt by station
"
,
obj
,
schedule
);
id
:
'
job.
'
+
obj
[
'
id
'
]
+
'
.
'
+
schedule
[
'
stepNumber
'
],
gantt_data
.
data
.
push
({
text
:
obj
[
'
id
'
],
id
:
'
job.
'
+
obj
[
'
id
'
]
+
'
.
'
+
schedule
[
'
stepNumber
'
],
start_date
:
task_start_date
,
text
:
obj
[
'
id
'
],
duration
:
duration
,
start_date
:
task_start_date
,
parent
:
schedule
[
'
stationId
'
],
duration
:
duration
,
by_station
:
1
parent
:
schedule
[
'
stationId
'
],
});
by_station
:
1
});
}
else
if
(
configuration
[
'
Dream-Configuration
'
].
gui
.
wip_part_spreadsheet
)
{
var
task_start_date
=
new
Date
(
start_date
.
getTime
());
task_start_date
.
setDate
(
task_start_date
.
getDate
()
+
schedule
[
'
entranceTime
'
]);
console
.
log
(
"
going to push gantt by job
"
,
input_order
[
0
],
schedule
,
i
);
gantt_data
.
data
.
push
({
id
:
input_order
[
0
]
+
'
.
'
+
idx
+
'
_
'
+
i
,
text
:
schedule
[
'
stationId
'
],
start_date
:
task_start_date
,
duration
:
duration
,
parent
:
input_order
[
0
]
});
gantt_data
.
data
.
push
({
id
:
'
job.
'
+
obj
[
'
id
'
]
+
'
.
'
+
idx
+
'
_
'
+
i
,
text
:
input_order
[
0
]
+
"
-
"
+
input_job
[
4
],
start_date
:
task_start_date
,
duration
:
duration
,
parent
:
schedule
[
'
stationId
'
],
by_station
:
1
});
}
}
}
}
}
});
});
}
else
{
}
else
{
console
.
log
(
"
in else clause to push by station
"
,
obj
);
if
(
isVisibleStation
(
obj
[
'
id
'
]))
{
if
(
isVisibleStation
(
obj
[
'
id
'
]))
{
gantt_data
.
data
.
push
({
gantt_data
.
data
.
push
({
id
:
obj
[
'
id
'
],
id
:
obj
[
'
id
'
],
text
:
obj
[
'
id
'
],
text
:
obj
[
'
id
'
],
start_date
:
now
,
duration
:
0
,
project
:
1
,
project
:
1
,
open
:
false
,
open
:
false
,
parent
:
"
by_station
"
parent
:
"
by_station
"
...
...
dream/simulation/GUI/PartJobShop.py
View file @
82d5ffd3
...
@@ -148,6 +148,7 @@ class Simulation(ACO.Simulation):
...
@@ -148,6 +148,7 @@ class Simulation(ACO.Simulation):
wip_list
.
append
(
order_dict
)
wip_list
.
append
(
order_dict
)
order_id
,
due_date
,
priority
,
project_manager
,
part
,
part_type
,
\
order_id
,
due_date
,
priority
,
project_manager
,
part
,
part_type
,
\
sequence_list
,
processing_time_list
,
electrode_needed
=
value_list
sequence_list
,
processing_time_list
,
electrode_needed
=
value_list
print
"evaluate due_date : %r"
%
(
due_date
,)
due_date
=
(
datetime
.
strptime
(
due_date
,
'%Y/%m/%d'
)
-
now
).
days
due_date
=
(
datetime
.
strptime
(
due_date
,
'%Y/%m/%d'
)
-
now
).
days
sequence_list
=
sequence_list
.
split
(
'-'
)
sequence_list
=
sequence_list
.
split
(
'-'
)
processing_time_list
=
processing_time_list
.
split
(
'-'
)
processing_time_list
=
processing_time_list
.
split
(
'-'
)
...
@@ -162,9 +163,10 @@ class Simulation(ACO.Simulation):
...
@@ -162,9 +163,10 @@ class Simulation(ACO.Simulation):
i
+=
1
i
+=
1
component_list
=
[]
component_list
=
[]
if
i
<
wip_part_spreadsheet_length
:
if
i
<
wip_part_spreadsheet_length
:
while
data
[
'wip_part_spreadsheet'
][
i
][
0
]
==
None
:
print
"first cell : %r"
%
(
data
[
'wip_part_spreadsheet'
][
i
][
0
],)
while
data
[
'wip_part_spreadsheet'
][
i
][
0
]
in
(
None
,
''
):
value_list
=
data
[
'wip_part_spreadsheet'
][
i
]
value_list
=
data
[
'wip_part_spreadsheet'
][
i
]
if
value_list
[
4
]
==
None
:
if
value_list
[
4
]
in
(
None
,
''
)
:
break
break
order_id
,
due_date
,
priority
,
project_manager
,
part
,
part_type
,
\
order_id
,
due_date
,
priority
,
project_manager
,
part
,
part_type
,
\
sequence_list
,
processing_time_list
,
electrode_needed
=
value_list
sequence_list
,
processing_time_list
,
electrode_needed
=
value_list
...
...
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