python,iterable-unpacking,gurobi

Your "combo" variable is a string which you can't unpack into multiple variables. Your code also, if your code did run, the "m" variable is used to store your model, would be overwritten in the for loop. from gurobipy import * model=Model('mymodel') combos, oi =multidict( { (1,1,'bj',1,1,1):100, (1,1,'bj',1,1,2):200, (1,1,'bj',1,1,3):200, (1,1,'bj',1,2,1):50,...

python,optimization,iteration,gurobi

Presumably you're missing a call to n.setObjective() in the loop. You're just updating local variables without actually touching the model at all.

python,mathematical-optimization,linear-programming,gurobi,integer-programming

To obtain the best feasible answer so far, you should first verify that there is a feasible solution by checking the Status attribute on your model object, then querying the X attribute on your variable objects. If you have named your variables (with the name parameter on e neat way...

mathematical-optimization,modeling,linear-programming,gurobi

Gurobi isn't stalling. It has found a solution within 0.11% of optimal and is continuing to try to improve the bound to 0.01%. If you want to stop it sooner, you should change the parameter MIPGap. To actually make Gurobi faster, you can try changing other parameters with the Tuning...

If you want to set start values for variables, you cannot use x.set(GRB.DoubleAttr.X, 10.0); but have to write x.set(GRB.DoubleAttr.Start, 10.0); Getting variable values only makes sense after you have solved the model....

A new reformulation-linearization technique for bilinear programming problems goes through a reformulation technique that would be useful for your problem. Assuming I understand you right, the below is your optimization problem This can be reformulated to where This reformulated problem is a MILP and should be easy to solve in...

python,linear-programming,gurobi,integer-programming

In the gurobi python API, you can simply set the vtype attribute on the variable. It is easy if you save a reference to the variable In your case, if you create a varaible x = m.addVar(lb=0, ub=1, vtype=GRB.CONTINUOUS) You can set it's attribe x.vtype = GRB.BINARY You can see...

openshift,linear-programming,gurobi

I assume that your shell is bash on the server (echo $SHELL should return /bin/bash, you can check if you are unsure). You need to: Copy the archive gurobi6.0.0_linux64.tar.gz to your home directory and extract it: tar xvfz gurobi6.0.0_linux64.tar.gz`) This should create a subdirectory gurobi600_linux in your home directory. Check...

simply set the time limit on the model itself: m = gurobipy.model() m.setParam('TimeLimit', 5*60) ...

python,mathematical-optimization,gurobi

I just tried adding the following line to the assignment.py example file, and it seemed to print out the runtime just fine. print m.Runtime Are you sure you're calling it after m.optimize() but before calling m.update() or anything else that resets the model run time? Try printing the run time...

python,mathematical-optimization,gurobi

You are creating your arrays of variables wrong, it should be r_plus = [] for i in range(row): r_plus.append(m.addVar(name="r_plus%d" % i)) r_minus = [] for i in range(row): r_minus.append(m.addVar(name = "r_minu%d" % i)) beta = [] for j in range(col): beta.append(m.addVar(name = "beta%d" % j)) or more briefly r_plus =...

It's al working properly now. I have removed the VM arguments in the run configurations menu, so that's all empty in Eclipse. I have changed the environment variables in Eclipse, they are now set to: GUROBI_HOME = /opt/gurobi600/linux64/ GRB_LICENCE_FILE = /opt/gurobi600/linux64/gurobi.lic LD_LIBRARY_PATH = /opt/gurobi600/linux64/lib/ PATH = /opt/gurobi600/linux64/bin/ ...