Skip to main content
added 113 characters in body
Source Link

Crossposted on Operations Research SE.


I am working on an optimization problem where some of the terms of the objective function to maximize are expressed as a piecewise linear function of variables:

$$ z = \begin{cases} c^- x, & x \leq 0 \\ c^+ x, & x > 0 \\ \end{cases} $$

as depicted below

objective function plot

When I have $c^- \geq c^+$, I can solve the problem by adding a new variable $x'$, and two constraints:

  • $x' \leq c^- \times x $
  • $x' \leq c^+ \times x $

But what do I do when $c^- < c^+$ ? I don't think there is a way to express the problem as a linear programming problem in that case, is there ?

I have heard about SOS constraints. Are they the canonical way to solve this kind of problem ? If my problem contains many such piecewise linear functions, is it reasonable to expect a free solver from being able to solve such a problem with thousands of SOS1 constraints ?

Example

$$\begin{array}{ll} \text{maximize} & a \max(x,0) + b \min(x,0) + c \max(y,0) + d \min(y,0)\\ \text{subject to} & x,y \in [−1,1]\end{array}$$

I am working on an optimization problem where some of the terms of the objective function to maximize are expressed as a piecewise linear function of variables:

$$ z = \begin{cases} c^- x, & x \leq 0 \\ c^+ x, & x > 0 \\ \end{cases} $$

as depicted below

objective function plot

When I have $c^- \geq c^+$, I can solve the problem by adding a new variable $x'$, and two constraints:

  • $x' \leq c^- \times x $
  • $x' \leq c^+ \times x $

But what do I do when $c^- < c^+$ ? I don't think there is a way to express the problem as a linear programming problem in that case, is there ?

I have heard about SOS constraints. Are they the canonical way to solve this kind of problem ? If my problem contains many such piecewise linear functions, is it reasonable to expect a free solver from being able to solve such a problem with thousands of SOS1 constraints ?

Example

$$\begin{array}{ll} \text{maximize} & a \max(x,0) + b \min(x,0) + c \max(y,0) + d \min(y,0)\\ \text{subject to} & x,y \in [−1,1]\end{array}$$

Crossposted on Operations Research SE.


I am working on an optimization problem where some of the terms of the objective function to maximize are expressed as a piecewise linear function of variables:

$$ z = \begin{cases} c^- x, & x \leq 0 \\ c^+ x, & x > 0 \\ \end{cases} $$

as depicted below

objective function plot

When I have $c^- \geq c^+$, I can solve the problem by adding a new variable $x'$, and two constraints:

  • $x' \leq c^- \times x $
  • $x' \leq c^+ \times x $

But what do I do when $c^- < c^+$ ? I don't think there is a way to express the problem as a linear programming problem in that case, is there ?

I have heard about SOS constraints. Are they the canonical way to solve this kind of problem ? If my problem contains many such piecewise linear functions, is it reasonable to expect a free solver from being able to solve such a problem with thousands of SOS1 constraints ?

Example

$$\begin{array}{ll} \text{maximize} & a \max(x,0) + b \min(x,0) + c \max(y,0) + d \min(y,0)\\ \text{subject to} & x,y \in [−1,1]\end{array}$$

added 40 characters in body
Source Link

I am working on an optimization problem where some of the terms of the objective function to maximize are expressed as a piecewise linear function of variables:

$$ z = \begin{cases} c^- x, & x \leq 0 \\ c^+ x, & x > 0 \\ \end{cases} $$

as depicted below

objective function plot

When I have $c^- \geq c^+$, I can solve the problem by adding a new variable $x'$, and two constraints:

  • $x' \leq c^- \times x $
  • $x' \leq c^+ \times x $

But what do I do when $c^- < c^+$ ? I don't think there is a way to express the problem as a linear programming problem in that case, is there ?

I have heard about SOS constraints. Are they the canonical way to solve this kind of problem ? If my problem contains many such piecewise linear functions, is it reasonable to expect a free solver from being able to solve such a problem with thousands of SOS1 constraints ?

Example

maximize $$𝑎.\max(𝑥,0)+𝑏.\min(𝑥,0)+𝑐.\max(𝑦,0)+𝑑.\min(𝑦,0)$$ with $𝑥∈[−1;1]$ and $𝑦∈[−1;1]$$$\begin{array}{ll} \text{maximize} & a \max(x,0) + b \min(x,0) + c \max(y,0) + d \min(y,0)\\ \text{subject to} & x,y \in [−1,1]\end{array}$$

I am working on an optimization problem where some of the terms of the objective function to maximize are expressed as a piecewise linear function of variables:

$$ z = \begin{cases} c^- x, & x \leq 0 \\ c^+ x, & x > 0 \\ \end{cases} $$

as depicted below

objective function plot

When I have $c^- \geq c^+$, I can solve the problem by adding a new variable $x'$, and two constraints:

  • $x' \leq c^- \times x $
  • $x' \leq c^+ \times x $

But what do I do when $c^- < c^+$ ? I don't think there is a way to express the problem as a linear programming problem in that case, is there ?

I have heard about SOS constraints. Are they the canonical way to solve this kind of problem ? If my problem contains many such piecewise linear functions, is it reasonable to expect a free solver from being able to solve such a problem with thousands of SOS1 constraints ?

Example

maximize $$𝑎.\max(𝑥,0)+𝑏.\min(𝑥,0)+𝑐.\max(𝑦,0)+𝑑.\min(𝑦,0)$$ with $𝑥∈[−1;1]$ and $𝑦∈[−1;1]$

I am working on an optimization problem where some of the terms of the objective function to maximize are expressed as a piecewise linear function of variables:

$$ z = \begin{cases} c^- x, & x \leq 0 \\ c^+ x, & x > 0 \\ \end{cases} $$

as depicted below

objective function plot

When I have $c^- \geq c^+$, I can solve the problem by adding a new variable $x'$, and two constraints:

  • $x' \leq c^- \times x $
  • $x' \leq c^+ \times x $

But what do I do when $c^- < c^+$ ? I don't think there is a way to express the problem as a linear programming problem in that case, is there ?

I have heard about SOS constraints. Are they the canonical way to solve this kind of problem ? If my problem contains many such piecewise linear functions, is it reasonable to expect a free solver from being able to solve such a problem with thousands of SOS1 constraints ?

Example

$$\begin{array}{ll} \text{maximize} & a \max(x,0) + b \min(x,0) + c \max(y,0) + d \min(y,0)\\ \text{subject to} & x,y \in [−1,1]\end{array}$$

added 122 characters in body
Source Link
lovasoa
  • 111
  • 3
Loading
deleted 1 character in body
Source Link
lovasoa
  • 111
  • 3
Loading
edited title
Link
Loading
added 1 character in body
Source Link
Loading
edited tags
Link
lovasoa
  • 111
  • 3
Loading
Source Link
lovasoa
  • 111
  • 3
Loading