Slope at break- points of piece- wise linear expressions

20 views
Skip to first unread message

Chris Nytun

unread,
Oct 4, 2017, 12:02:25 PM10/4/17
to AMPL Modeling Language
Hello all,

I refer to page 367 of Chapter 17 of Fourer's AMPL user guide. 

What would be the slopes applicable at the exact breakpoints of a piece- wise linear function?

Referring to  Fourer's example, assume that we reach limit2[i,j] for a specific [i,j] combination. 
Which of the two slopes would be applicable at exactly limit2[i,j]:  rate2 or rate 3?

<<limit [i,j], limit2[i,j]; rate1[i,j], rate2[i,j], rate3[i,j]>> Trans[i,j]. 

Kind regards,

Chris

Robert Fourer

unread,
Oct 5, 2017, 11:25:51 AM10/5/17
to am...@googlegroups.com
When a variable is at a breakpoint, both slopes are applicable. There is one slope if the variable decreases, and another slope if the variable increases. The solution algorithm deals with this automatically whenever an iteration causes the variable to move from its current (breakpoint) value.

Although the piecewise-linear function has two slopes adjacent to a breakpoint, it still has a unique *value* when the variable is at a breakpoint. In the example given, when Trans[i,j] equals limit2[i,j], the function value is rate1[i,j]*limit1[i,j] + rate2[i,j]*(limit2[i,j]-limit1[i,j]).

Bob Fourer
am...@googlegroups.com

=======

From: am...@googlegroups.com [mailto:am...@googlegroups.com] On Behalf Of Chris Nytun
Sent: Wednesday, October 4, 2017 11:02 AM
To: AMPL Modeling Language
Subject: [AMPL 14865] Slope at break- points of piece- wise linear expressions

I refer to page 367 of Chapter 17 of Fourer's AMPL user guide.

What would be the slopes applicable at the exact breakpoints of a piece- wise linear function?

Referring to Fourer's example, assume that we reach limit2[i,j] for a specific [i,j] combination.
Which of the two slopes would be applicable at exactly limit2[i,j]: rate2 or rate 3?

<<limit1[i,j], limit2[i,j]; rate1[i,j], rate2[i,j], rate3[i,j]>> Trans[i,j].


Reply all
Reply to author
Forward
0 new messages