Gauss's Principle with Inequality Constraints for Multi-agent Navigation and Control