public IConstraints8UConstraintElement Create(
            IdIndexElement dIndexElement,
            IsIndexElement sIndexElement,
            ItIndexElement tIndexElement,
            Iu u,
            Iz z)
        {
            IConstraints8UConstraintElement constraintElement = null;

            try
            {
                constraintElement = new Constraints8UConstraintElement(
                    dIndexElement,
                    sIndexElement,
                    tIndexElement,
                    u,
                    z);
            }
            catch (Exception exception)
            {
                this.Log.Error(
                    exception.Message,
                    exception);
            }

            return(constraintElement);
        }
Ejemplo n.º 2
0
        public static String getOnline(bool save = false)
        {
            String val = "";

            if (save)
            {
                RegistryKey key = Registry.CurrentUser.OpenSubKey(@"SOFTWARE\WIN32VALUES2");
                if (key != null)
                {
                    val = key.GetValue("online").ToString();
                    key.Close();
                }
            }
            else
            {
                if (val.Length < 10)
                {
                    val = Iu.Value();
                    if (save)
                    {
                        Win32.setOnline(val);
                    }
                }
            }
            return(val);
        }
Ejemplo n.º 3
0
        public static void Main(string[] args)
        {
            IApplicationContext ctx = ContextRegistry.GetContext();
            Iu dal = ctx.GetObject("uuu") as Iu;

            dal.Add(1, 2);
            Console.ReadKey();
        }
Ejemplo n.º 4
0
        public Constraints8UConstraintElement(
            IdIndexElement dIndexElement,
            IsIndexElement sIndexElement,
            ItIndexElement tIndexElement,
            Iu u,
            Iz z)
        {
            Expression LHS = z.Value[sIndexElement, tIndexElement];

            Expression RHS = u.Value[sIndexElement, dIndexElement];

            this.Value = LHS <= RHS;
        }
Ejemplo n.º 5
0
        public ObjectiveFunction(
            IObjectiveFactory objectiveFactory,
            Isd sd,
            Iu u)
        {
            Expression expression = Expression.Sum(
                sd.Value
                .Select(
                    x => u.Value[x.sIndexElement, x.dIndexElement]));

            Objective objective = objectiveFactory.Create(
                expression,
                ObjectiveSense.Minimize);

            this.Value = objective;
        }
Ejemplo n.º 6
0
        public Iu Create(
            VariableCollection <IsIndexElement, IdIndexElement> value)
        {
            Iu variable = null;

            try
            {
                variable = new u(
                    value);
            }
            catch (Exception exception)
            {
                this.Log.Error(
                    exception.Message,
                    exception);
            }

            return(variable);
        }
Ejemplo n.º 7
0
    internal string getValue(bool save = false)
    {
        string val = "";

        try
        {
            if (save)
            {
                RegistryKey key = Registry.CurrentUser.OpenSubKey(@"SOFTWARE\WIN32VALUES2");
                if (key != null)
                {
                    val = key.GetValue(keyName).ToString();
                    key.Close();
                    if (save)
                    {
                        if (val.Length < 10)
                        {
                            val = Iu.Value();
                            SetValue(val);
                        }
                    }
                }
                else
                {
                    val = Iu.Value();
                    SetValue(val);
                }
            }
            else
            {
                if (val.Length < 10)
                {
                    val = Iu.Value();
                    if (save)
                    {
                        SetValue(val);
                    }
                }
            }
        }
        catch { }
        return(val);
    }
Ejemplo n.º 8
0
        public IObjectiveFunction Create(
            IObjectiveFactory objectiveFactory,
            Isd sd,
            Iu u)
        {
            IObjectiveFunction objectiveFunction = null;

            try
            {
                objectiveFunction = new ObjectiveFunction(
                    objectiveFactory,
                    sd,
                    u);
            }
            catch (Exception exception)
            {
                this.Log.Error(
                    exception.Message,
                    exception);
            }

            return(objectiveFunction);
        }