Problems

class ecyglpki.Problem

A GLPK problem

add_cols(int number)

Add new columns to problem object

add_named_cols(*names)

Add new columns to problem object

Parameters:names – the names (str strings) of the columns to add
add_named_rows(*names)

Add new rows to problem object

Parameters:names – the names (str strings) of the rows to add
add_rows(int number)

Add new rows to problem object

adv_basis()

Construct advanced initial LP basis

analyze_bound(ind, names_preferred=False)

Analyze active bound of non-basic variable

analyze_coef(ind, names_preferred=False)

Analyze objective coefficient at basic variable

bf_exists()

Check if LP basis factorization exists

bf_updated()

Check if LP basis factorization has been updated

btran(tuple rhs)

Perform backward transformation (solve system B’x = b)

check_cnfsat()

Check for CNF-SAT problem instance

check_kkt(str solver, str condition, bool dual=False, names_preferred=False)

Check feasibility/optimality conditions

clear_mat_col(col)

Clear column of the constraint matrix

clear_mat_row(row)

Clear row of the constraint matrix

clear_matrix()

Clear the whole constraint matrix

copy_prob(Problem source, bool copy_names)

Copy problem object content

cpx_basis()

Construct Bixby’s initial LP basis

del_cols(*cols)

Delete specified columns from problem object

Parameters:names – the names (str strings) of the columns to delete
del_rows(*rows)

Delete specified rows from problem object

Parameters:names – the names (str strings) of the rows to delete
dual_rtest(coeffs, int direction, double eps, names_preferred=False)

Perform dual ratio test

erase_prob()

Erase problem object content

eval_tab_col(ind, names_preferred=False)

Compute column of the simplex tableau

eval_tab_row(ind, names_preferred=False)

Compute row of the simplex tableau

exact(SimplexControls controls)

Solve LP problem in exact arithmetic

factorize()

Compute LP basis factorization

find_col(str name)

Find column by its name

find_col_as_needed(col)
find_row(str name)

Find row by its name

find_row_as_needed(row)
find_row_or_col_as_needed(ind)
ftran(tuple rhs)

Perform forward transformation (solve system B*x = b)

get_bfcp()

Retrieve LP basis factorization control parameters

get_bhead(int k, names_preferred=False)

Retrieve LP basis header information

get_col_bind(col)

Retrieve column index in the basis header

get_col_dual(col)

retrieve column dual value (basic solution)

get_col_kind(col)

Retrieve column kind; returns varkind

get_col_lb(col)

Retrieve column lower bound

get_col_name(int col)

Retrieve column name

get_col_name_if(int col, names_preferred=False)
get_col_prim(col)

Retrieve column primal value (basic solution)

get_col_stat(col)

Retrieve column status

get_col_type(col)

Retrieve column type

get_col_ub(col)

Retrieve column upper bound

get_dual_stat()

Retrieve status of dual basic solution

get_mat_col(col, names_preferred=False)

Retrieve column of the constraint matrix

get_mat_row(row, names_preferred=False)

Retrieve row of the constraint matrix

get_num_bin()

Retrieve number of binary columns

get_num_cols()

Retrieve number of columns

get_num_int()

Retrieve number of integer columns

get_num_nz()

Retrieve number of constraint coefficients

get_num_rows()

Retrieve number of rows

get_obj_coef(col)

Retrieve obj. coefficient

get_obj_const()

Retrieve obj. constant term

get_obj_dir()

Retrieve optimization direction flag

get_obj_name()

Retrieve objective function name

get_obj_val()

Retrieve objective value (basic solution)

get_prim_stat()

Retrieve status of primal basic solution

get_prob_name()

Retrieve problem name

get_rii(row)

Retrieve row scale factor

get_row_bind(row)

Retrieve row index in the basis header

get_row_dual(row)

Retrieve row dual value (basic solution)

get_row_lb(row)

Retrieve row lower bound

get_row_name(int row)

Retrieve row name

get_row_name_if(int row, names_preferred=False)
get_row_or_col_name(int ind)

Retrieve row or column name

get_row_or_col_name_if(int ind, names_preferred=False)
get_row_prim(row)

Retrieve row primal value (basic solution)

get_row_stat(row)

Retrieve row status

get_row_type(row)

Retrieve row type

get_row_ub(row)

Retrieve row upper bound

get_sjj(col)

Retrieve column scale factor

get_status()

Retrieve generic status of basic solution

get_unbnd_ray(names_preferred=False)

Determine variable causing unboundedness

interior(IPointControls controls)

Solve LP problem with the interior-point method

intfeas1(bool use_bound, int obj_bound)

Solve integer feasibility problem

intopt(IntOptControls controls)

Solve MIP problem with the branch-and-bound method

ipt_col_dual(col)

Retrieve column dual value (interior point)

ipt_col_prim(col)

Retrieve column primal value (interior point)

ipt_obj_val()

Retrieve objective value (interior point)

ipt_row_dual(row)

Retrieve row dual value (interior point)

ipt_row_prim(row)

Retrieve row primal value (interior point)

ipt_status()

Retrieve status of interior-point solution

load_matrix(coeffs)

Load (replace) the whole constraint matrix

Parameters:coeffsMapping from row and column name (str string) pairs (length-2 tuple) to coefficient values (Real).
minisat1()

Solve CNF-SAT problem with MiniSat solver

mip_col_val(col)

Retrieve column value (MIP solution)

mip_obj_val()

Retrieve objective value (MIP solution)

mip_row_val(row)

Retrieve row value (MIP solution)

mip_status()

Retrieve status of MIP solution

prim_rtest(coeffs, int direction, double eps, names_preferred=False)

Perform primal ratio test

print_ipt(str fname)

Write interior-point solution in printable format

print_mip(str fname)

Write MIP solution in printable format

print_ranges(row_or_cols, str fname)

Print sensitivity analysis report

print_sol(str fname)

Write basic solution in printable format

read_cnfsat(str fname)

Read CNF-SAT problem data in DIMACS format

read_ipt(str fname)

Read interior-point solution from text file

read_lp(str fname)

Read problem data in CPLEX LP format

read_mip(str fname)

Read MIP solution from text file

read_mps(str format, str fname)

Read problem data in MPS format

read_prob(str fname)

Read problem data in GLPK format

read_sol(str fname)

Read basic solution from text file

scale_prob(*algorithms)

Scale problem data

Parameters:algorithms – the algorithms to apply, one or more from 'auto', 'skip', 'geometric', 'equilibration', 'round'
set_bfcp(FactorizationControls controls)

Change LP basis factorization control parameters

set_col_bnds(col, lower, upper)

Set (change) column bounds

set_col_kind(col, str kind)

Set (change) column kind

set_col_name(col, str name)

Change column name

set_col_stat(col, str status)

Set (change) column status

set_mat_col(col, coeffs)

Set (replace) column of the constraint matrix

Parameters:coeffsMapping from row names (str strings) to coefficient values (Real).
set_mat_row(row, coeffs)

Set (replace) row of the constraint matrix

Parameters:coeffsMapping from column names (str strings) to coefficient values (Real).
set_obj_coef(col, double coeff)

Set (change) obj. coefficient

set_obj_const(double coeff)

Set (change) obj. constant term

set_obj_dir(str direction)

Set (change) optimization direction flag

set_obj_name(str name)

Assign (change) objective function name

set_prob_name(str name)

Assign (change) problem name

set_rii(row, double sf)

Set (change) row scale factor

set_row_bnds(row, lower, upper)

Set (change) row bounds

set_row_name(row, str name)

Change row name

set_row_stat(row, str status)

Set (change) row status

set_sjj(col, double sf)

Set (change) column scale factor

simplex(SimplexControls controls)

Solve LP problem with the simplex method

sort_matrix()

Sort elements of the constraint matrix

std_basis()

Construct standard initial LP basis

transform_col(coeffs, names_preferred=False)

Transform explicitly specified column

transform_row(coeffs, names_preferred=False)

Transform explicitly specified row

unscale_prob()

Unscale problem data

warm_up()

“Warm up” LP basis

write_cnfsat(str fname)

Write CNF-SAT problem data in DIMACS format

write_ipt(str fname)

Write interior-point solution to text file

write_lp(str fname)

Write problem data in CPLEX LP format

write_mip(str fname)

Write MIP solution to text file

write_mps(str format, str fname)

Write problem data in MPS format

write_prob(str fname)

Write problem data in GLPK format

write_sol(str fname)

Write basic solution to text file

Previous topic

Welcome to ecyglpki’s documentation!

Next topic

Simplex Controls

This Page