Skip to content

MixedIntegerLinearProgram: New generator method 'variables' #31749

@mkoeppe

Description

@mkoeppe

We modify MixedIntegerLinearProgram.new_variable so that it remembers the variables.

To avoid reintroducing reference loops eliminated in #12616, we modify MIPVariable so that it no longer stores a reference to the MIP but rather to the backend, the base_ring, and the linear_functions_parent.

A new method M.variables() yields all MIPVariable instances that have been created using M.new_variable() in the order of their creation.

Depends on #20656

CC: @yuan-zhou @sagetrac-tmonteil @tscrim

Component: linear programming

Branch: u/mkoeppe/mixedintegerlinearprogram__new_generator_method__variables_

Issue created by migration from https://trac.sagemath.org/ticket/31749

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions