Function1D

一個引數的函式。

JSON 表示法
{

  // Union field function can be only one of the following:
  "constant": number,
  "pwl": {
    object (PieceWiseAffineFunction)
  }
  // End of list of possible types for union field function.
}
欄位
聯集欄位 function。函式引數的單位應為:- if a weight: kg - if a time: min - 如果數量:1 function 只能為下列其中一項:
constant

number

函式為常數。

pwl

object (PieceWiseAffineFunction)

這個函式屬於分段線性。

PieceWiseAffineFunction

圓周率線性函式,僅限於一個引數。設計類似 https://github.com/google/or-tools/blob/stable/ortools/util/piecewise_linear_function.h

JSON 表示法
{
  "segments": [
    {
      object (PieceWiseAffineSegment)
    }
  ]
}
欄位
segments[]

object (PieceWiseAffineSegment)

函式的線性區段。

PieceWiseAffineSegment

分段線性函式的一個區段。

JSON 表示法
{
  "startX": number,
  "startY": number,
  "endX": number,
  "endY": number
}
欄位
startX

number

區隔開頭:x。

startY

number

區隔開頭:y。

endX

number

區隔結束時:x。

endY

number

區隔結束時:y。