-
-
Notifications
You must be signed in to change notification settings - Fork 655
Open
Description
Status quo:
- add_variable uses 3 logical switches
binary=False, continuous=False, integer=False
(see MIP backends: Unify add_col, add_variable; and clarify defaulting behavior of binary, continuous, integer #20324 regarding their defaulting behavior) - this matches the methods
is_variable_continuous
etc. set_variable_type
expresses the same thing using values 1, 0, -1.
Proposal (from #20354 discussion):
add_variable
there should take avariable_type
parameter, defaulting to'continuous'
, with other possible values'binary'
,'integer'
.- possibly deprecate the 3 switches
set_variable_type
should take the samevariable_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; asset_sense(-1)
; is queried byis_maximization
- ...
CC: @dimpase @videlec @jdemeyer
Component: numerical
Issue created by migration from https://trac.sagemath.org/ticket/20362