Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  Why no value?

    Posted 06/24/12 07:26 AM

    Originally posted by: WangZhengxu


    Hi all,

    I am using the OPL coding Mathematical Programming, then I find a confusing problem:

    Please read the code first:
    
    
    {string
    } DRequests = 
    {
    "SL1",
    "SL2",
    "SL3",
    "SL4",
    "SL5",
    "SL6",
    "SL7",
    "SL8",
    "SL9",
    "SL10"
    }; 
    {string
    } StorageLocations =
    {
    "DRequest1",
    "DRequest2",
    "DRequest3",
    "DRequest4",
    "DRequest5"
    };   dvar 
    
    boolean x[DRequests][StorageLocations];   minimize sum(i in DRequests, j in StorageLocations)x[i][j];   subject to
    { forall(k in StorageLocations) sum(i in DRequests)x[i][k] ==1; forall(i in DRequests) sum(k in StorageLocations)x[i][k] == 1; 
    }
    

    The CPLEX Studio says the decision variable x has no value, but actually, the
    
    x[DRequest1][SL1]=1; x[DRequest2][SL2]=1;x[DRequest3][SL3]=1;x[DRequest4][SL4]=1;x[DRequest5][SL5]=1
    
    could be a answer.

    Do you know why? or where am I wrong?
    #DecisionOptimization
    #MathematicalProgramming-General


  • 2.  Re: Why no value?

    Posted 06/24/12 09:26 AM

    Originally posted by: WangZhengxu


    OK. I know, I made a stupid mistake.
    #DecisionOptimization
    #MathematicalProgramming-General