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); }
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); }
public static void Main(string[] args) { IApplicationContext ctx = ContextRegistry.GetContext(); Iu dal = ctx.GetObject("uuu") as Iu; dal.Add(1, 2); Console.ReadKey(); }
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; }
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; }
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); }
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); }
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); }