NAME

Math::LP::Constraint - representation of constraints in Math::LP objects

SYNOPSIS

    use Math::LP::Constraints qw(:types); # imports constraint types

    # make the constraint x1 + 2 x2 <= 3
    $x1 = new Math::LP::Variable(name => 'x1');
    $x2 = new Math::LP::Variable(name => 'x2');
    $constraint = new Math::LP::Constraint(
	lhs  => make Math::LP::LinearCombination($x1,1.0,$x2,2.0),
        rhs  => 3.0,
        type => $LE,
    );

DESCRIPTION

A Math::LP::Constraint object has the following fields:

lhs

a Math::LP::LinearCombination object forming the left hand side of the (in)equality (Required)

rhs

a constant number for the right hand side of the (in)equality (Defaults to 0)

type

the (in)equality type, either $LE (<=), $GE (>=) or $EQ (=) (Required)

name

a string with a name for the constraint (Optional, set by Math::LP::add_constraint if not specified)

index

the index of the constraint in the LP (Set by Math::LP::add_constraint)

slack

the slack of the row in the LP (Set after solving the LP)

dual_value

the dual value of the row in the LP (Set after solving the LP)

SEE ALSO

Math::LP, Math::LP::Variable, Math::LP::LinearCombination and Math::LP::Object

AUTHOR

Wim Verhaegen <wim.verhaegen@ieee.org>

COPYRIGHT

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