pybnb.pyomo.misc¶
Miscellaneous utilities used for development.
Copyright by Gabriel A. Hackebeil (gabe.hackebeil@gmail.com).
- pybnb.pyomo.misc.hash_joblist(jobs)[source]¶
Create a hash of a Python list by casting each entry to a string.
- pybnb.pyomo.misc.add_tmp_component(model, name, obj)[source]¶
Add a temporary component to a model, adjusting the name as needed to make sure it is unique.
- pybnb.pyomo.misc.correct_integer_lb(lb, integer_tolerance)[source]¶
Converts a lower bound for an integer optimization variable to an integer equal to ceil(ub), taking care not to move a non-integer bound away from an integer point already within a given tolerance.
- pybnb.pyomo.misc.correct_integer_ub(ub, integer_tolerance)[source]¶
Converts an upper bound for an integer optimization variable to an integer equal to floor(ub), taking care not to move a non-integer bound away from an integer point already within a given tolerance.