I have a linear maximization problem with an objective as follows: $$\sum c_i\cdot\text{exp}_i$$ where $c_i$ are constants (positive or negative) and $\text{exp}_i$ are linear expressions of the free variables, which may be positive or negative.
I want to put a floor and ceiling on the exp[i]
in the objective, so that no term may add or subtract more than abs(c[i] * threshold)
to/from the objective value.
It's straight-forward to implement the ceiling for c[i] > 0
and the floor for c[i] < 0
as penalties:
if c[i] > 0:
penalty[i] > exp[i] - threshold
penalty[i] > 0
subtract c[i] * penalty[i] from the objective function
if c[i] < 0:
penalty[i] > threshold - exp[i]
penalty[i] > 0
subtract c[i] * penalty[i] from the objective function
However this method does not work for a floor when c[i] > 0
or for a ceiling when c[i] < 0
because penalty[i]
is not bounded from above.
So I am asking if there is a different "trick" that can be applied here, or can this even be done as a linear problem, or alternately is there heuristic approach etc.