I have a linear optimization problem with integer variables of the form
minimize $a_1 x_1 + ... + a_n x_n$
under a set of constraints
- Bounds for each variable $a_i \le constant_i$
- Bounds for groups $ a_{j1} + ... + a_{jk} \le constant_j$
Which R package lpSolve solves nicely even though its quite large.
But now I realized I need to add a constant cost term to the cost-function for each $x_i$ which is non zero.
Question: Is there a trick to minimize a cost-function with terms of the form $a_1 x_1 + f(a_1) + ... + a_n x_n + f(a_n)$ where
$f(x)={0.1 \text{ if } x>0\text{, and }0\text{ otherwise}} $
as if it were truely linear?