Decision Optimization

Decision Optimization

Delivers prescriptive analytics capabilities and decision intelligence to improve decision-making.

 View Only
Expand all | Collapse all

Read distance matrix from excel

  • 1.  Read distance matrix from excel

    Posted Thu December 18, 2014 04:30 AM

    Originally posted by: Anne_New


    Hello everybody,

    I just started using cplex and have a question regarding how to import a distance matrix from excel.

    I know how to connect an excel sheet, but when I try to read the distance matrix for a TSP, I received the error message: exemption by IBM ILOG concert: excel: can only read a 1D array from a column or a row.

    So I changed the data in the excel sheet and wrote them in one really long column. The SheetRead then worked, but it is really difficult and confusing if I want to change the data. Now I am using 100 values, but I want to increase them up to approx. 625.

    Can anybody help me, please?

    Thank you.

    Anne

     

     


    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 2.  Re: Read distance matrix from excel

    Posted Thu December 18, 2014 04:55 AM

    Hi

    a tuple set with city1 city2 and distance seem the right way

    you may also read a 2D table in excel.

    Have a look at SheetRead in the documentation.

    regards


    #DecisionOptimization
    #OPLusingCPLEXOptimizer