ahmad alanaqreh
 Total activity 41
 Last activity
 Member since
 Following 0 users
 Followed by 0 users
 Votes 7
 Subscriptions 11
Activity overview
Latest activity by ahmad alanaqreh
ahmad alanaqreh created a post,
The bounds of the variables
AnsweredI have a model where I define three variables as follows : alpha[a] = model.addVar(lb=GRB.INFINITY, name="alpha%d" % a)beta[i, j] = model.addVar(lb=GRB.INFINITY, ub=0, name="beta%d,%d," % (i, j))...

ahmad alanaqreh commented,
Sorry Jaromil, your suggestion is not clear for me, terminating the MP model will terminate the callback which is not what I want, do you mean terminating the DSP model where I am trying to change ...

ahmad alanaqreh commented,
In my case x[i, j] and z are parameters(alpha, beta, omega, and lamda are variables), actually, these are the values changing every time, so I am changing my objective function based on the new val...

ahmad alanaqreh commented,
Hi Jaromil Thanks a lot for your answer, yes that is true, in this case how I can replace the objective function?? should I create a new model with a new objective function or there is a way to do ...

ahmad alanaqreh commented,
Hi Jarmoil I have the following objective function: model.setObjective(quicksum(x[i, j] * alpha[i] for (i, j) in E if i != s) + quicksum((n * (1  x[i, j])  1) * beta[i, j] for (...

ahmad alanaqreh created a post,
change the coefficient of the variables in the objective function
Not plannedI have a model that I am solving with callback, I need to change the coefficients of the variables in the objective function from time to time, I have seen the Model.chgCoeff() to change the coeffi...

ahmad alanaqreh commented,
Hi Jaromil, this is just the smallest example I have, the time here is acceptable but when the graph has hundreds or thousands of nodes and edges it really takes a lot of time, there is any part th...

ahmad alanaqreh created a post,
Improve performance of constraintadding in Gurobi Python
CompletedIn the model I am working on I have to add constraints, the constraints based on the edges of a graph, I have the decision variable x = {}for (i, j) in E: x[i, j] = model.addVar(vtype=GRB.BINAR...

ahmad alanaqreh commented,
Hi Jaromil your suggestion kind of works, the problem that by using the x.VarName it takes x,1,11 to be before x,1,2 in the sorted list !!

ahmad alanaqreh commented,
Hi Jaromil I am so sorry if the issue was not clear, let me give more details : I have a model where the variable x is defined as follow : x = {}for (i, j) in E: x[i, j] = model.addVar(vtype=GRB....