examples/theory/pert.rb in ruby-graphviz-1.0.7 vs examples/theory/pert.rb in ruby-graphviz-1.0.8
- old
+ new
@@ -2,20 +2,20 @@
require 'graphviz'
require 'graphviz/theory'
g = GraphViz.digraph( "G", :path => "/usr/local/bin", :use => "fdp" ) do |g|
g.node[:shape => "record"]
-
+
g.start[:label => "Start"]
g.task_1[:label => "Task #1 - Duration : 4d"]
g.task_2[:label => "Task #2 - Duration : 5.25d"]
g.task_3[:label => "Task #3 - Duration : 5.17d"]
g.task_4[:label => "Task #4 - Duration : 6.33d"]
g.task_5[:label => "Task #5 - Duration : 5.17d"]
g.task_6[:label => "Task #6 - Duration : 4.5d"]
g.task_7[:label => "Task #7 - Duration : 5.17d"]
g.finish[:label => "End"]
-
+
(g.start << g.task_1)[:weight => 0.0]
(g.start << g.task_2)[:weight => 0.0]
(g.task_1 << g.task_3)[:weight => 4.0]
(g.task_1 << g.task_4)[:weight => 4.0]
(g.task_2 << g.task_5)[:weight => 5.25]
\ No newline at end of file