I have a LP problem with some hard constraints and some soft constraints. I know slack variables can be used to emulate soft constraints (add slack variables in soft constraints and have a penalty to objective function). But this increases the number of variables in my LP.
Is there any other way to add soft-constraints in gurobi?
Gurobi Optimizer has no special feature for soft constraints. You should add them via slack or surplus variables. And even if it did, it would simply add the slack or surplus variables to your model.