protected override IVariable InternalCreate(string name, Domain domain)
        {
            var variable = new OrToolsVariable
            {
                Name        = name,
                Domain      = domain,
                MilpManager = this
            };

            switch (domain)
            {
            case Domain.AnyInteger:
            case Domain.AnyConstantInteger:
                variable.Variable = Solver.MakeIntVar(double.MinValue, double.MaxValue, name);
                break;

            case Domain.AnyReal:
            case Domain.AnyConstantReal:
                variable.Variable = Solver.MakeVar(double.MinValue, double.MaxValue, false, name);
                break;

            case Domain.PositiveOrZeroInteger:
            case Domain.PositiveOrZeroConstantInteger:
                variable.Variable = Solver.MakeIntVar(0, double.MaxValue, name);
                break;

            case Domain.PositiveOrZeroReal:
            case Domain.PositiveOrZeroConstantReal:
                variable.Variable = Solver.MakeVar(0, double.MaxValue, false, name);
                break;

            case Domain.BinaryInteger:
            case Domain.BinaryConstantInteger:
                variable.Variable = Solver.MakeIntVar(0, 1, name);
                break;

            default:
                throw new ArgumentOutOfRangeException(nameof(domain), domain, null);
            }

            return(variable);
        }