Skip to content
Advertisement

Tag: gurobi

Absurd solution using gurobi python in regression

So I am new to gurobi and I decided to start working with it on a well known problem as regression. I found this official notebook, where an L0 penalized regression model was solved and I took just the part of the regression model out of it. However, when I solve this problem in gurobi, I get a really strange

Can’t i use the variable in a formula?

I’m coding a math model using gurobiy, but an error occurs. the error is ‘Var’ object cannot be interpreted as an integer. i tried to solve it using search, but I don’t have enough information. spi: required space of block i cft: area of factory f at t time s_Time : Start time p_Time : processing time c_Time : completion

Python passing callback function in a class

I have to try to move from the non-class-based coding style into class-based coding style, but facing an issue. The optimize() function takes a callback function mycallback(). The code works perfectly fine in Non-class-based method, but when I moved it to class-based method, I got an error “mycallback() takes exactly 3 arguments (1 given)”. What is the right way to

Advertisement