Class: OPL::VariableCoefficientPair
- Inherits:
-
Object
- Object
- OPL::VariableCoefficientPair
- Defined in:
- lib/opl.rb
Instance Attribute Summary collapse
-
#coefficient ⇒ Object
Returns the value of attribute coefficient.
-
#lower_bound ⇒ Object
Returns the value of attribute lower_bound.
-
#upper_bound ⇒ Object
Returns the value of attribute upper_bound.
-
#variable ⇒ Object
Returns the value of attribute variable.
-
#variable_type ⇒ Object
Returns the value of attribute variable_type.
Instance Method Summary collapse
-
#initialize(variable, coefficient, variable_type = 1) ⇒ VariableCoefficientPair
constructor
A new instance of VariableCoefficientPair.
Constructor Details
#initialize(variable, coefficient, variable_type = 1) ⇒ VariableCoefficientPair
Returns a new instance of VariableCoefficientPair.
862 863 864 865 866 |
# File 'lib/opl.rb', line 862 def initialize(variable, coefficient, variable_type=1) @variable = variable @coefficient = coefficient @variable_type = variable_type end |
Instance Attribute Details
#coefficient ⇒ Object
Returns the value of attribute coefficient.
857 858 859 |
# File 'lib/opl.rb', line 857 def coefficient @coefficient end |
#lower_bound ⇒ Object
Returns the value of attribute lower_bound.
859 860 861 |
# File 'lib/opl.rb', line 859 def lower_bound @lower_bound end |
#upper_bound ⇒ Object
Returns the value of attribute upper_bound.
860 861 862 |
# File 'lib/opl.rb', line 860 def upper_bound @upper_bound end |
#variable ⇒ Object
Returns the value of attribute variable.
856 857 858 |
# File 'lib/opl.rb', line 856 def variable @variable end |
#variable_type ⇒ Object
Returns the value of attribute variable_type.
858 859 860 |
# File 'lib/opl.rb', line 858 def variable_type @variable_type end |