Category "linear-programming"

Why Gurobi generates slack variables?

I have the following LP: max -x4-x5-x6-x7 s.t x0+x1+x4=1 x2+x3+x5=1 x0+x2+x6=1 x1+x3+x7=1 Gurobi gives me the following base B=[1,0,2,10], in my mo

Efficiently get shadow prices in scipy linprog

I have a huge linprog problem of almost 1k variables and restrictions. I can calculate the solution with scipy.optimize.linprog(method='simplex') but I need sha

Cplex Python Gaps

How can I print the gaps(each iteration) like OPL's engine in Python? I want to keep the gaps like this: Nodes Cuts

Integer Programming for NNC

I'm trying to implement Integer Programming for Nearest Neighbor Classifier in python using cvxpy. Short intro Given a dataset of n points with a color (red or

Integer Programming for NNC

I'm trying to implement Integer Programming for Nearest Neighbor Classifier in python using cvxpy. Short intro Given a dataset of n points with a color (red or

How to convert the following if conditions to Linear integer programming constraints?

These are the conditions: if(x > 0) { y >= a; z <= b; } It is quite easy to convert the conditions into Linear Programming constraints if x we

Find a network flow solution which maximises the flow from a specific source to a specific sink

My problem is the following and has its roots in the modeling of a gas network. We model a gas network as a graph (E,V) with the sources being the major gas p

Multi-commodity Flow

I have just been working on chapters of questions from the DPV textbook for my exam preparation. For one of them, I'm having some trouble but I have made some p