子龙 王

  • Gurobi-versary
  • Conversationalist
  • First Question
  • 合計アクティビティ 14
  • 前回のアクティビティ
  • メンバー登録日
  • フォロー 0ユーザー
  • フォロワー 0ユーザー
  • 投票 1
  • サブスクリプション 4

アクティビティの概要

子龙 王さんの最近のアクティビティ
  • 子龙 王さんが投稿を作成しました:

    How to sum variables that are not dimensionally incomplete

    回答済み

    x (i,j,k) :{(1, 1, 1) : < gurobi. Var x >,1,1 (1), (1, 1, 2) : < gurobi. Var x (1,1,2) >,(1, 2, 1) : < gurobi. Var x > (1, 2, 1), (1, 2, 2) : < gurobi. Var x >,2,2 (1), (1, 2, 3) : < gurobi. Var (1...

  • 子龙 王さんが投稿を作成しました:

    unsupported operand type(s) for >>: 'bool' and 'TempConstr'

    回答済み

    model.addConstrs((dx[k+1] == 1) >> (x[i,j,k+1] >= 1) for k in range(4)) dx is defined as: dx = model.addVars(9, vtype = GRB.BINARY, name="dx")X (j, I, k) is defined as: x (j, I, k) = model. AddVar ...

  • 子龙 王さんがコメントを作成しました:

    I have looked at the relevant website and understood the application of the if constraint in gurobi, but I still don't know how to write my own questions I wonder if it is convenient to provide spe...

  • 子龙 王さんが投稿を作成しました:

    Add a new constraint to the model

    回答済み

    The complete executable code is as follows: from gurobipy import Model, GRB, quicksumimport sysimport numpy as npimport timeimport os from DataRead import getdata from itertools import chain def MP...

  • 子龙 王さんがコメントを作成しました:

    The complete executable code is as follows: from gurobipy import Model, GRB, quicksumimport sysimport numpy as npimport timeimport os from DataRead import getdata from itertools import chain def MP...

  • 子龙 王さんがコメントを作成しました:

    I also tried the following:# constraint(4)# for i in J:#     for j in OJ[i]:#         if j ! = OJ[i][0]: #             p = None#             current_machine = None#             model.update()#     ...

  • 子龙 王さんがコメントを作成しました:

    I don't know if adding the corresponding code in constraint 4 is the right thing to do, and I appreciate someone giving me some guidance

  • 子龙 王さんがコメントを作成しました:

    The last line of code is wrong. My new code should read: D[previous_machine][operations_machines],Instead of D(previous_machine,operations_machines),But it also fails in the following parts: for k ...

  • 子龙 王さんが投稿を作成しました:

    Add a new constraint to the model

    オープン

    from gurobipy import Model, GRB, quicksumimport sysdef MIPModel(Data):    n = Data['n']    m = Data['m']    J = Data['J']    OJ = Data['OJ']    oj=OJ    operations_machines = Data['operations_machi...