I'm working on the LP model for a hydro power generation problem, one constraint is piecewise linear, for example,
xi - xi-1 <= xi-1 - 951 if xi-1 >= 951 and xi-1 <= 953
xi - xi-1 <= 2 if xi-1 > 953 and xi-1 <= 955
xi - xi-1 <= xi-1 - 953 if xi-1 > 955 and xi-1 <= 956
...
One way I can think of is to solve the problem multiple times with each piece of the piecewise linear constraint and pick the optimal one. But the model is big and needs to be solved as fast as possible every hour, so I can't really do that. Currently I'm doing a linear approximation, but is there a better way to model it?

Thanks,
Enzhou

asked 22 Aug '13, 19:21

Enzhou's gravatar image

Enzhou
1111
accept rate: 0%

edited 11 Dec '13, 08:08

fbahr's gravatar image

fbahr ♦
4.6k716


I'd start with these two blog posts by Paul Rubin Piecewise-linear Functions in Math Programs Piecewise-linear Functions Redux

link

answered 23 Aug '13, 04:23

jfpuget's gravatar image

jfpuget
2.5k310
accept rate: 8%

Thanks! That's very helpful.

Enzhou

(23 Aug '13, 11:42) Enzhou

Thanks for the plug! :-)

(23 Aug '13, 15:29) Paul Rubin ♦♦

Have you tried with GAMS?

link

answered 09 Nov '16, 00:41

patrijuvet's gravatar image

patrijuvet
111
accept rate: 0%

Piecewise linear functions falls under "etc" https://www.or-exchange.org/questions/14268/half-the-questions-on-this-board-could-be-eliminated-if-there-were-an-faq-directing-people-to-automated-software-for-linearizing-constraints-conditional-constraints-big-m-etc

link

answered 09 Nov '16, 02:19

Mark%20L%20Stone's gravatar image

Mark L Stone
447310
accept rate: 15%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×231

Asked: 22 Aug '13, 19:21

Seen: 10,037 times

Last updated: 09 Nov '16, 02:19

OR-Exchange! Your site for questions, answers, and announcements about operations research.