备选方案设计
原能力
列出维持、试行、调整和推进等可讨论方案,为每个方案记录前提。(细化版 p.8–9)
首选项目
Pyomo(BSD-3-Clause 上游标注)。 Pyomo
匹配范围
参数化生成受约束方案和非支配解。
源码
Pyomo · class Constraint(
pyomo/core/base/constraint.py · 563–576 行。 在 GitHub 查看源码 · 许可证与声明
源码片段
class Constraint(ActiveIndexedComponent):
"""
This modeling component defines a constraint expression using a
rule function.
Constructor arguments:
expr
A Pyomo expression for this constraint
rule
A function that is used to construct constraint expressions
name
A name for this component
doc
A text string describing this component
- # Copyright (c) 2008-2026 National Technology and Engineering Solutions of Sandia, LLC
Platypus · class ParetoDominance
platypus/core.py · 780–793 行。 在 GitHub 查看源码 · 许可证与声明
源码片段
class ParetoDominance(Dominance):
"""Pareto dominance with constraints.
If either solution violates constraints, then the solution with a smaller
constraint violation is preferred. If both solutions are feasible, then
Pareto dominance is used to select the preferred solution.
"""
def __init__(self):
super().__init__()
def compare(self, solution1, solution2):
problem = solution1.problem
- # Copyright 2015-2024 David Hadka
实现与验收要点
形成真正不同的策略路径并确定偏好、资源及行动集合。