Skip to content

MIP backends: Make variable type consistent between add_variable, set_variable_type (with deprecation) #20362

@mkoeppe

Description

@mkoeppe

Status quo:

Proposal (from #20354 discussion):

  • add_variable there should take a variable_type parameter, defaulting to 'continuous', with other possible values 'binary', 'integer'.
  • possibly deprecate the 3 switches
  • set_variable_type should take the same variable_type values 'continuous', 'binary', 'integer'.
  • definitely deprecate values 1, 0, -1.

There are similar idiosyncrasies elsewhere in the backend interface (should be made separate tickets)

  • Minimization is expressed as maximization=False in the constructor; as set_sense(-1); is queried by is_maximization
  • ...

CC: @dimpase @videlec @jdemeyer

Component: numerical

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

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