UFFLP
UFFLP - An easy API for Mixed, Integer and Linear Programming.
UFFLP has been developed by Prof. Artur Alves Pessoa to be used in Modeling and Integer Programming courses given by Prof. Eduardo Uchoa Barboza as well as in Master’s Dissertations and Doctorate Thesis advised by both.
Nowadays, UFFLP is maintained by Gapso
The UFFLP also has a discussion forum which can be accessed on the link http://ufflp.gapso.com.br/
Introduction
Linear programming (LP, or linear optimization) is a mathematical method for determining a way to achieve the best outcome (such as maximum profit or lowest cost) in a given mathematical model for some list of requirements represented as linear relationships. Linear programming is a specific case of mathematical programming (mathematical optimization). More formally, linear programming is a technique for the optimization of a linear objective function, subject to linear equality and linear inequality constraints. Its feasible region is a convex polyhedron, which is a set defined as the intersection of finitely many half spaces, each of which is defined by a linear inequality. Its objective function is a real-valued affine function defined on this polyhedron. A linear programming algorithm finds a point in the polyhedron where this function has the smallest (or largest) value if such a point exists. Linear programs are problems that can be expressed in canonical form:
maximize cTx |
|
subject to |
Ax = b |
where x represents the vector of variables (to be determined), c and b are vectors of (known) coefficients, A is a (known) matrix of coefficients, and (.)T is the matrix transpose. The expression to be maximized or minimized is called the objective function (cTx in this case). The inequalities Ax = b are the constraints which specify a convex polytope over which the objective function is to be optimized. In this context, two vectors are comparable when they have the same dimensions. If every entry in the first is less-than or equal-to the corresponding entry in the second then we can say the first vector is less-than or equal-to the second vector. Linear programming can be applied to various fields of study. It is used in business and economics, but can also be utilized for some engineering problems. Industries that use linear programming models include transportation, energy, telecommunications, and manufacturing. It has proved useful in modeling diverse types of problems in planning, routing, scheduling, assignment, and design.
Uses
Linear programming is a considerable field of optimization for several reasons. Many practical problems in operations research can be expressed as linear programming problems. Certain special cases of linear programming, such as network flow problems and multicommodity flow problems are considered important enough to have generated much research on specialized algorithms for their solution. A number of algorithms for other types of optimization problems work by solving LP problems as sub-problems. Historically, ideas from linear programming have inspired many of the central concepts of optimization theory, such as duality, decomposition, and the importance of convexity and its generalizations. Likewise, linear programming is heavily used in microeconomics and company management, such as planning, production, transportation, technology and other issues. Although the modern management issues are ever-changing, most companies would like to maximize profits or minimize costs with limited resources. Therefore, many issues can be characterized as linear programming problems.
Standard form
Standard form is the usual and most intuitive form of describing a linear programming problem. It consists of the following three parts:
- A linear function to be maximized:
f(x1,x2) = c1x1 + c2x2 |
|
- Problem constraints of the following form:
a1, 1x1 + a1, 2x2 = b1 |
|
a2, 1x1 + a2, 2x2 = b2 |
|
a3, 1x1 + a3, 2x2 = b3 |
|
- Non-negative variables:
x1 = 0 |
|
x2 = 0 |
|
Getting Started
Variable Types
- Continuous,
- Integer,
- Binary,
- SemiContinuous.
The SemiContinuous variable type is not supported by the COIN/Cbc solver. To make an application portable, one has to check for the UFFLP error "UnknownVarType" whenever creating a SemiContinuous variable and to replace such variable by both a continuous and a binary variable in the case.
Constraint Types
These are the types of constraints supported by UFFLP:
- Less,
- Equal,
- Greater.
Objective Function Senses
- Minimize,
- Maximize.
Error codes
Common errors are tabulated as follows: Code Error Description
Code |
Error |
Description |
|---|---|---|
0 |
UFFLP_Ok |
no error |
1 |
UFFLP_VarNameExists |
variable name already exists |
2 |
UFFLP_ConsNameExists |
constraint name already exists |
3 |
UFFLP_VarNameNotFound |
variable name not found |
4 |
UFFLP_ConsNameNotFound |
constraint name not found |
5 |
UFFLP_UnableOpenFile |
unable to open file for writing |
6 |
UFFLP_NotInCallback |
operation is allowed only inside a callback |
7 |
UFFLP_NotInHeuristic |
operation is allowed only inside a heuristic |
8 |
UFFLP_InvalidParameter |
unknown parameter or invalid parameter value |
9 |
UFFLP_InCallback |
operation is not allowed inside a callback |
10 |
UFFLP_NoDualVariables |
problems with integer variables have no dual |
11 |
UFFLP_CoeffExists |
variable-constraint coefficient already exists |
12 |
UFFLP_InfeasibleSol |
infeasible solution provided by heuristic |
13 |
UFFLP_InvalParamType |
the parameter type does not exits |
14 |
UFFLP_InNonCutCallback |
operation in a callback is allowed only for cuts |
15 |
UFFLP_NotInIntCheck |
operation is allowed only in an integer check |
16 |
UFFLP_NoSolExists |
the current problem has no solution |
17 |
UFFLP_UnknownVarType |
trying to add a variable of unknown type |
Forum
UFFLP has a discussion forum which can be accessed through the following link: http://ufflp.gapso.com.br/