@@ -46,6 +46,7 @@ $(document).ready(function() {
4646 } ) ;
4747 } else if ( $ ( "#algorithm" ) . val ( ) === "genetic-algorithm" ) {
4848 var data_tbs = JSON . stringify ( {
49+ nograph : true ,
4950 algorithm : $ ( "#algorithm" ) . val ( ) ,
5051 data : $ ( "#data" ) . val ( ) ,
5152 nb_machines : $ ( "#nb_machines" ) . val ( ) ,
@@ -72,11 +73,19 @@ $(document).ready(function() {
7273 data : data_tbs ,
7374 processData : false ,
7475 success : function ( data , textStatus , jQxhr ) {
75- Plotly . newPlot ( "gantt" , JSON . parse ( data [ "graph" ] ) , { } ) ;
76- $ ( "#sequence" ) . text ( data [ "opt_seq" ] ) ;
77- $ ( "#opt_makespan" ) . text ( data [ "optim_makespan" ] ) ;
78- var time_str = data [ "t_time" ] . toString ( ) + " " + data [ "tt" ] . toString ( ) ;
79- $ ( "#time" ) . text ( time_str ) ;
76+ if ( data [ "graph" ] === null ) {
77+ $ ( "#sequence" ) . text ( data [ "opt_seq" ] ) ;
78+ $ ( "#opt_makespan" ) . text ( data [ "optim_makespan" ] ) ;
79+ var time_str = data [ "t_time" ] . toString ( ) + " " + data [ "tt" ] . toString ( ) ;
80+ $ ( "#time" ) . text ( time_str ) ;
81+ } else {
82+ Plotly . newPlot ( "gantt" , JSON . parse ( data [ "graph" ] ) , { } ) ;
83+ $ ( "#sequence" ) . text ( data [ "opt_seq" ] ) ;
84+ $ ( "#opt_makespan" ) . text ( data [ "optim_makespan" ] ) ;
85+ var time_str = data [ "t_time" ] . toString ( ) + " " + data [ "tt" ] . toString ( ) ;
86+ $ ( "#time" ) . text ( time_str ) ;
87+ }
88+ 8089 } ,
8190 error : function ( jQxhr , textStatus , errorThrow ) {
8291 console . log ( textStatus ) ;
0 commit comments