Simplex method Modules

Compute simplex method functions

simplex_networks.create_matrix(variables, …)

Creates a matrix with enough rows for each constraint plus the objective function and enough columns for all the variables.

simplex_networks.pivots_col(matrix)

Checks to see if pivots are required due to negative values in right column, excluding the bottom value.

simplex_networks.pivots_row(matrix)

Checks to see if pivots are required due to negative values in bottom row, excluding the final value.

simplex_networks.find_negative_col(matrix)

Finds location of negative values in right column.

simplex_networks.find_negative_row(matrix)

Finds location of negative values in bottom row.

simplex_networks.find_pivot_col(matrix)

Finds pivot element corresponding to a negative value in right column.

simplex_networks.find_pivot_row(matrix)

Finds pivot element corresponding to a negative value in bottom row.

simplex_networks.pivot(row, col, matrix)

Pivot about a value to remove negative in final column or row.

problem_definition.add_cons(matrix)

Checks if 1 extra constraint can be added to the matrix, this means that there are at least two rows of all 0 elements.

problem_definition.constrain(matrix, eq[, …])

Adds constraints to the problem.

problem_definition.add_obj(matrix)

Verifies if the objective function can be added.

problem_definition.obj(matrix, eq[, memory_prof])

Adds the objective function to the problem matrix.

problem_definition.maxz(matrix[, aux])

Creates maximization function.

problem_definition.convert_min(matrix)

This function multiplies by -1 the objective function for maximization problems.

problem_definition.minz(matrix)

Creates minimization function.

problem_definition.convert(eq)

Converts equation into a list containing the coefficients of the equation.