Skip to content
Advertisement

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 time,

t: time

f: factory

i: block

yif : If blcok i is assgined at factory f 1 otherwise 0

Space must be available for the time the block is assembled before the block can be allocated to the factory.

JavaScript

Is there another way to express constraints? or How can i solve it enter image description here

Advertisement

Answer

Gurobi is for linear (and quadratic) models. You cannot use a variable as a limit for indexing (that would make the model nonlinear). In general, such constructs are reformulated using binary variables or indicator constraints. You may want to discuss this with your teacher/supervisor.

Advertisement