No. You can only add globally valid constraints inside a callback.
Articles in this section
- NumPy data type in constraint produces error "Constraint has no bool value"
- Constraint has no bool value (are you trying "lb <= expr <= ub"?)
- What is the model fingerprint in 9.0 log files?
- How do I export a model from Gurobi?
- Upload Files for Testing, Tuning, and Benchmarking
- Managing Infeasibility
- Where can I learn more about building optimization models?
- How do I model piecewise-linear functions?
- How do I model logical expressions?
- Can I add locally valid constraints in Gurobi MIP?