
Ryuta Tamura
- Total activity 155
- Last activity
- Member since
- Following 0 users
- Followed by 0 users
- Votes 1
- Subscriptions 103
Activity overview
Latest activity by Ryuta Tamura-
Ryuta Tamura commented,
Hi Ethan, As you saw in the error, Gurobi accepts a linear or quadratic function as the objective function. NLExpr is only available for constraints. However, you can use auxiliary variables to set...
-
Ryuta Tamura commented,
Any easy way to debug it? For example, you can do it by fixing ub and lb of all variables to their values and then use computeIIS to see which parts are violated. This article might be helpful. ...
-
Ryuta Tamura commented,
Hi,"var.X" attribute cannot be referenced directly in the callback. In your code, the return value of GetNodeRel, “x”, seems to have the values of the node solution. Please check the value of the v...
-
Ryuta Tamura commented,
Hi, But I still do not understand, why gurobi does not accept the complete solution? Have you checked the return value of cbUseSolution? If the given solution is not accepted, the value will be...
-
Ryuta Tamura commented,
Hi Noah, This article might be useful. This means that adding the constraint for the case of the binary variable is 0. For example: model.addGenConstrIndicator(CL_time_bin[i, (t_start, t_end)], Tru...
-
Ryuta Tamura commented,
This model will be Infeasible: m = gp.Model()x = m.addVar(lb=10, ub=10, name="x")y = m.addVar(lb=0,ub=0, name="y")z = m.addVar(name="z")m.addGenConstrNL(z,x/y)m.optimize() As this description stat...
-
Ryuta Tamura commented,
Hi, Please see this description. Gurobi implicitly tries to avoid division by zero. However, to avoid unexpected behavior, it is recommended to explicitly constrain the denominator to be non-zero s...
-
Ryuta Tamura commented,
Hi Audrius, As the error message states, the objective function must be linear or quadratic. This can be resolved using auxiliary variable and addGenConstrNL method: obj = m.addVar(name="obj")m.add...
-
Ryuta Tamura commented,
Hi Minseo, You can specify how to handle general function constraints by funcnonlinear parameter. When this parameter is 0, Gurobi uses static piecewise-linear approximation, and when it is 1, Guro...
-
Ryuta Tamura commented,
Hi Mina, model.addGenConstrPow is used to create constraints \(x = n^a \) (x, n: variable, a: constant). You can use model.addGenConstrExpA to create constraints \(x = a^n \): model.addGenConstrExp...