F
Farrel Lifson
I've made the initial release of Precedence which is a small API to
construct and analyse precedence networks, which are used quite a bit
in project management and other areas. Here's the README file:
=3D Precedence
Precedence is a library that allows for the creation, manipulation and anal=
ysis
of precedence networks.
=3D=3D Download and Install
Available as a RubyGem from Rubyforge. To install
$ gem install precedence
will fetch the latest gem from Rubyforge and install it.
Source can also be downloaded from http://rubyforge.org/projects/precedenc=
e.
=3D=3D Example Usage
require('precedence')
=20
# Set up network
net =3D Precedence::Network.new('Begin','End')
net.new_activity('act-1-1',3,'System specification')
net.new_activity('act-1-2',2,'Review')
net.new_activity('act-1-3',2,'System re-specification')
net.new_activity('act-2-1',3,'Test tool design')
net.new_activity('act-2-2',5,'Test tool implementation')
net.new_activity('act-3-1',3,'System design')
net.new_activity('act-3-2',12,'System implementation')
net.new_activity('act-2-3',10,'System testing')
net.connect('act-1-1','act-1-2')
net.connect('act-1-2','act-1-3')
net.connect('act-1-3','act-3-1')
net.connect('act-1-2','act-2-1')
net.connect('act-2-1','act-2-2')
net.connect('act-2-2','act-3-2')
net.connect('act-3-1','act-3-2')
net.connect('act-3-2','act-2-3')
net.fix_connections!
=20
# Generate a diagram
File.open('network.dot',File::CREAT|File::TRUNC|File::WRONLY) do|file|
=09file.puts(net.to_dot)
end
system("dot","-Tpng","-onetwork.png","network.dot")
=20
# Perform some analysis of the activities
activity =3D net.activities['act-1-2']
activity.on_critical_path? # =3D> true=20
activity.earliest_start # =3D> 3.0
activity.latest_finish # =3D> 5.0
activity.total_float # =3D> 0 - activities on the critical path have no f=
loat
=20
=3D=3D Documentation
The Precedence API online documentation is available at=20
http://precedence.rubyforge.org.=20
Refer to the CHANGELOG and TODO files for past changes and upcoming plans.
=3D=3D Credits
Farrel Lifson <[email protected]>
=3D=3D License
This software is made available under the BSD license.
construct and analyse precedence networks, which are used quite a bit
in project management and other areas. Here's the README file:
=3D Precedence
Precedence is a library that allows for the creation, manipulation and anal=
ysis
of precedence networks.
=3D=3D Download and Install
Available as a RubyGem from Rubyforge. To install
$ gem install precedence
will fetch the latest gem from Rubyforge and install it.
Source can also be downloaded from http://rubyforge.org/projects/precedenc=
e.
=3D=3D Example Usage
require('precedence')
=20
# Set up network
net =3D Precedence::Network.new('Begin','End')
net.new_activity('act-1-1',3,'System specification')
net.new_activity('act-1-2',2,'Review')
net.new_activity('act-1-3',2,'System re-specification')
net.new_activity('act-2-1',3,'Test tool design')
net.new_activity('act-2-2',5,'Test tool implementation')
net.new_activity('act-3-1',3,'System design')
net.new_activity('act-3-2',12,'System implementation')
net.new_activity('act-2-3',10,'System testing')
net.connect('act-1-1','act-1-2')
net.connect('act-1-2','act-1-3')
net.connect('act-1-3','act-3-1')
net.connect('act-1-2','act-2-1')
net.connect('act-2-1','act-2-2')
net.connect('act-2-2','act-3-2')
net.connect('act-3-1','act-3-2')
net.connect('act-3-2','act-2-3')
net.fix_connections!
=20
# Generate a diagram
File.open('network.dot',File::CREAT|File::TRUNC|File::WRONLY) do|file|
=09file.puts(net.to_dot)
end
system("dot","-Tpng","-onetwork.png","network.dot")
=20
# Perform some analysis of the activities
activity =3D net.activities['act-1-2']
activity.on_critical_path? # =3D> true=20
activity.earliest_start # =3D> 3.0
activity.latest_finish # =3D> 5.0
activity.total_float # =3D> 0 - activities on the critical path have no f=
loat
=20
=3D=3D Documentation
The Precedence API online documentation is available at=20
http://precedence.rubyforge.org.=20
Refer to the CHANGELOG and TODO files for past changes and upcoming plans.
=3D=3D Credits
Farrel Lifson <[email protected]>
=3D=3D License
This software is made available under the BSD license.