[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

[ANN] Precedence 0.6

Farrel Lifson

5/15/2005 8:06:00 PM

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:

= Precedence

Precedence is a library that allows for the creation, manipulation and analysis
of precedence networks.

== 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/....

== Example Usage
require('precedence')

# Set up network
net = 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!

# Generate a diagram
File.open('network.dot',File::CREAT|File::TRUNC|File::WRONLY) do|file|
file.puts(net.to_dot)
end
system("dot","-Tpng","-onetwork.png","network.dot")

# Perform some analysis of the activities
activity = net.activities['act-1-2']
activity.on_critical_path? # => true
activity.earliest_start # => 3.0
activity.latest_finish # => 5.0
activity.total_float # => 0 - activities on the critical path have no float

== Documentation

The Precedence API online documentation is available at
http://precedence.rub....

Refer to the CHANGELOG and TODO files for past changes and upcoming plans.

== Credits

Farrel Lifson <farrel@lifson.info>

== License

This software is made available under the BSD license.


4 Answers

gabriele renzi

5/15/2005 8:29:00 PM

0

Farrel Lifson ha scritto:
> 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:
>
> = Precedence
>
> Precedence is a library that allows for the creation, manipulation and analysis
> of precedence networks.

wow, this seem cool, thanks for releasing it.
Anyway, I wonder why you designed the api this way (I'm dumb that's not
your fault):
why add_activity does not allow pre and post conditions to be set ?
Also, IMHO an alias #<< for #add_activity would be nice

Farrel Lifson

5/15/2005 8:40:00 PM

0

> wow, this seem cool, thanks for releasing it.
> Anyway, I wonder why you designed the api this way (I'm dumb that's not
> your fault):
> why add_activity does not allow pre and post conditions to be set ?
> Also, IMHO an alias #<< for #add_activity would be nice
>

I actually never thought about it but some post facto justification is
that from the network level I guess it might be better seperating
adding activities to the network and connecting them. What I probably
will do in the next version is have add_activity return the added
activity so that you could then say
net.add_activity(someActivity).add_post_activities(someOtherActivity)

Farrel


gabriele renzi

5/15/2005 8:43:00 PM

0

Farrel Lifson ha scritto:
>>wow, this seem cool, thanks for releasing it.
>>Anyway, I wonder why you designed the api this way (I'm dumb that's not
>>your fault):
>> why add_activity does not allow pre and post conditions to be set ?
>>Also, IMHO an alias #<< for #add_activity would be nice
>>
>
>
> I actually never thought about it but some post facto justification is
> that from the network level I guess it might be better seperating
> adding activities to the network and connecting them. What I probably
> will do in the next version is have add_activity return the added
> activity so that you could then say
> net.add_activity(someActivity).add_post_activities(someOtherActivity)

then I'd probably ask about adding #<< to Activity so that you could write:
net << act1 << act2 << act3
but maybe I just need more sleep :)
Thanks for the answer.

Ralph \"PJPizza\" Siegler

5/16/2005 1:15:00 AM

0

On Mon, May 16, 2005 at 05:05:46AM +0900, Farrel Lifson wrote:
> 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:
>
> = Precedence
>
> Precedence is a library that allows for the creation, manipulation and analysis
> of precedence networks.
>
>
Farrel, neat idea and I myself was thinking about what it would take to do some of the things a certain popular scheduling package (with initials O.P.) does, doing prededence networks but also with holidays (or "calendars") and the constraints of PDM method start-start, start-finish, finish-finish, etc.

So I'm mainly thinking of starting off with just the time calculations, before even getting into "activities" and "networks". Just going down to the hour would be painful enough with nonworking hour calculations, but maybe I should go "all the way" and do allow scheduling down to minute or at least 15 minute interval.

Very thought provoking, thanks!

Ralph "PJPizza"