Gnm.SolverConstraint

Fields

Name

Type

Access

Description

lhs

Gnm.DepManaged

r/w

rhs

Gnm.DepManaged

r/w

type

Gnm.SolverConstraintType

r/w

Methods

class

new (sheet)

as_str (sheet)

dup (sheet)

equal (b)

free ()

get_lhs ()

get_part (sp, i)

get_rhs ()

has_rhs ()

part_as_str (i, sp)

set_lhs (v)

set_old (type, lhs_col, lhs_row, rhs_col, rhs_row, cols, rows)

set_rhs (v)

side_as_str (sheet, buf, lhs)

valid (sp)

Details

class Gnm.SolverConstraint
classmethod new(sheet)
Parameters:

sheet (Gnm.Sheet) –

Return type:

Gnm.SolverConstraint

as_str(sheet)
Parameters:

sheet (Gnm.Sheet) –

Return type:

str

dup(sheet)
Parameters:

sheet (Gnm.Sheet) –

Return type:

Gnm.SolverConstraint

equal(b)
Parameters:

b (Gnm.SolverConstraint) –

Return type:

bool

free()
get_lhs()
Returns:

Get left-hand side of constraint self.

Return type:

Gnm.Value or None

get_part(sp, i)
Parameters:
Returns:

True if the i'th part exists.

lhs:

Gnm.Cell of left-hand side

cl:

constant GOffice.value of left-hand side

rhs:

Gnm.Cell of right-hand side

cr:

constant GOffice.value of left-hand side

Return type:

(bool, lhs: Gnm.Cell, cl: float, rhs: Gnm.Cell, cr: float)

This splits self into parts and returns information about the i'th part. There will be multiple parts when the left-hand side is a cell range.

get_rhs()
Returns:

Get right-hand side of constraint self.

Return type:

Gnm.Value or None

has_rhs()
Return type:

bool

part_as_str(i, sp)
Parameters:
Return type:

str

set_lhs(v)
Parameters:

v (Gnm.Value or None) – new left-hand side

set_old(type, lhs_col, lhs_row, rhs_col, rhs_row, cols, rows)
Parameters:
set_rhs(v)
Parameters:

v (Gnm.Value or None) – new right-hand side

side_as_str(sheet, buf, lhs)
Parameters:
valid(sp)
Parameters:

sp (Gnm.SolverParameters) –

Return type:

bool