Ana Guasque Ortega
- Total activity 40
- Last activity
- Member since
- Following 0 users
- Followed by 0 users
- Votes 5
- Subscriptions 10
Posts
Recent activity by Ana Guasque Ortega-
Not equal binary variables in a constraint
AnsweredGood morning, I want to model an allocation problem in which items are allocated to bins. Items have a characteristic (for example, color) so I need a constraint that ensure that If two items have ...
-
Callback function not working
AnsweredHello, I'm trying to use a callback function to apply an heuristic for each solution. I am not able to do it. I write here a simplified version of the code. In my case, there may be hundreds of sol...
-
Check heuristics for each solution
OngoingGood morning, I have modelled a problem and it works perfectly. I don't have an objective function. I get 100 solutions with this configuration: m.setParam('PoolSearchMode',1) m.setParam('PoolSolu...
-
Create variables in a loop
AnsweredGood morning, I want to create a variable whose size depends on different parameters. I tried something like (I is a list like [0,1,2,3], H is an integer and T is a list like [5,10,15, 50]: for i ...
-
Variable as an index of a dictionary
AnsweredHello! I know I can't use a variable to index another variable or parameter in the model. So I have to use auxiliary binary variables to solve the problem, as suggested. But I am not able to do it....
-
Iterative equations with dependence of Gurobi variables
AnsweredHello! I have a problem in which I want to calculate the value of R. R is calculated with an iterative equation (see figure), that stops at convergence (Rn+1 = Rn). In the summatory, only the tasks...
-
Max_ for multidimensional array
AnsweredHi, I have a multidimensional variable: var = m.addVars(N,time,vtype=GRB.INTEGER, name ="Var_") and I would like to calculate the maximum value of this variable for each N. For example, max_var[0]...
-
Linearizing non-linear constraint
AnsweredHello, We have a continuous variable: u = m.addVars(items, vtype=GRB.CONTINUOUS, name ="U")#Weights of the items And we want to maximize this difference: mayorU = max_(u)menorU = min_(u)m.setObjec...
-
Linearize quadratic continuous constraints
AnsweredHello, I am formulating a problem to be solved with Gurobi. One of my constraints is quadratic. I know I can linearize the constraints if at least one of the involved variables is binary. I read at...
-
Retrieve the objective function value for multiple solutions
AnsweredHi, I would like to obtain multiple feasible solutions in my model with gap = 0.1. I have followed this post and I am able to obtain the solutions with this code: m.setParam('PoolSearchMode',2) m.s...