I have the following objective function:
$\sum_{n}(1-prob_{n})(1+x_n)$
Where $x$ is my decision variable. $prob_{n}$ is a piecewise function that can look like:
$prob_{n} = $
\begin{cases} 0.5, & x_n \leq 4 \\ 0.05, & x_n > 4 \end{cases}
The other constraints are:
$\sum_{n}(1-prob_{n}) > k, k \in R^{+}$
Seeing as $prob_n$ depends on the decision variable, does this mean that the objective function is no longer linear? I 'linearized' it using Big-M notation but when I try to solve it using glpk, I get an error saying that the objective is non-linear. The only reason I can think of is the one stated above or I have misspecified something in my code.
I am a little confused because I am not multiplying the decision variable (i.e. there is no $x^2$ term). So I don't see what type of non-linear problem this is.