メインコンテンツへスキップ

My Model resulting KeyError: 0 please help

ユーザーの入力を待っています。

コメント

3件のコメント

  • Mario Ruthmair
    • Gurobi Staff Gurobi Staff

    Hi Christian,

    I guess there are some index issues when accessing your data in these constraints. Probably, you should check whether you can access D[m-1][j-1] for all m and j. Are you sure this works if m and j are the first available values?

    Best regards,
    Mario

    0
  • Christian Yavin Ibrahim
    • Gurobi-versary
    • First Comment
    • First Question

    I'm not quite sure if m and j are the first available values. maybe you can check the mathematical model below for that constraints

    0
  • Mario Ruthmair
    • Gurobi Staff Gurobi Staff

    I meant that you should check if the indices and corresponding data exist in your data structures, e.g., by accessing and/or printing them before using them in the constraints.

    0

サインインしてコメントを残してください。