Decision Optimization

Decision Optimization

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

 View Only
  • 1.  INdexerror: sequence elements of coefficient matrix must have length 2

    Posted Fri March 30, 2018 09:59 PM

    Originally posted by: savant_ning


     now I had a new question... see my attachment

     

    I have 4 decision variables now, and control a linear_constraint, but it doesn't work...

     

    Do I have too many decision variables?

     

    thx


    #DecisionOptimization
    #MathematicalProgramming-General


  • 2.  Re: INdexerror: sequence elements of coefficient matrix must have length 2

    Posted Sun April 01, 2018 01:21 PM

    According to your backtrace the problem is not with linear_constraints but with indicator_constraints. The function call looks wrong to me. You have 4 indicator variables, so you will have to create 4 constraints in your call. But you only have one sense, one rhs and one lin_expr. Something does not add up.


    #DecisionOptimization
    #MathematicalProgramming-General


  • 3.  Re: INdexerror: sequence elements of coefficient matrix must have length 2

    Posted Mon April 02, 2018 12:36 AM

    Originally posted by: savant_ning


    okay, thx

     

    I had fix this problem... it means use indicator_constraints, the indicator variables and constraints and others(including sense, rhs, lin_expr) must have the same length?

     


    #DecisionOptimization
    #MathematicalProgramming-General


  • 4.  Re: INdexerror: sequence elements of coefficient matrix must have length 2

    Posted Tue April 03, 2018 03:09 AM

    Sorry, I don't get your question. But it might be a good idea to look at the reference documentation and the examples therein. This should explain how to use these functions.


    #DecisionOptimization
    #MathematicalProgramming-General


  • 5.  Re: INdexerror: sequence elements of coefficient matrix must have length 2

    Posted Mon April 02, 2018 07:40 AM

    Originally posted by: savant_ning


    This code had run about 5-6 hours at this print, and the memory  has been occupied. is it work normally?

     

    thx~


    #DecisionOptimization
    #MathematicalProgramming-General


  • 6.  Re: INdexerror: sequence elements of coefficient matrix must have length 2

    Posted Tue April 03, 2018 03:11 AM

    Uhm, how would we know whether a long running time is expected for your model or not? The code snippet you posted does not give a lot of clues about your model or its size.


    #DecisionOptimization
    #MathematicalProgramming-General