Decision Optimization

Decision Optimization

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

 View Only
Expand all | Collapse all

sheetRead problem

Archive User

Archive UserThu November 21, 2013 02:55 PM

ALEX FLEISCHER

ALEX FLEISCHERFri November 22, 2013 09:30 AM

ALEX FLEISCHER

ALEX FLEISCHERFri November 22, 2013 09:34 AM

  • 1.  sheetRead problem

    Posted Fri December 02, 2011 05:56 AM

    Originally posted by: SystemAdmin


    Hi, there,
    I need to input data from Excel using sheetRead:

    SheetConnection sheetData("D:\ILOG_Files\data for example.xls",1);
    A from SheetRead (sheetData, "Link");

    What is the error"Invalid escape sequence in "\I""?

    where is problem
    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 2.  Re: sheetRead problem

    Posted Fri December 02, 2011 06:07 AM

    Originally posted by: SystemAdmin


    Please try

    SheetConnection sheetData("D:\\ILOG_Files\\data for example.xls",1);
    


    Regards
    Norbert
    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 3.  Re: sheetRead problem

    Posted Fri December 02, 2011 07:00 AM

    Originally posted by: SystemAdmin


    Still not working, shows up the following error:

    Data parsing error: syntax error, unexpected (identifier), expecting ')'.

    The sheet connection "sheetData" is not defined.
    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 4.  Re: sheetRead problem

    Posted Fri December 02, 2011 07:41 AM
    Hi

    can you try

    SheetConnection sheetData("D:/ILOG_Files/data for example.xls");
    


    ?

    Regards

    Alex
    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 5.  Re: sheetRead problem

    Posted Fri December 02, 2011 09:22 AM

    Originally posted by: SystemAdmin


    Tried:

    SheetConnection sheetData("D:\\ILOG_Files\\dataforexample.xls");
    A from SheetRead(sheetData, "Link");

    the error comes up with the following:

    File "D:\ILOG_Files\dataforexample.xls" not found.
    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 6.  Re: sheetRead problem

    Posted Fri December 02, 2011 09:27 AM

    Originally posted by: SystemAdmin


    Are you sure the file exists under that path?

    Regards
    Norbert
    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 7.  Re: sheetRead problem

    Posted Fri December 02, 2011 09:32 AM

    Originally posted by: SystemAdmin


    Yes, pretty sure, just double checked
    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 8.  Re: sheetRead problem

    Posted Fri December 02, 2011 09:53 AM
    Hi,

    what about

    SheetConnection sheetData("D:/ILOG_Files/data for example.xls");
    


    ?

    Regards
    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 9.  Re: sheetRead problem

    Posted Fri December 02, 2011 10:30 AM

    Originally posted by: SystemAdmin


    Tried

    SheetConnection sheetData("D:/ILOG_Files/dataforexample.xls");
    A from SheetRead(sheetData, "Link");

    The error is:

    File "D:/ILOG_Files/dataforexample.xls" not found.
    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 10.  Re: sheetRead problem

    Posted Fri December 02, 2011 10:37 AM
    Hi

    right. That is normal since you removed the spaces that were between "data", "for" and "examples".
    What happens if you keep the spaces?

    Regards
    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 11.  Re: sheetRead problem

    Posted Fri December 02, 2011 10:43 AM

    Originally posted by: SystemAdmin


    Tried

    SheetConnection sheetData("D:/ILOG_Files/data for example.xls");
    A from SheetRead(sheetData, "Link");

    The error still likes that:
    File "D:/ILOG_Files/data for example.xls" not found.
    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 12.  Re: sheetRead problem

    Posted Fri December 02, 2011 01:01 PM

    Originally posted by: SystemAdmin


    With CPLEX Optimization Studio V12.3, I just tried the syntax:
    SheetConnection sheetData("D:\\ILOG_Files\\data for example.xls");
    

    and I didn't get any error.

    Can you double check the path of the file on your disk?
    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 13.  Re: sheetRead problem

    Posted Fri December 02, 2011 02:40 PM

    Originally posted by: SystemAdmin


    problem solved through drag the Excel file directly to the catalogue, then run the function call.

    Anyway, it works now. thanks very much for your help. have a nice weekend then.
    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 14.  Re: sheetRead problem

    Posted Fri December 02, 2011 06:56 AM

    Originally posted by: SystemAdmin


    Still not working, shows up the following error:

    Data parsing error: syntax error, unexpected (identifier), expecting ')'.

    The sheet connection "sheetData" is not defined.
    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 15.  Re: sheetRead problem

    Posted Fri December 02, 2011 07:42 AM

    Originally posted by: SystemAdmin


    Okay. Please remove the blanks from the filename or
    replace them with'_' or protect them as well with '\'

    Regards
    Norbert
    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 16.  Re: sheetRead problem

    Posted Thu November 21, 2013 02:55 PM

    Originally posted by: HHXV_Gizem_Sağol


     

    Hi,

    I am having the same following problem with my code:

    "Data parsing error: syntax error, unexpected (identifier), expecting ')'."

    The exact place is the bold line below. If you are able to help, I would be glad.

    Thank you,

    Gizem

     

     

    n = 3;
    num = 6;
    A=[ [ 3 2 2 ]
    [ 2 3 2 ]
    [ 0 1 4 ]
      ] ;
     
    b= 3 ;
     
    C = [ [ 3 2 2 ]
     [ 2 3 2 ]
     [ 0 1 4 ]
    ] ;
     
    for (var i=1 ; i <(n+1); i++) { d[ i ][ i ] = 1 } 
     
    for (var i=1 ; i < (n+1); i++)
    for (var j=(i+1); j < (n+1); j++) 
    for (var k=(n+1); k < (num+1); k++) 
    d[ i ][ k ] = 1 ;
    d[ j ][ k ] = 1 ;
    }  
    }  
     
    for (var k=1; k < (num+1); k++) 
    {
    for (var i=1; i < (n+1); i++)
    {
    for (var j=1; j < (n+1); j++)
    D[ i ][ j ][ k ] = d[ i ][ k ] * d[ j ][ k ] = 1 ;
    }
    }
    }

    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 17.  Re: sheetRead problem

    Posted Fri November 22, 2013 09:30 AM

    Hi,

    can you attach .mod and .dat ?

     

    Regards


    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 18.  Re: sheetRead problem

    Posted Fri November 22, 2013 09:34 AM

    Hi,

    can you attach .mod and .dat ?

     

    Regards


    #DecisionOptimization
    #OPLusingCPLEXOptimizer