> model.A=sparse(Sg);
> model.rhs=[Fu; negFl];
> Gurobi says: Incorrect size(model.rhs)
>
> I'm trying to figure out what's wrong in the model.rhs and how to do it
> right.
Take a look at
http://www.gurobi.com/documentation/6.0/reference-manual/matlab_gurobi
It explains the requirements for model.rhs:
model.rhs: The right-hand side vector for the linear constraints. You
must specify one value for each row of A.
My guess is that the number of rows in A is not the same as the length
of your rhs vector. You can test this in MATLAB via the command:
>> size(model.A, 1) == size(model.rhs, 1)
Hope that helps,
Chris