Decision Optimization

Decision Optimization

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

 View Only
  • 1.  MATLAB CPLEX

    Posted Sun April 08, 2012 12:20 AM

    Originally posted by: WaiLin


    Hi,

    I am facing this following problem.
    Index exceeds matrix dimensions.
    Error in ==> basecase_cplex>milpSolver at 145
    try

    ??? Output argument "u_" (and maybe others) not assigned during call to "C:\Documents and
    Settings\Acer\Desktop\project\basecase_cplex.m (milpSolver)".

    Error in ==> basecase_cplex at 133
    u_, g0_, rup_, rdn_ = milpSolver(a, b, startup_cost, pi_up, pi_dn, ...
    My code is working before adding constraint (1d.2) and changing index of dimension.
    But, after adding constraint (1d.2), I found the error and I could not really fix this error.
    Can anyone please help me?

    Since I can attach one file, I've given the working code as comment.
    Hope somebody can help me to solve.
    Thank. Looking forwards to kind help.

    Regards,
    William
    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: MATLAB CPLEX

    Posted Sun April 08, 2012 11:17 PM

    Originally posted by: John Cui


    Line 190:
    Aineq(temp,ind_rdn(temp)) = -1 - eye(C);
    


    The minimize value of temp is 745, but ind_rdn only have 744 elements, so you got Index exceeds matrix dimensions.

    So please check your code.

    John Cui
    #CPLEXOptimizers
    #DecisionOptimization