public JsonDto([CanBeNull] JsonReference traitTagReference, StrGuid guid, int traitCountMax, int traitCountMin, string name)
 {
     TraitTagReference = traitTagReference;
     Guid          = guid;
     TraitCountMax = traitCountMax;
     TraitCountMin = traitCountMin;
     Name          = name;
 }
Пример #2
0
        public void AddEntry([NotNull] string name, double value, [NotNull] CalcLocation location, VariableAction variableAction,
                             [NotNull] TimeStep timeStep, StrGuid variableGuid)
        {
            var ee = new ExecutionEntry(name, value, location, variableAction,
                                        timeStep, variableGuid);

            _entries.Add(ee);
        }
Пример #3
0
 public GeographicLocHoliday([CanBeNull] int?pID, [CanBeNull] Holiday holiday, int geographicLocID, [NotNull] string connectionString,
                             [NotNull] string holidayname, StrGuid guid) : base(holidayname, TableName, connectionString, guid)
 {
     ID                   = pID;
     _holiday             = holiday;
     GeographicLocationID = geographicLocID;
     TypeDescription      = "Geographic Location Holiday";
 }
 public CalcVariable GetVariableByGuid(StrGuid variableGuid)
 {
     if (!_variablesByGuid.ContainsKey(variableGuid))
     {
         throw new LPGException("Could not find the variable with the guid:" + variableGuid);
     }
     return(_variablesByGuid[variableGuid]);
 }
 public CalcTransportationDeviceCategoryDto([NotNull] string name, int id, bool isLimitedToSingleLocation,
                                            StrGuid guid)
 {
     Name = name;
     ID   = id;
     IsLimitedToSingleLocation = isLimitedToSingleLocation;
     Guid = guid;
 }
 public STHouseholdTemplate([CanBeNull] int?pID, [NotNull] string connectionString, int settlementTemplateID, [NotNull] string name,
                            [CanBeNull] HouseholdTemplate householdTemplate, StrGuid guid) : base(name, TableName, connectionString, guid)
 {
     TypeDescription = "Settlement Template Household Templates";
     ID = pID;
     _householdTemplate    = householdTemplate;
     _settlementTemplateID = settlementTemplateID;
 }
 public LoadtypeOutcome([NotNull] string name, int calculationOutcomeID, [NotNull] string loadTypeName, double value,
                        [NotNull] string connectionString, StrGuid guid, [CanBeNull] int?pID = null) : base(name, pID, TableName, connectionString, guid)
 {
     _calculationOutcomeID = calculationOutcomeID;
     LoadTypeName          = loadTypeName;
     Value           = value;
     TypeDescription = "Loadtype Outcome";
 }
 public bool SimulateLoadtype(StrGuid guid)
 {
     if (_guids.Contains(guid))
     {
         return(true);
     }
     return(false);
 }
Пример #9
0
        public AvailabilityDataReferenceDto MakeNewReference([NotNull] string name, [NotNull][ItemNotNull] BitArray timearray)
        {
            StrGuid guid = Guid.NewGuid().ToStrGuid();
            Entry   e    = new Entry(name, guid, timearray);

            Entries.Add(e.Guid, e);
            return(new AvailabilityDataReferenceDto(name, guid));
        }
Пример #10
0
 public CalcEnergyStorageSignal([NotNull] string pName, double triggerOff, double triggerOn, double value,
                                CalcVariable calcVariable, StrGuid guid) : base(pName, guid)
 {
     _triggerOffPercent = triggerOff;
     _triggerOnPercent  = triggerOn;
     _value             = value;
     _calcVariable      = calcVariable;
 }
Пример #11
0
 public SiteLocation([CanBeNull] int?pID, [CanBeNull] Location location, int siteID, [NotNull] string connectionString,
                     [NotNull] string name, StrGuid guid) : base(name, TableName, connectionString, guid)
 {
     TypeDescription = "Site Location";
     ID        = pID;
     _location = location;
     SiteID    = siteID;
 }
Пример #12
0
 public CalcTransformationCondition([NotNull] string pName,
                                    [NotNull] CalcVariable calcVariable, double minValue,
                                    double maxValue, StrGuid guid) : base(pName, guid)
 {
     _minValue     = minValue;
     _maxValue     = maxValue;
     _calcVariable = calcVariable;
 }
Пример #13
0
 public CalcProfileDto([NotNull] string name, int id, ProfileType profileType, [NotNull] string dataSource, StrGuid guid)
 {
     Name        = name;
     ID          = id;
     ProfileType = profileType;
     DataSource  = dataSource;
     Guid        = guid;
 }
 public AffordanceEnergyUseEntry([NotNull] HouseholdKey hhkey, StrGuid loadTypeGuid, [NotNull] string affordanceName, [NotNull] string personName, [NotNull] string loadTypeName)
 {
     HouseholdKey   = hhkey;
     LoadTypeGuid   = loadTypeGuid;
     AffordanceName = affordanceName;
     PersonName     = personName;
     LoadTypeName   = loadTypeName;
     DictKey        = MakeKey(hhkey, loadTypeGuid, affordanceName, personName);
 }
Пример #15
0
 public ModularHouseholdTag([CanBeNull] int?pID, [CanBeNull] HouseholdTag householdTag, int chhID, [NotNull] string name,
                            [NotNull] string connectionString, StrGuid guid)
     : base(name, TableName, connectionString, guid)
 {
     ID              = pID;
     _householdTag   = householdTag;
     _chhID          = chhID;
     TypeDescription = "Modular Household Tag";
 }
        public void AddTravelRouteStep([NotNull] string stepName, [NotNull] CalcTransportationDeviceCategory deviceCategory,
                                       int stepNumber, double distanceInM, StrGuid guid)
        {
            CalcTravelRouteStep trs = new CalcTravelRouteStep(
                stepName, deviceCategory, stepNumber,
                distanceInM, guid, _vehiclePool, _calcRepo);

            Steps.Add(trs);
        }
Пример #17
0
        public void AddDeviceTuple([NotNull] string calcDeviceName, StrGuid calcDeviceGuid, [NotNull]
                                   CalcProfileDto newprof, [NotNull] string calcLoadTypeName, StrGuid calcLoadtypeGuid, decimal timeoffset,
                                   TimeSpan internalstepsize, double multiplier, double probability)
        {
            var calctup = new DeviceEnergyProfileTupleDto(calcDeviceName, calcDeviceGuid, newprof, calcLoadTypeName, calcLoadtypeGuid, timeoffset,
                                                          internalstepsize, multiplier, probability);

            Energyprofiles.Add(calctup);
        }
 public HouseTypeGenerator([CanBeNull] int?pID, int houseID, [CanBeNull] Generator gen, [NotNull] string connectionString,
                           [NotNull] string generatorName, StrGuid guid)
     : base(generatorName, TableName, connectionString, guid)
 {
     ID              = pID;
     HouseID         = houseID;
     _generator      = gen;
     TypeDescription = "House Type Generator";
 }
 public STTraitLimit([CanBeNull] int?pID, [NotNull] string connectionString, int settlementTemplateID, [NotNull] string name,
                     [CanBeNull] HouseholdTrait trait, int maximum, StrGuid guid) : base(name, TableName, connectionString, guid)
 {
     TypeDescription = "Settlement Template Household Trait Limit";
     ID       = pID;
     _trait   = trait;
     _maximum = maximum;
     _settlementTemplateID = settlementTemplateID;
 }
Пример #20
0
        public CalcVariableDto RegisterVariableIfNotRegistered([NotNull] Variable variable, [NotNull] Location location,
                                                               [NotNull] HouseholdKey householdKey,
                                                               [NotNull] LocationDtoDict locationDict)
        {
            StrGuid locGuid = locationDict.LocationDict[location].Guid;

            return(RegisterVariableIfNotRegistered(variable, location.PrettyName, locGuid,
                                                   householdKey));
        }
Пример #21
0
 public HHTemplateTag([CanBeNull] int?pID, [CanBeNull] HouseholdTag householdTag, int hhTemplateID, [NotNull] string name,
                      [NotNull] string connectionString, StrGuid guid)
     : base(name, TableName, connectionString, guid)
 {
     ID              = pID;
     _householdTag   = householdTag;
     _hhTemplateID   = hhTemplateID;
     TypeDescription = "Household Template Tag";
 }
Пример #22
0
 public CalcProfile([NotNull] string name, StrGuid guid, TimeSpan stepSize, ProfileType profileType, [NotNull] string dataSource) : base(name)
 {
     _guid        = guid;
     _stepSize    = stepSize;
     _profileType = profileType;
     TimeFactor   = 1;
     DataSource   = dataSource;
     StepValues   = new List <double>();
 }
Пример #23
0
 public TimeBasedProfile([NotNull] string name, [CanBeNull] int?pID, [NotNull] string connectionString, TimeProfileType timeProfileType,
                         [NotNull] string dataSource, StrGuid guid) : base(name, TableName, connectionString, guid)
 {
     _timeProfileType     = timeProfileType;
     ObservableDatapoints = new ObservableCollection <TimeDataPoint>();
     ID              = pID;
     _dataSource     = dataSource;
     TypeDescription = "Time profile";
 }
Пример #24
0
 public ChargingStationSet([NotNull] string name, [CanBeNull] int?pID, [NotNull] string connectionString,
                           [CanBeNull] string description, StrGuid guid) : base(name, TableName,
                                                                                connectionString, guid)
 {
     _description = description;
     ID           = pID;
     AreNumbersOkInNameForIntegrityCheck = true;
     TypeDescription = "ChargingStationSet";
 }
 public TraitTag([NotNull] string pName, [NotNull] string connectionString, TraitLimitType traitLimitType, TraitPriority tp,
                 StrGuid guid, [CanBeNull] int?pID = null)
     : base(pName, TableName, connectionString, guid)
 {
     ID              = pID;
     _traitPriority  = tp;
     TypeDescription = "Trait Tag";
     _traitLimitType = traitLimitType;
 }
 public AffordanceStandby([CanBeNull] IAssignableDevice assignableDevice, [CanBeNull] int?id, [CanBeNull] int?affordanceID,
                          [NotNull] string connectionString,
                          [NotNull] string deviceName, StrGuid guid) : base(deviceName, TableName, connectionString, guid)
 {
     _assignableDevice = assignableDevice;
     ID              = id;
     _affordanceID   = affordanceID;
     TypeDescription = "Affordance Standby Device";
 }
Пример #27
0
 public CalcProfile([NotNull] string name, StrGuid guid, [NotNull] List <double> newValues,
                    ProfileType profileType, [NotNull] string dataSource, double timeFactor = 1) : base(name)
 {
     _guid        = guid;
     TimeFactor   = timeFactor;
     StepValues   = newValues;
     _profileType = profileType;
     DataSource   = dataSource;
 }
 public HHTemplateEntryPerson([CanBeNull] int?pID, [CanBeNull] Person pPerson, int hhTemplateEntryID, [NotNull] string name,
                              [NotNull] string connectionString, StrGuid guid)
     : base(name, TableName, connectionString, guid)
 {
     ID                 = pID;
     _person            = pPerson;
     _hhTemplateEntryID = hhTemplateEntryID;
     TypeDescription    = "Household Generator Entry Person";
 }
 public STHouseholdDistributionTag([CanBeNull] int?pID, [CanBeNull] HouseholdTag tag, int stHouseholdDistributionID,
                                   [NotNull] string name,
                                   [NotNull] string connectionString, StrGuid guid) : base(name, TableName, connectionString, guid)
 {
     ID   = pID;
     _tag = tag;
     _stHouseholdDistributionID = stHouseholdDistributionID;
     TypeDescription            = "Settlement Template Distribution Tag";
 }
 public HHTemplateVacation([CanBeNull] int?pID, [CanBeNull] Vacation vacation, int hhTemplateID, [NotNull] string name,
                           [NotNull] string connectionString, StrGuid guid)
     : base(name, TableName, connectionString, guid)
 {
     ID              = pID;
     _vacation       = vacation;
     _hhTemplateID   = hhTemplateID;
     TypeDescription = "Household Template Vacations";
 }