The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Graph::PetriNet::TransitionAble - Trait for Petri net transition

SYNOPSIS

  {
    package My::Place::TimeDepend;
    use Class::Trait (
        'Graph::PetriNet::TransitionAble' => {
            exclude => [ 'ignitable', 'ignite' ] });
    ...
    sub ignitable { ... }
    sub ignite    { ... }
   }

DESCRIPTION

Petri net transition nodes carry the information when they can be triggered, how they execute and how they move information from the incoming data nodes to the outgoing ones.

The default behavior implemented here only takes tokens from the upstream pushing them into the downstream data nodes.

TRAIT

Methods

inputs

Configures the list of incoming data nodes. Passed in as list reference.

outputs

Configures the list of outgoing data nodes. Passed in as list reference.

ignitable

Method to check whether this particular transition can be fired. Returns a non-zero result if that is the case.

ignite

Actually fire the transition.

SEE ALSO

Graph::PetriNet

AUTHOR

Robert Barta, <drrho@cpan.org>

COPYRIGHT AND LICENSE

Copyright (C) 2009 by Robert Barta

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.10.0 or, at your option, any later version of Perl 5 you may have available.