Decision Optimization

 View Only
Expand all | Collapse all

Repeated row label in interactive optimizer

  • 1.  Repeated row label in interactive optimizer

    Posted Sat April 25, 2020 02:40 AM

    Originally posted by: UserCplex


    Hello,

    Given the following .lp file:

     

    Minimize
     obj: Y0_1 + Y0_2
    Subject To
     C1_0:                           Y0_1 + Y0_2 <= 5
     C1_0:                        Y0_1 + Y0_2 >= 3
    Bounds
     0 <= Y0_1 <= 5
     0 <= Y0_2 <= 5
    End

     

    when I read this via interactive optimizer and optimize, CPLEX correctly gives the warning:

    Row 'C1_0' repeats.

    Inspite of this warning, CPLEX does not disregard the second constraint, and the optimal solution is indeed 3 and not anything less than 3 which would have happened had the second inequality been disregarded.

    I have an application from which the output .lp file does have repeated row labels. I cannot control this.

    Is it guaranteed that regardless of number of repeated row labels, the interactive optimizer will never disregard the actual constraint in the rows with repeated labels?

    Thaniks.

     


    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: Repeated row label in interactive optimizer

    Posted Mon April 27, 2020 01:08 AM

    Yes, this is guaranteed for LP files (or LP input in the interactive) or for the SAV file format. The warning only says that there are two rows with the same name. The warning text is a bit unfortunate, it should rather read "duplicate row label". CPLEX does not even check whether the row is identical. None of these rows are ignored. Duplicate row names will only cause trouble if you display results per row or if you try to export to MPS.

    In the LP file format, row labels are optional. If you want to get rid of this warning, you could just delete all row labels (I suspect that if your application creates duplicates row labels then it does not really care about these labels).


    #CPLEXOptimizers
    #DecisionOptimization