The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Algorithm::ScheduledPath::Edge - edge class for Algorithm::ScheduledPath

DESCRIPTION

This is a class used for managing edges in Algorithm::ScheduledPath::Path and Algorithm::ScheduledPath.

Methods

new
  $edge = Algorithm::ScheduledPath::Edge->new();

The constructor. Fields can be set from the constructor:

  $edge = Algorithm::ScheduledPath::Edge->new( {
    path_id     => 'X60',
    origin      => 'KDY', depart_time => 500,
    destination => 'EDH', arrive_time => 570,
  } );
  
id
  $edge->id( $id );

  $id = $edge->id;

An accessor method for the unique edge id. It is currently unused.

If the value is set to 0 or undef, it will automatically generate a unique identifier.

path_id
  $edge->path_id( $id );

  $id = $edge->path_id;

An accessor method for the edge path id. This is a tag used to group together multiple egdes into one path.

origin

An accessor method for identifying the origin vertex.

depart_time

An accessor method for specifying the depature time, as a number.

destination

An accessor method for identifying the destination vertex.

arrive_time

An accessor method for specifying the arrival time, as a number. It is assumed to be greater than or equal to the depature time.

data

An accessor method for attaching additional data to the edge.

travel_time
  $time = travel_time;

Returns the difference between the departure and arrival times.

AUTHOR

Robert Rothenberg <rrwo at cpan.org>

LICENSE

Copyright (c) 2004 Robert Rothenberg. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.