biogeme.expressions.binary_expressions module

Arithmetic expressions accepted by Biogeme: binary operators

author:

Michel Bierlaire

date:

Sat Sep 9 15:18:27 2023

class biogeme.expressions.binary_expressions.And(left, right)[source]

Bases: BinaryOperator

Logical and

Parameters:
  • left (ExpressionOrNumeric)

  • right (ExpressionOrNumeric)

getValue()[source]

Warning

This function is deprecated. Use get_value() instead.

Kept for backward compatibility

Return type:

float

get_value()[source]

Evaluates the value of the expression

Returns:

value of the expression

Return type:

float

class biogeme.expressions.binary_expressions.BinaryOperator(left, right)[source]

Bases: Expression

Base class for arithmetic expressions that are binary operators. This expression is the result of the combination of two expressions, typically addition, subtraction, multiplication or division.

Parameters:
  • left (ExpressionOrNumeric)

  • right (ExpressionOrNumeric)

class biogeme.expressions.binary_expressions.Divide(left, right)[source]

Bases: BinaryOperator

Division expression

Parameters:
  • left (ExpressionOrNumeric)

  • right (ExpressionOrNumeric)

getValue()[source]

Warning

This function is deprecated. Use get_value() instead.

Kept for backward compatibility

Return type:

float

get_value()[source]

Evaluates the value of the expression

Returns:

value of the expression

Return type:

float

class biogeme.expressions.binary_expressions.Minus(left, right)[source]

Bases: BinaryOperator

Substraction expression

Parameters:
  • left (ExpressionOrNumeric)

  • right (ExpressionOrNumeric)

getValue()[source]

Warning

This function is deprecated. Use get_value() instead.

Kept for backward compatibility

Return type:

float

get_value()[source]

Evaluates the value of the expression

Returns:

value of the expression

Return type:

float

class biogeme.expressions.binary_expressions.Or(left, right)[source]

Bases: BinaryOperator

Logical or

Parameters:
  • left (ExpressionOrNumeric)

  • right (ExpressionOrNumeric)

getValue()[source]

Warning

This function is deprecated. Use get_value() instead.

Kept for backward compatibility

Return type:

float

get_value()[source]

Evaluates the value of the expression

Returns:

value of the expression

Return type:

float

class biogeme.expressions.binary_expressions.Plus(left, right)[source]

Bases: BinaryOperator

Addition expression

Parameters:
  • left (ExpressionOrNumeric)

  • right (ExpressionOrNumeric)

getValue()[source]

Warning

This function is deprecated. Use get_value() instead.

Kept for backward compatibility

Return type:

float

get_value()[source]

Evaluates the value of the expression

Returns:

value of the expression

Return type:

float

class biogeme.expressions.binary_expressions.Power(left, right)[source]

Bases: BinaryOperator

Power expression

Parameters:
  • left (ExpressionOrNumeric)

  • right (ExpressionOrNumeric)

getValue()[source]

Warning

This function is deprecated. Use get_value() instead.

Kept for backward compatibility

Return type:

float

get_value()[source]

Evaluates the value of the expression

Returns:

value of the expression

Return type:

float

class biogeme.expressions.binary_expressions.Times(left, right)[source]

Bases: BinaryOperator

Multiplication expression

Parameters:
  • left (ExpressionOrNumeric)

  • right (ExpressionOrNumeric)

getValue()[source]

Warning

This function is deprecated. Use get_value() instead.

Kept for backward compatibility

Return type:

float

get_value()[source]

Evaluates the value of the expression

Returns:

value of the expression

Return type:

float

class biogeme.expressions.binary_expressions.bioMax(left, right)[source]

Bases: BinaryOperator

Maximum of two expressions

Parameters:
  • left (ExpressionOrNumeric)

  • right (ExpressionOrNumeric)

getValue()[source]

Warning

This function is deprecated. Use get_value() instead.

Kept for backward compatibility

Return type:

float

get_value()[source]

Evaluates the value of the expression

Returns:

value of the expression

Return type:

float

class biogeme.expressions.binary_expressions.bioMin(left, right)[source]

Bases: BinaryOperator

Minimum of two expressions

Parameters:
  • left (ExpressionOrNumeric)

  • right (ExpressionOrNumeric)

getValue()[source]

Warning

This function is deprecated. Use get_value() instead.

Kept for backward compatibility

Return type:

float

get_value()[source]

Evaluates the value of the expression

Returns:

value of the expression

Return type:

float