# Solution Technique to Optimize Sets of Constraint Functions with Objective Function that is Heaviside Step Function

I have the following constraint inequalities and equalities:

$$Ax \leq b$$ $$A_{eq}x = b_{eq}$$

The problem is that the objective function, which I am asked to minimized, is defined as

$$f=\sum\limits_{i=1}^{m}u([\sum\limits_{j=1}^{n}k_{ij}x_j]-c_{i})$$

where $u(x)$ is the Heaviside step function.

Strictly speaking, this is not a linear programming problem ( although quite close!), so it can't be attacked by the standard linear programming techniques.

I'm aware that I can approximate the step function into a smooth function, but this is not the route I plan to take now.

What are the techniques that are available for this kind of problem?

-

1
one choice is to replace the step function with a smooth approximation, and then to use some nonlinear solver. – user1709 Jan 8 '11 at 17:28
@Slowsolver, is there another choice? – Graviton Jan 9 '11 at 11:21
The objective should be to minimize $\sum_i u(t_i)$, not $\sum_i t_i$, right? I like Fanfan's approach though I'm not sure if it'll work in this case since if $\sum_j k_{ij} x_j - c_i \leq 0$, then $t_i$ is not necessarily 0 though it needs to be. – user32021 May 23 '12 at 10:52
Strike that. It would still work because of the minimization objective. If the objective were to maximize, then it would not. – user32021 May 23 '12 at 10:57

## 1 Answer

Your problem can be converted in a mixed-integer program in the following way: for each term in the objective function of the form $$u\Bigl(\sum_j k_{ij} x_j - c_i\Bigr) ,$$ introduce an auxiliary binary variable $t_i \in \{0,1\}$ and add the constraint $$\sum_j k_{ij} x_j - c_i \le M t_i$$ where $M$ is a sufficiently large constant (it has to be larger than all possible values for the argument of $u$). You can then replace the objective function by the sum of the binary variables, i.e. minimize $\sum_i t_i$ and check that the constraint ensures that the problem is equivalent to the original one (note that this assumes the convention $u(0)=0$).

Mixed-integer programs are harder to solve than linear programs, but you are guaranteed to find a globally optimal solution exactly.

-
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 10, "mathjax_display_tex": 5, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "github"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "english_confidence": 0.9304323792457581, "perplexity_flag": "head"}