Function Utils::addSparseConstraints
Defined in File utils.h
Function Documentation
-
void Utils::addSparseConstraints(const arma::sp_mat &A, const arma::vec &b, GRBVar *x, const std::string &basename, GRBModel *model, int sense, GRBVar *z)
Create constraints for a given
model
given the matrixA
, the RHS vectorb
, the variablesx
, and an additional RHS of variablesz
. The resulting constraints read: \(Ax \quad (sense) \quad b+z\)- Parameters
A – The input sparse matrix of LHS
b – The input vector of RHS
x – The input variables
basename – The basename of these constraints
model – A pointer to the model
sense – As in Gurobi.
z – Additional RHS of variables