数值类型

模块属性

nonpyomo_leaf_types

Python 集合用于识别数字常量、布尔值、字符串和 NonNumericValue 的实例,这通常用于遍历 Pyomo 表达式树的代码中。

native_numeric_types

用于识别数字常量的Python集合。

native_types

Python 集合用于识别数字常量及相关原生类型。

Functions

RegisterBooleanType(new_type)

已弃用。

RegisterComplexType(new_type)

将指定类型注册为“复杂类型”。

RegisterIntegerType(new_type)

将指定类型注册为“整数类型”。

RegisterLogicalType(new_type)

将指定类型注册为“逻辑类型”。

RegisterNumericType(new_type)

将指定类型注册为“数值类型”。

check_if_logical_type(obj)

测试参数是否表现得像一个逻辑类型。

check_if_native_type(obj)

check_if_numeric_type(obj)

测试参数是否表现得像数值类型。

value(obj[, exception])

一个实用函数,返回Pyomo对象或表达式的值。