Decision Optimization

Decision Optimization

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

 View Only
Expand all | Collapse all

CPLEX outputs the message "Exception from IBM ILOG Concert: excel: range has a bad size. it must be only 1 line or 1 row."

  • 1.  CPLEX outputs the message "Exception from IBM ILOG Concert: excel: range has a bad size. it must be only 1 line or 1 row."

    Posted Mon November 11, 2024 11:41 AM

    CPLEX outputs the error message mentioned in the discussion subject when it runs the attached program with the attached data, but no specific location is given.

    I checked the Excel file but couldn't find a problem.

    Could you tell the point to be fixed?

    Thank you in advance for your help.

    #Decision Optimization



    ------------------------------
    宗純 岩科
    ------------------------------

    Attachment(s)



  • 2.  RE: CPLEX outputs the message "Exception from IBM ILOG Concert: excel: range has a bad size. it must be only 1 line or 1 row."
    Best Answer

    Posted Mon November 11, 2024 01:31 PM

    Hi

    if you turn

    Energy_purchased to SheetWrite(sheet,"Energy_purchased!A1:TN24"); 

    into

    Energy_purchased to SheetWrite(sheet,"Energy_purchased!A1:A24");

    your model will work.

    You cannot write a 1D array into a 2D array!

    Regards



    ------------------------------
    [Alex] [Fleischer]
    [Data and AI Technical Sales]
    [IBM]
    ------------------------------



  • 3.  RE: CPLEX outputs the message "Exception from IBM ILOG Concert: excel: range has a bad size. it must be only 1 line or 1 row."

    Posted Mon November 11, 2024 09:38 PM

    Dear Mr. Fleischer

    Thank you for answering.

    I changed the program as you mentioned, and the problem was resolved.

    Thank you again for your help.

    Best regards

    Sojun Iwashina



    ------------------------------
    宗純 岩科
    ------------------------------