Page Summary
-
This documentation describes a Function of one argument, which can be either a constant value or a piecewise linear function.
-
If the function is piecewise linear, it's defined by a series of segments, each represented by a
PieceWiseAffineSegment. -
Each
PieceWiseAffineSegmentis determined by its starting and ending points (x, y coordinates). -
The argument of the function represents different units such as weight (kg), time (min), or number of pallets.
Function of one argument.
| JSON representation |
|---|
{ // Union field |
| Fields | |
|---|---|
Union field function. The unity of the argument of the function is supposed to be: - if a weight: kg - if a time: min - if a number of pallets: 1 function can be only one of the following: |
|
constant |
The function is a constant. |
pwl |
The function is piecewise linear. |
PieceWiseAffineFunction
Piecewise-linear function, limited to one argument. Design similar to https://github.com/google/or-tools/blob/stable/ortools/util/piecewise_linear_function.h
| JSON representation |
|---|
{
"segments": [
{
object ( |
| Fields | |
|---|---|
segments[] |
Linear segments of the function. |
PieceWiseAffineSegment
One segment of a piecewise-linear function.
| JSON representation |
|---|
{ "startX": number, "startY": number, "endX": number, "endY": number } |
| Fields | |
|---|---|
start |
Beginning of the segment: x. |
start |
Beginning of the segment: y. |
end |
End of the segment: x. |
end |
End of the segment: y. |