Class RoutingModel.RouteDimensionTravelInfo.TransitionInfo.PiecewiseLinearFormulation
java.lang.Object
com.google.ortools.constraintsolver.RoutingModel.RouteDimensionTravelInfo.TransitionInfo.PiecewiseLinearFormulation
- Enclosing class:
- RoutingModel.RouteDimensionTravelInfo.TransitionInfo
public static class RoutingModel.RouteDimensionTravelInfo.TransitionInfo.PiecewiseLinearFormulation
extends Object
The following struct defines a piecewise linear formulation, with
int64_t values for the "anchor" x and y values, and potential double
values for the slope of each linear function.
int64_t values for the "anchor" x and y values, and potential double
values for the slope of each linear function.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddelete()protected voidfinalize()static longThe set of *increasing* anchor cumul values for the interpolation.The y values used for the interpolation:
For any x anchor value, let i be an index such that
x_anchors[i] ≤ x < x_anchors[i+1], then the y value for x is
y_anchors[i] * (1-λ) + y_anchors[i+1] * λ, with
λ = (x - x_anchors[i]) / (x_anchors[i+1] - x_anchors[i]).voidThe set of *increasing* anchor cumul values for the interpolation.voidThe y values used for the interpolation:
For any x anchor value, let i be an index such that
x_anchors[i] ≤ x < x_anchors[i+1], then the y value for x is
y_anchors[i] * (1-λ) + y_anchors[i+1] * λ, with
λ = (x - x_anchors[i]) / (x_anchors[i+1] - x_anchors[i]).static longtoString()
-
Field Details
-
swigCMemOwn
protected transient boolean swigCMemOwn
-
-
Constructor Details
-
PiecewiseLinearFormulation
public PiecewiseLinearFormulation(long cPtr, boolean cMemoryOwn) -
PiecewiseLinearFormulation
public PiecewiseLinearFormulation()
-
-
Method Details
-
getCPtr
public static long getCPtr(RoutingModel.RouteDimensionTravelInfo.TransitionInfo.PiecewiseLinearFormulation obj) -
swigRelease
public static long swigRelease(RoutingModel.RouteDimensionTravelInfo.TransitionInfo.PiecewiseLinearFormulation obj) -
finalize
protected void finalize() -
delete
public void delete() -
setX_anchors
The set of *increasing* anchor cumul values for the interpolation. -
getX_anchors
The set of *increasing* anchor cumul values for the interpolation. -
setY_anchors
The y values used for the interpolation:
For any x anchor value, let i be an index such that
x_anchors[i] ≤ x < x_anchors[i+1], then the y value for x is
y_anchors[i] * (1-λ) + y_anchors[i+1] * λ, with
λ = (x - x_anchors[i]) / (x_anchors[i+1] - x_anchors[i]). -
getY_anchors
The y values used for the interpolation:
For any x anchor value, let i be an index such that
x_anchors[i] ≤ x < x_anchors[i+1], then the y value for x is
y_anchors[i] * (1-λ) + y_anchors[i+1] * λ, with
λ = (x - x_anchors[i]) / (x_anchors[i+1] - x_anchors[i]). -
toString
-
toString
-