Skip to content

Functions

Simone Mosco edited this page Feb 21, 2022 · 1 revision

It is possible to perform various operations on the model, associated with a (Integer) Linear Programming Problem. All of them apply changes on the attributes of the model, including the tableau, that is modified whenever a simplex or solver function is invoked.

pivot_operation(t, h)

Perform the pivot operation on the element in cell (t, h) where t represent the row, h the column.

Parameters:

  • t: integer value, greater than 0, which represent the row
  • h: integer value, greater than 0, which represent the column

gomory_cut(verbose)

Apply the Gomory's cut on the first integer basic variables in the current tableau. Add a new row to the tableau, representing the new variable.

Parameters:

  • verbose: an integer value to print information during the operations. Default is 0, 1 to print tableau and informations about the row on which gomory is applied

primal_simplex_method(verbose)

Solve the problem associated with the tableau in the model, using the primal simplex method. It finds an optimal solution if exists, otherwise update the unbounded attribute to True.

Parameters:

  • verbose: an integer value to print information during the operations. Default is 0, 1 to print tableau, 2 for other informations

dual_simplex_method(verbose)

Solve the problem associated with the tableau in the model, using the dual simplex method. It finds out an optimal solution if exists, otherwise update the infeasible attribute to True.

Parameters:

  • verbose: an integer value to print information during the operations. Default is 0, 1 to print tableau, 2 for other informations

solve(verbose)

The general function for solving the model associated with a tableau. It performs whatever method is necessary in order to get the optimal solution, if exists, otherwise it update the attributes unbounded or infeasible. The method included in this function are the following:

  • Primal simplex
  • Dual simplex
  • Gomory's cut

Parameters:

  • verbose: an integer value to print information during the operations. Default is 0, 1 to print tableau, 2 for other informations
Clone this wiki locally