A GLPK problem
Add new columns to problem object
Parameters: | number (int) – the number of columns to add |
---|---|
Returns: | the index of the first column added |
Return type: | int |
Add new columns to problem object
Parameters: | names (tuple of str) – the names of the columns to add, none may exceed 255 bytes encoded as UTF-8 |
---|
Add new rows to problem object
Parameters: | names (tuple of str) – the names of the rows to add, none may exceed 255 bytes encoded as UTF-8 |
---|
Add new rows to problem object
Parameters: | number (int) – the number of rows to add |
---|---|
Returns: | the index of the first row added |
Return type: | int |
Construct advanced initial LP basis
Analyze active bound of non-basic variable
Parameters: | names_preferred (bool) – whether to return row and column names or indices |
---|
Analyze objective coefficient at basic variable
Parameters: | names_preferred (bool) – whether to return row and column names or indices |
---|
Perform backward transformation (solve system B’x = b)
Check feasibility/optimality conditions
Parameters: | names_preferred (bool) – whether to return the row or column name or index |
---|
Clear column of the constraint matrix
Parameters: | col (int or str) – the index or name of the column |
---|
Clear row of the constraint matrix
Parameters: | row (int or str) – the index or name of the row |
---|
Clear the whole constraint matrix
Copy problem object content
Parameters: | |
---|---|
Returns: | the copied problem |
Return type: |
Construct Bixby’s initial LP basis
Delete specified columns from problem object
Parameters: | cols (tuple of int or str) – the indices or the names of the columns |
---|
Delete specified rows from problem object
Parameters: | rows (tuple of int or str) – the indices or names of the rows |
---|
Perform dual ratio test
Parameters: | names_preferred (bool) – whether to return row and column names or indices |
---|
Erase problem object content
Compute column of the simplex tableau
Parameters: | names_preferred (bool) – whether to return row and column names or indices |
---|
Compute row of the simplex tableau
Parameters: | names_preferred (bool) – whether to return row and column names or indices |
---|
Solve LP problem in exact arithmetic
Compute LP basis factorization
Find column by its name
Parameters: | name (str) – the name of the column |
---|---|
Returns: | the column index |
Return type: | int |
Parameters: | col (int or str) – the index or name of the column |
---|---|
Returns: | the column index |
Return type: | int |
Find row by its name
Parameters: | name (str) – the name of the row |
---|---|
Returns: | the row index |
Return type: | int |
Parameters: | row (int or str) – the index or name of the row |
---|---|
Returns: | the row index |
Return type: | int |
Perform forward transformation (solve system B*x = b)
Retrieve LP basis factorization control parameters
Returns: | basis factorization control parameter object |
---|---|
Return type: | FactorizationControls |
Retrieve LP basis header information
Parameters: | names_preferred (bool) – whether to return the row or column name or index |
---|
Retrieve column index in the basis header
Parameters: | col (int or str) – the index or name of the column |
---|---|
Returns: | basis header index |
Return type: | int |
retrieve column dual value (basic solution)
Parameters: | col (int or str) – the index or name of the column |
---|---|
Returns: | the solution value |
Return type: | float |
Retrieve column kind
Parameters: | col (int or str) – the index or name of the column |
---|---|
Returns: | the column kind, either 'continuous', 'integer', or 'binary' |
Return type: | str |
Retrieve column lower bound
Parameters: | col (int or str) – the index or name of the column |
---|---|
Returns: | the lower bound |
Return type: | float |
Retrieve column name
Parameters: | col (int) – the index of the column |
---|---|
Returns: | the problem name |
Return type: | str |
Parameters: | |
---|---|
Returns: | the column name or index |
Return type: |
Retrieve column primal value (basic solution)
Parameters: | col (int or str) – the index or name of the column |
---|---|
Returns: | the solution value |
Return type: | float |
Retrieve column status
Parameters: | col (int or str) – the index or name of the column |
---|---|
Returns: | the column status, either 'basic', 'lower', 'upper', 'free', or 'fixed' |
Return type: | str |
Retrieve column type
Parameters: | col (int or str) – the index or name of the column |
---|---|
Returns: | the column type, either 'free', 'dominating', 'dominated', 'bounded', or 'fixed' |
Return type: | str |
Retrieve column upper bound
Parameters: | col (int or str) – the index or name of the column |
---|---|
Returns: | the upper bound |
Return type: | float |
Retrieve status of dual basic solution
Retrieve column of the constraint matrix
Parameters: | |
---|---|
Returns: | the column |
Rtype coeffs: | Mapping from row names (str strings) to coefficient values (Real) |
Retrieve row of the constraint matrix
Parameters: | |
---|---|
Returns: | the row |
Rtype coeffs: | Mapping from column names (str strings) to coefficient values (Real) |
Retrieve number of binary columns
Returns: | the number of binary columns |
---|---|
Return type: | int |
Retrieve number of integer columns
Returns: | the number of integer columns |
---|---|
Return type: | int |
Retrieve number of constraint coefficients
Returns: | the number of (non-zero) constraint coefficients |
---|---|
Return type: | int |
Retrieve obj. coefficient
Parameters: | col (int or str) – the index or name of the column |
---|---|
Returns: | the coefficient value |
Return type: | float |
Retrieve optimization direction flag
Returns: | the objective direction, either 'minimize' or 'maximize' |
---|---|
Return type: | str |
Retrieve objective value (basic solution)
Returns: | the objective value of the basic solution |
---|---|
Return type: | float |
Retrieve status of primal basic solution
Retrieve row scale factor
Parameters: | row (int or str) – the index or name of the row |
---|---|
Returns: | the scale factor |
Return type: | float |
Retrieve row index in the basis header
Parameters: | row (int or str) – the index or name of the row |
---|---|
Returns: | basis header index |
Return type: | int |
Retrieve row dual value (basic solution)
Parameters: | row (int or str) – the index or name of the row |
---|---|
Returns: | the solution value |
Return type: | float |
Retrieve row lower bound
Parameters: | row (int or str) – the index or name of the row |
---|---|
Returns: | the lower bound |
Return type: | float |
Retrieve row name
Parameters: | row (int) – the index of the row |
---|---|
Returns: | the row name |
Return type: | str |
Parameters: | |
---|---|
Returns: | the row name or index |
Return type: |
Retrieve row or column name
Parameters: | ind (int) – the row/column index |
---|---|
Returns: | a pair, either 'row' or 'col' and the row or column name |
Return type: | (str, str) |
Parameters: | |
---|---|
Returns: | a pair, either 'row' or 'col' and the row or column name |
Return type: |
Retrieve row primal value (basic solution)
Parameters: | row (int or str) – the index or name of the row |
---|---|
Returns: | the solution value |
Return type: | float |
Retrieve row status
Parameters: | row (int or str) – the index or name of the row |
---|---|
Returns: | the row status, either 'basic', 'lower', 'upper', 'free', or 'fixed' |
Return type: | str |
Retrieve row type
Parameters: | row (int or str) – the index or name of the row |
---|---|
Returns: | the row type, either 'free', 'dominating', 'dominated', 'bounded', or 'fixed' |
Return type: | str |
Retrieve row upper bound
Parameters: | row (int or str) – the index or name of the row |
---|---|
Returns: | the upper bound |
Return type: | float |
Retrieve column scale factor
Parameters: | col (int or str) – the index or name of the column |
---|---|
Returns: | the scale factor |
Return type: | float |
Retrieve generic status of basic solution
Determine variable causing unboundedness
Parameters: | names_preferred (bool) – whether to return the row or column name or index |
---|
Solve LP problem with the interior-point method
Solve integer feasibility problem
Solve MIP problem with the branch-and-bound method
Retrieve column dual value (interior point)
Parameters: | col (int or str) – the index or name of the column |
---|---|
Returns: | the solution value |
Return type: | float |
Retrieve column primal value (interior point)
Parameters: | col (int or str) – the index or name of the column |
---|---|
Returns: | the solution value |
Return type: | float |
Retrieve objective value (interior point)
Returns: | the objective value of the interior point solution |
---|---|
Return type: | float |
Retrieve row dual value (interior point)
Parameters: | row (int or str) – the index or name of the row |
---|---|
Returns: | the solution value |
Return type: | float |
Retrieve row primal value (interior point)
Parameters: | row (int or str) – the index or name of the row |
---|---|
Returns: | the solution value |
Return type: | float |
Retrieve status of interior-point solution
Load (replace) the whole constraint matrix
Parameters: | coeffs – Mapping from row and column name (str string) pairs (length-2 tuple) to coefficient values (Real) |
---|
Solve CNF-SAT problem with MiniSat solver
Retrieve column value (MIP solution)
Parameters: | col (int or str) – the index or name of the column |
---|---|
Returns: | the solution value |
Return type: | float |
Retrieve objective value (MIP solution)
Returns: | the objective value of the MIP solution |
---|---|
Return type: | float |
Retrieve row value (MIP solution)
Parameters: | row (int or str) – the index or name of the row |
---|---|
Returns: | the solution value |
Return type: | float |
Retrieve status of MIP solution
Perform primal ratio test
Parameters: | names_preferred (bool) – whether to return row and column names or indices |
---|
Write interior-point solution in printable format
Parameters: | fname (str) – file name |
---|
Print sensitivity analysis report
Parameters: | fname (str) – file name |
---|
Read CNF-SAT problem data in DIMACS format
Parameters: | fname (str) – file name |
---|---|
Returns: | the problem read |
Return type: | Problem |
Read problem data in CPLEX LP format
Parameters: | fname (str) – file name |
---|---|
Returns: | the problem read |
Return type: | Problem |
Read problem data in MPS format
Parameters: | |
---|---|
Returns: | the problem read |
Return type: |
Read problem data in GLPK format
Parameters: | fname (str) – file name |
---|---|
Returns: | the problem read |
Return type: | Problem |
Scale problem data
Parameters: | algorithms – the algorithms to apply, one or more from 'auto', 'skip', 'geometric', 'equilibration', 'round' |
---|
Change LP basis factorization control parameters
Set (change) column bounds
Parameters: |
---|
Set (change) column kind
Parameters: |
---|
Change column name
Parameters: |
---|
Set (change) column status
Parameters: | col (int or str) – the index or name of the column |
---|
Set (replace) column of the constraint matrix
Parameters: |
---|
Set (replace) row of the constraint matrix
Parameters: |
---|
Set (change) obj. coefficient
Parameters: |
---|
Set (change) obj. constant term
Parameters: | coeff (Real) – the coefficient value |
---|
Set (change) optimization direction flag
Parameters: | direction (str) – the objective direction, either 'minimize' or 'maximize' |
---|
Assign (change) objective function name
Parameters: | name (str) – the name of the objective, it may not exceed 255 bytes encoded as UTF-8 |
---|
Assign (change) problem name
Parameters: | name (str) – the name of the problem, it may not exceed 255 bytes encoded as UTF-8 |
---|
Set (change) row scale factor
Parameters: |
---|
Set (change) row bounds
Parameters: |
---|
Change row name
Parameters: |
---|
Set (change) row status
Parameters: | row (int or str) – the index or name of the row |
---|
Set (change) column scale factor
Parameters: |
---|
Solve LP problem with the simplex method
Sort elements of the constraint matrix
Construct standard initial LP basis
Transform explicitly specified column
Parameters: | |
---|---|
Returns: | transformed column |
Return type: | Mapping from row and column names (str strings) to coefficient values (Real) |
Transform explicitly specified row
Parameters: | |
---|---|
Returns: | transformed row |
Return type: | Mapping from row and column names (str strings) to coefficient values (Real) |
Unscale problem data
“Warm up” LP basis
Write CNF-SAT problem data in DIMACS format
Parameters: | fname (str) – file name |
---|
Write problem data in MPS format
Parameters: |
---|