Opened 11 years ago

Closed 11 years ago

#12332 closed defect (fixed)

MixedIntegerLinearProgram().new_variable docs don't mention nonnegativity

Reported by: Dima Pasechnik Owned by: Minh Van Nguyen
Priority: major Milestone: sage-5.0
Component: documentation Keywords:
Cc: Nathann Cohen, Punarbasu Purkayastha Merged in: sage-5.0.beta2
Authors: Punarbasu Purkayastha Reviewers: Dmitrii Pasechnik
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description (last modified by Keshav Kini)

the documentation on MixedIntegerLinearProgram?().new_variable does not mention that by default the corresponding variables are assumed to be nonnegative.

The only place this is mentioned is LP Thematic Tutorial. It says: "By default, all the LP variables are assumed to be non-negative reals. They can be defined as binary through the parameter binary=True (or integer with integer=True). Lower and upper bounds can be defined or re-defined (for instance when you want some variables to be negative) using the methods set_min and set_max."

This must appear in regular docs, too.


Apply trac_12332.2.patch

Attachments (2)

trac_12332.patch (920 bytes) - added by Dima Pasechnik 11 years ago.
patch adding the missing info
trac_12332.2.patch (2.1 KB) - added by Punarbasu Purkayastha 11 years ago.
add more docs (update: kill self)

Download all attachments as: .zip

Change History (13)

Changed 11 years ago by Dima Pasechnik

Attachment: trac_12332.patch added

patch adding the missing info

comment:1 Changed 11 years ago by Dima Pasechnik

Status: newneeds_review

comment:2 Changed 11 years ago by Dima Pasechnik

Description: modified (diff)

comment:3 Changed 11 years ago by Punarbasu Purkayastha

added some stuff to the patch a bit. New patch is trac_12332.2.patch

comment:4 in reply to:  3 ; Changed 11 years ago by Dima Pasechnik

Replying to ppurka:

added some stuff to the patch a bit. New patch is trac_12332.2.patch

it's still quite inconsistent, the use of self and ``MixedIntegerLinearProgram`` in docstrings. There does not seem any logic behind these different uses, at least not to me.

Shouldn't we consistently write self there?

comment:5 Changed 11 years ago by Keshav Kini

Description: modified (diff)

ppurka: Jeroen mentioned to me on #11313 that we now don't want the trac ticket number in the commit message. For future reference...

comment:6 in reply to:  4 ; Changed 11 years ago by Punarbasu Purkayastha

Replying to dimpase:

Replying to ppurka:

added some stuff to the patch a bit. New patch is trac_12332.2.patch

it's still quite inconsistent, the use of self and ``MixedIntegerLinearProgram`` in docstrings. There does not seem any logic behind these different uses, at least not to me.

Shouldn't we consistently write self there?

Actually, I think we should not write {{self}} at all. It should be explicitly written what function or class it is.

@kini: Thanks for the info.

comment:7 in reply to:  6 ; Changed 11 years ago by Dima Pasechnik

Replying to ppurka:

Replying to dimpase:

Replying to ppurka:

added some stuff to the patch a bit. New patch is trac_12332.2.patch

it's still quite inconsistent, the use of self and ``MixedIntegerLinearProgram`` in docstrings. There does not seem any logic behind these different uses, at least not to me.

Shouldn't we consistently write self there?

Actually, I think we should not write {{self}} at all. It should be explicitly written what function or class it is.

well, if so, then we should make the docstings consistent in the whole file...

Changed 11 years ago by Punarbasu Purkayastha

Attachment: trac_12332.2.patch added

add more docs (update: kill self)

comment:8 in reply to:  7 Changed 11 years ago by Punarbasu Purkayastha

Replying to dimpase:

well, if so, then we should make the docstings consistent in the whole file...

Done & Done Inc.

comment:9 Changed 11 years ago by Dima Pasechnik

Authors: ppurka
Reviewers: dimpase
Status: needs_reviewpositive_review

comment:10 Changed 11 years ago by Keshav Kini

Authors: ppurkaPunarbasu Purkayastha
Reviewers: dimpaseDmitrii Pasechnik

comment:11 Changed 11 years ago by Jeroen Demeyer

Merged in: sage-5.0.beta2
Resolution: fixed
Status: positive_reviewclosed
Note: See TracTickets for help on using tickets.