coreEngine.Calibration

## Class AlgHelper

- java.lang.Object
- - coreEngine.Calibration.AlgHelper

-     public class AlgHelper
      extends java.lang.Object

  Author:
    Lake

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `float[][]` | `groundTruthDensity`
    `float[][]` | `groundTruthFlows`
    `float[][]` | `groundTruthSpeed`
    `float[]` | `groundTruthTravelTime`
    `float[][]` | `groundTruthVal`
    `float` | `LAMBDA1`
    `float` | `LAMBDA2`
    `float` | `LAMBDA3`
    `private int` | `numPer`
    `private int` | `numSeg`
    `static int` | `OBJ_MULTI`
    `static int` | `OBJ_SINGLE`
    `int` | `objType`
    `float[]` | `profile`
    `private Seed` | `seed`
    `boolean[]` | `segHasInfo`
    `float[]` | `segLengthMi`
    `int[]` | `segSensorHash`
    `float[][]` | `speedWeight`
    `static int` | `TYPE_SEG`
    `static int` | `TYPE_SENSOR`
    `boolean[][]` | `useProfile`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AlgHelper(int numSeg, int numPer, float[] segLengths)`
    `AlgHelper(Seed seed)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `private void` | `extractDensityFromSeed()`
    `private void` | `extractFlowFromSeed()`
    `void` | `extractFromSolutionSeed(java.lang.String IDS)`
    `private void` | `extractSegLengthsFromSeed()`
    `private void` | `extractSpeedFromSeed()`
    `void` | `fillProfile(int mainType, int subType)`
    `Seed` | `getTargetSeed()`
    `boolean` | `getUseProfile(int seg, int segType)`
    `private void` | `initialize()`
    `void` | `setDensityData(float[][] densityData)`
    `void` | `setDensityData(float density, int seg, int per)`
    `void` | `setFlowData(float[][] flowData)`
    `void` | `setFlowData(float flow, int seg, int per)`
    `void` | `setObjectiveType(int objType)`
    `void` | `setSegmentHasInfo(int segment, boolean hasInfo)`
    `void` | `setSpeedData(float[][] speedData)`
    `void` | `setSpeedData(float speed, int seg, int per)`
    `void` | `setTravelTimeData(float[] travelTimeData)`
    `void` | `setTravelTimeData(float travelTime, int per)`
    `void` | `setTravelTimeFromSpeed()`
    `void` | `setUseProfile(boolean useProfile, int seg, int segType)`
    `void` | `setValData(float[][] valData)`
    `void` | `setValData(float val, int seg, int per)`
    `void` | `setWeights(float w1, float w2, float w3)`
    `private static float[][]` | `transpose(float[][] arr)`
    `void` | `updateSpeedWeights()`
    `void` | `useI440SensorExample()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### seed

          private final Seed seed

    - #### numSeg

          private final int numSeg

    - #### numPer

          private final int numPer

    - #### objType

          public int objType

    - #### LAMBDA1

          public float LAMBDA1

    - #### LAMBDA2

          public float LAMBDA2

    - #### LAMBDA3

          public float LAMBDA3

    - #### groundTruthSpeed

          public final float[][] groundTruthSpeed

    - #### speedWeight

          public final float[][] speedWeight

    - #### groundTruthDensity

          public final float[][] groundTruthDensity

    - #### groundTruthFlows

          public final float[][] groundTruthFlows

    - #### groundTruthVal

          public final float[][] groundTruthVal

    - #### groundTruthTravelTime

          public final float[] groundTruthTravelTime

    - #### segHasInfo

          public final boolean[] segHasInfo

    - #### segLengthMi

          public final float[] segLengthMi

    - #### useProfile

          public final boolean[][] useProfile

    - #### profile

          public final float[] profile

    - #### segSensorHash

          public final int[] segSensorHash

    - #### TYPE_SEG

          public static final int TYPE_SEG

      See Also:
        Constant Field Values

    - #### TYPE_SENSOR

          public static final int TYPE_SENSOR

      See Also:
        Constant Field Values

    - #### OBJ_SINGLE

          public static final int OBJ_SINGLE

      See Also:
        Constant Field Values

    - #### OBJ_MULTI

          public static final int OBJ_MULTI

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### AlgHelper

          public AlgHelper(Seed seed)

    - #### AlgHelper

          public AlgHelper(int numSeg,
                           int numPer,
                           float[] segLengths)

  - ### Method Detail

    - #### initialize

          private void initialize()

    - #### getTargetSeed

          public Seed getTargetSeed()

    - #### setSpeedData

          public void setSpeedData(float[][] speedData)

    - #### setSpeedData

          public void setSpeedData(float speed,
                                   int seg,
                                   int per)

    - #### setDensityData

          public void setDensityData(float[][] densityData)

    - #### setDensityData

          public void setDensityData(float density,
                                     int seg,
                                     int per)

    - #### setFlowData

          public void setFlowData(float[][] flowData)

    - #### setFlowData

          public void setFlowData(float flow,
                                  int seg,
                                  int per)

    - #### setValData

          public void setValData(float[][] valData)

    - #### setValData

          public void setValData(float val,
                                 int seg,
                                 int per)

    - #### setTravelTimeData

          public void setTravelTimeData(float[] travelTimeData)

    - #### setTravelTimeData

          public void setTravelTimeData(float travelTime,
                                        int per)

    - #### setUseProfile

          public void setUseProfile(boolean useProfile,
                                    int seg,
                                    int segType)

      Parameters:
        `useProfile` - True if demand estimation is profile based
        `seg` - Segment number (index starts at 0)
        `segType` - 0 - OAF/on-ramp, 1 - DAF/off-ramp (weave needs two calls)

    - #### getUseProfile

          public boolean getUseProfile(int seg,
                                       int segType)

      Parameters:
        `seg` - Segment number (index starts at 0)
        `segType` - 0 - OAF/on-ramp, 1 - DAF/off-ramp (weave needs two calls)
      Returns:

    - #### extractSpeedFromSeed

          private void extractSpeedFromSeed()

    - #### extractDensityFromSeed

          private void extractDensityFromSeed()

    - #### extractFromSolutionSeed

          public void extractFromSolutionSeed(java.lang.String IDS)

    - #### extractFlowFromSeed

          private void extractFlowFromSeed()

    - #### extractSegLengthsFromSeed

          private void extractSegLengthsFromSeed()

    - #### setTravelTimeFromSpeed

          public void setTravelTimeFromSpeed()

    - #### transpose

          private static float[][] transpose(float[][] arr)

    - #### setSegmentHasInfo

          public void setSegmentHasInfo(int segment,
                                        boolean hasInfo)

    - #### setWeights

          public void setWeights(float w1,
                                 float w2,
                                 float w3)

    - #### setObjectiveType

          public void setObjectiveType(int objType)

    - #### updateSpeedWeights

          public void updateSpeedWeights()

    - #### fillProfile

          public void fillProfile(int mainType,
                                  int subType)

    - #### useI440SensorExample

          public void useI440SensorExample()