(class from pyomo.contrib.solver.solvers.knitro.utils)
pyomo.contrib.solver.solvers.knitro.utils
Bases: object
object
Intermediate representation of a Pyomo model for KNITRO.
Collects all active objectives, constraints, and referenced variables from a Pyomo Block. This class is used to extract and organize model data before passing it to the solver.
list of active objectives.
list[ObjectiveData]
list of active constraints.
list[ConstraintData]
list of all referenced variables.
list[VarData]
Initialize a Problem instance.
block (BlockData | None) – Pyomo block to initialize from. If None, creates an empty problem that can be populated later.
Methods
__init__([block])
__init__
add_block(block)
add_block
Add objectives, constraints, and variables from a block to the problem.
clear()
clear
Clear all objectives, constraints, and variables from the problem.
set_block(block)
set_block
Replace the current problem data with data from a new block.
Attributes
objs
cons
variables
Member Documentation
block (BlockData) – The Pyomo block to extract data from.