Quickguide PIECE-WISE LINEAR Problem
This page is part of the Quickguide Manual. See Quickguide. |
The general formulation in TOMLAB for a piece-wise linear programming problem is:
Failed to parse (unknown function "\MATHSET"): {\displaystyle \begin{array}{ll} \min\limits_{x} & f(x) = \frac{1}{2} x^T F x + c^T x \\ & \\ s/t & \begin{array}{lcccl} x_{L} & \leq & x & \leq & x_{U}, \\ b_{L} & \leq & A x & \leq & b_{U}, ~x_{j} \in \MATHSET{N}\ ~~\forall j \in $I$ \\\end{array}\end{array} }
where Failed to parse (SVG with PNG fallback (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle c, x, x_L, x_U \in \MATHSET{R}^n} , Failed to parse (unknown function "\MATHSET"): {\displaystyle A \in \MATHSET{R}^{m_1 \times n}} , and Failed to parse (unknown function "\MATHSET"): {\displaystyle b_L,b_U \in \MATHSET{R}^{m_1}} . The variables , the index subset of are restricted to be integers. Equality constraints are defined by setting the lower bound equal to the upper bound, i.e. for constraint : . A subset of the variables are piece-wise linear.
Solving piece-wise linear problem is mainly recommended by using TOMLAB /CPLEX or similar solver.
The following file defines a test case in TOMLAB. It is possible to use two syntax variations when defining the problem (see help addPwLinFunc for more information).
File: tomlab/quickguide/piecewiseQG.m
Open the file for viewing, and execute piecewiseQG in Matlab.