There is a MIP gap for every mixed-integer problem. The default MIP gap for Gurobi is 1e-4. However, you could do some settings to change this value. It can be any non-negative value.
Warning: Most of the time, a MIP gap of 1e-4 is perfectly fine. Please don’t change it unless you really need to.
All you need to do is to add one line after you creat the Gurobi model. Let’s say you name the model as MyModel using GRBModel MyModel = GRBModel(env);, and you would like the new MIP gap to be 0.01, then you just need to add the following line after you create the Gurobi model:
MyModel.set(GRB_DoubleParam_MIPGap, 0.01);
There are also other parameters that you could set in Gurobi: https://www.gurobi.com/documentation/9.0/refman/parameters.html
The variable type of the parameter MIPgap is double. There are also other types of parameters, like int and string. Here is the guidance for setting other types of parameters: https://www.gurobi.com/documentation/9.0/refman/cpp_model_set.html#cppmethod:GRBModel::set
Some additional examples on parameter setting and querying: https://www.gurobi.com/documentation/9.0/refman/cpp_parameter_examples.html#C++ParameterExamples