• This function converts an array of strings into an array of objects representing instance information data.

    Parameters

    • unprocessedInstanceInformationData: string[]

      Array of strings, where each string is a semicolon-separated representation of a row of data.

    Returns object[]

    Array of objects, where each object represents a row of instance information.

    Remarks

    The function takes an array of strings (representing rows of instance information) as input. It reads the first line to extract headers (split by ';'). These headers are used as the keys for the resulting objects.

    The function then iterates through each line of data, splitting it into separate elements based on the semicolon delimiter, and creating an object from these elements with the corresponding headers as keys. If the headers are named PrimalBound or Dualbound, they are renamed to PrimalBoundProblem and DualBoundProblem. If a cell in the data is empty, it assigns an empty string to the corresponding object property.

    Finally, it displays a notification about successful loading of instance information.

    Example

    const unprocessedInstanceInformationData = [ "Column1;Column2", "Value1;Value2", ";Value4" ];
    const result = GetInstanceInformation(unprocessedInstanceInformationData);
    // result = [
    // { "Column1": "Value1", "Column2": "Value2" },
    // { "Column1": "", "Column2": "Value4" },
    // ];

Generated using TypeDoc