参数列表
(类来自 pyomo.core.kernel.parameter)
- class pyomo.core.kernel.parameter.parameter_list(*args, **kwds)
基础类:
ListContainer用于具有类别类型 IParameter 的对象的列表样式容器
- __init__(*args, **kwds)
方法
__init__(*args, **kwds)activate([shallow])激活此容器。
append(value)S.append(value) -- 将值追加到序列的末尾
child(key)获取与此容器关联的给定存储键的子对象。
children()生成器遍历此容器的子元素。
clear()clone()返回此对象的副本,并将父指针设置为
None。components([active])生成对此容器下存储的所有组件的高效遍历。
count(value)deactivate([shallow])停用此容器。
extend(values)S.extend(iterable) -- 通过从可迭代对象中追加元素来扩展序列
getname([fully_qualified, name_buffer, ...])动态生成此对象的名称。
index(value, [start, [stop]])如果值不存在,则引发ValueError。
insert(i, item)S.insert(index, object) -- 在索引前插入对象
pop([index])如果列表为空或索引超出范围,则引发IndexError。
remove(value)S.remove(value) -- 移除第一次出现的值。
reverse()S.reverse() -- 反转 原地
属性
此对象的活动状态。
对象的类别类型。
对象在其父级上下文中的本地名称。
对象的完全限定名称。
对象的父级(可能为None)。
对象在其父级中的存储键
成员文档
- activate(shallow=True)
激活此容器。
- append(value)
S.append(value) – 将值追加到序列的末尾
- children()
生成器遍历此容器的子元素。
- clear() None -- remove all items from S
- clone()
返回此对象的副本,并将父指针设置为
None。克隆几乎等同于深拷贝,除了遇到的任何分类对象如果不是该对象的后代,将在克隆上引用相同的对象。
- components(active=True)
生成对此容器下存储的所有组件的高效遍历。组件是分类的对象,它们要么是(1)非容器,要么是(2)异构容器。
- Parameters:
active (
True/None) – 控制是否过滤迭代以仅包括存储树的活跃部分。默认值为True。将此关键字设置为None会导致忽略对象的活跃状态。- Returns:
存储树中的组件迭代器
- count(value) integer -- return number of occurrences of value
- deactivate(shallow=True)
停用此容器。
- extend(values)
S.extend(iterable) – 通过从可迭代对象中追加元素来扩展序列
- getname(fully_qualified=False, name_buffer={}, convert=<class 'str'>, relative_to=None)
动态生成此对象的名称。
- index(value[, start[, stop]]) integer -- return first index of value.
如果值不存在,则引发ValueError。
- insert(i, item)
S.insert(index, object) – 在索引前插入对象
- pop([index]) item -- remove and return item at index (default last).
如果列表为空或索引超出范围,则引发IndexError。
- remove(value)
S.remove(value) – 移除第一次出现的值。 如果值不存在,则引发ValueError。
- reverse()
S.reverse() – 原地反转
- property active
此对象的活动状态。
- property ctype
对象的类别类型。
- property local_name
对象在其父级上下文中的本地名称。是 obj.getname(fully_qualified=False)的别名。
- property name
对象的完全限定名称。obj.getname(fully_qualified=True)的别名。
- property parent
对象的父级(可能为None)。
- property storage_key
对象在其父级中的存储键