private void LoadSettings() { DisplayButtons(); #region Knowledge tbKnowledgeLength.Text = "50"; cbBinaryKnowledge.Checked = _mainOrganization.Models.Generator == RandomGenerator.RandomBinary; #endregion #region Learning cbLearningOn.Checked = true; tbMicroLearningAgentRate.Text = "1"; cbHasInitialKnowledge.Checked = _mainOrganization.Templates.Human.Cognitive.KnowledgeAndBeliefs .HasInitialKnowledge; cbInitialKnowledgeLevel.Items.AddRange(KnowledgeLevelService.GetNames()); cbInitialKnowledgeLevel.SelectedItem = KnowledgeLevelService.GetName(_mainOrganization.KnowledgeLevel); cbHasKnowledge.Checked = _mainOrganization.Templates.Human.Cognitive.KnowledgeAndBeliefs.HasKnowledge; tbKnowledgeThreshold.Text = _mainOrganization.Murphies.IncompleteKnowledge.ThresholdForReacting .ToString(CultureInfo.InvariantCulture); tbTimeToLive.Text = _mainOrganization.Templates.Human.Cognitive.InternalCharacteristics.TimeToLive.ToString( CultureInfo.InvariantCulture); tbLearnRate.Text = _mainOrganization.Templates.Human.Cognitive.TasksAndPerformance.LearningRate.ToString(CultureInfo .InvariantCulture); tbLearnByDoingRate.Text = _mainOrganization.Templates.Human.Cognitive.TasksAndPerformance.LearningByDoingRate.ToString( CultureInfo.InvariantCulture); tbTaskCostFactor.Text = _mainOrganization.Murphies.IncompleteKnowledge.CostFactorOfGuessing .ToString(CultureInfo.InvariantCulture); cbCanSendKnowledge.Checked = _mainOrganization.Templates.Human.Cognitive.MessageContent.CanSendKnowledge; cbCanReceiveKnowledge.Checked = _mainOrganization.Templates.Human.Cognitive.MessageContent.CanReceiveKnowledge; // Email tbMinKnowledge.Text = _mainOrganization.Templates.Human.Cognitive.MessageContent.MinimumKnowledgeToSendPerBit.ToString( CultureInfo.InvariantCulture); tbMinBitsKnowledge.Text = _mainOrganization.Templates.Human.Cognitive.MessageContent.MinimumNumberOfBitsOfKnowledgeToSend .ToString(CultureInfo.InvariantCulture); tbMaxBitsKnowledge.Text = _mainOrganization.Templates.Human.Cognitive.MessageContent.MaximumNumberOfBitsOfKnowledgeToSend .ToString(CultureInfo.InvariantCulture); tbMaxRateLearnable.Text = _mainOrganization.Communication.Email.MaxRateLearnable.ToString(CultureInfo.InvariantCulture); #endregion #region Forgetting cbForgettingOn.Checked = true; tbForgettingAgentRate.Text = "1"; tbForgettingMean.Text = _mainOrganization.Templates.Human.Cognitive.InternalCharacteristics.ForgettingMean.ToString( CultureInfo.InvariantCulture); cgForgettingStdDev.Items.AddRange(GenericLevelService.GetNames()); cgForgettingStdDev.SelectedItem = GenericLevelService.GetName(_mainOrganization.Templates.Human.Cognitive.InternalCharacteristics .ForgettingStandardDeviation); cbPartialForgetting.Checked = _mainOrganization.Templates.Human.Cognitive.InternalCharacteristics .PartialForgetting; tbPartialForgettingRate.Text = _mainOrganization.Templates.Human.Cognitive.InternalCharacteristics.PartialForgettingRate .ToString(CultureInfo.InvariantCulture); tbMinimRemainningLevel.Text = _mainOrganization.Templates.Human.Cognitive.InternalCharacteristics.MinimumRemainingKnowledge .ToString(CultureInfo.InvariantCulture); switch (_mainOrganization.Templates.Human.Cognitive.InternalCharacteristics.ForgettingSelectingMode) { case ForgettingSelectingMode.Random: rbICForgettingSelectingRandomMode.Checked = true; break; case ForgettingSelectingMode.Oldest: rbICForgettingSelectingOldestMode.Checked = true; break; default: throw new ArgumentOutOfRangeException(); } #endregion }
private void LoadSettings() { DisplayButtons(); InfluenceModelOn.Checked = _mainOrganization.Models.Influence.On; InfluenceRateOfAgentsOn.Text = _mainOrganization.Models.Influence.RateOfAgentsOn.ToString(CultureInfo.InvariantCulture); BeliefsModelOn.Checked = _mainOrganization.Models.Beliefs.On; BeliefsRateOfAgentsOn.Text = _mainOrganization.Models.Beliefs.RateOfAgentsOn.ToString(CultureInfo.InvariantCulture); tbWorkers.Text = _mainOrganization.WorkersCount.ToString(CultureInfo.InvariantCulture); tbInfluencers.Text = _mainOrganization.InfluencersCount.ToString(CultureInfo.InvariantCulture); tbBeliefs.Text = _mainOrganization.BeliefCount.ToString(CultureInfo.InvariantCulture); HasBeliefs.Checked = _mainOrganization.Templates.Human.Cognitive.KnowledgeAndBeliefs.HasBelief; ThresholdForReacting.Text = _mainOrganization.Murphies.IncompleteBelief.ThresholdForReacting .ToString(CultureInfo.InvariantCulture); #region Influencer InfluencerBeliefLevel.Items.AddRange(BeliefLevelService.GetNames()); InfluencerBeliefLevel.SelectedItem = BeliefLevelService.GetName(_mainOrganization.InfluencerTemplate .Cognitive .KnowledgeAndBeliefs.DefaultBeliefLevel); MinimumBeliefToSendPerBit.Text = _mainOrganization.InfluencerTemplate.Cognitive.MessageContent .MinimumBeliefToSendPerBit.ToString(CultureInfo.InvariantCulture); MinimumNumberOfBitsOfBeliefToSend.Text = _mainOrganization.InfluencerTemplate.Cognitive.MessageContent .MinimumNumberOfBitsOfBeliefToSend.ToString(CultureInfo.InvariantCulture); MaximumNumberOfBitsOfBeliefToSend.Text = _mainOrganization.InfluencerTemplate.Cognitive.MessageContent .MaximumNumberOfBitsOfBeliefToSend.ToString(CultureInfo.InvariantCulture); InfluentialnessMin.Text = _mainOrganization.InfluencerTemplate.Cognitive.InternalCharacteristics .InfluentialnessRateMin.ToString(CultureInfo.InvariantCulture); InfluentialnessMax.Text = _mainOrganization.InfluencerTemplate.Cognitive.InternalCharacteristics .InfluentialnessRateMax.ToString(CultureInfo.InvariantCulture); CanSendBeliefs.Checked = _mainOrganization.InfluencerTemplate.Cognitive.MessageContent.CanSendBeliefs; #endregion #region Worker MandatoryRatio.Text = _mainOrganization.Murphies.IncompleteBelief.MandatoryRatio.ToString(CultureInfo.InvariantCulture); RiskAversion.Items.AddRange(GenericLevelService.GetNames()); RiskAversion.SelectedItem = GenericLevelService.GetName(_mainOrganization.WorkerTemplate.Cognitive.InternalCharacteristics .RiskAversionLevel); BeliefWeight.Items.AddRange(BeliefWeightLevelService.GetNames()); BeliefWeight.SelectedItem = BeliefWeightLevelService.GetName(_mainOrganization.Models.BeliefWeightLevel); InfluenceabilityMin.Text = _mainOrganization.WorkerTemplate.Cognitive.InternalCharacteristics .InfluenceabilityRateMin.ToString(CultureInfo.InvariantCulture); InfluenceabilityMax.Text = _mainOrganization.WorkerTemplate.Cognitive.InternalCharacteristics .InfluenceabilityRateMax.ToString(CultureInfo.InvariantCulture); CanReceiveBeliefs.Checked = _mainOrganization.WorkerTemplate.Cognitive.MessageContent.CanReceiveBeliefs; HasInitialBeliefs.Checked = _mainOrganization.WorkerTemplate.Cognitive.KnowledgeAndBeliefs.HasInitialBelief; #endregion }
private void LoadSettings() { DisplayButtons(); #region Environment InitialCapacity.Text = _mainOrganization.InitialCapacity.ToString(CultureInfo.InvariantCulture); SwitchingContextCost.Text = _mainOrganization.SwitchingContextCost.ToString(CultureInfo.InvariantCulture); costOfTask.Text = _mainOrganization.CostOfTask.ToString(CultureInfo.InvariantCulture); numberTasksSent.Text = _mainOrganization.NumberOfTasks.ToString(CultureInfo.InvariantCulture); #endregion #region Task model CanPerformTask.Checked = _mainOrganization.Templates.Human.Cognitive.TasksAndPerformance.CanPerformTask; CanPerformTasksOnWeekends.Checked = _mainOrganization.Templates.Human.Cognitive.TasksAndPerformance .CanPerformTaskOnWeekEnds; LimitNumberTasks.Checked = _mainOrganization.Templates.Human.Cognitive.TasksAndPerformance.TasksLimit .LimitTasksInTotal; maxNumberTasks.Text = _mainOrganization.Templates.Human.Cognitive.TasksAndPerformance.TasksLimit.MaximumTasksInTotal .ToString(CultureInfo.InvariantCulture); LimitSimultaneousTasks.Checked = _mainOrganization.Templates.Human.Cognitive.TasksAndPerformance .TasksLimit .LimitSimultaneousTasks; MaxSimultaneousTasks.Text = _mainOrganization.Templates.Human.Cognitive.TasksAndPerformance.TasksLimit .MaximumSimultaneousTasks .ToString(CultureInfo.InvariantCulture); AgentCanBeIsolated.Items.AddRange(FrequencyLevelService.GetNames()); AgentCanBeIsolated.SelectedItem = FrequencyLevelService.GetName(_mainOrganization.Templates.Human .Cognitive.InteractionPatterns.AgentCanBeIsolated); #endregion #region Message model LimitMessages.Checked = _mainOrganization.Templates.Human.Cognitive.InteractionCharacteristics .LimitMessagesPerPeriod; MaxMessages.Text = _mainOrganization.Templates.Human.Cognitive.InteractionCharacteristics.MaximumMessagesPerPeriod .ToString(CultureInfo.InvariantCulture); LimitMessagesSent.Checked = _mainOrganization.Templates.Human.Cognitive.InteractionCharacteristics .LimitMessagesSentPerPeriod; MaxMessagesSent.Text = _mainOrganization.Templates.Human.Cognitive.InteractionCharacteristics .MaximumMessagesSentPerPeriod .ToString(CultureInfo.InvariantCulture); LimitMessagesReceived.Checked = _mainOrganization.Templates.Human.Cognitive .InteractionCharacteristics.LimitReceptionsPerPeriod; MaxMessagesReceived.Text = _mainOrganization.Templates.Human.Cognitive.InteractionCharacteristics.MaximumReceptionsPerPeriod .ToString(CultureInfo.InvariantCulture); CostToSend.Items.AddRange(GenericLevelService.GetNames()); CostToSend.Text = GenericLevelService.GetName(_mainOrganization.Communication.Email.CostToSendLevel); CostToReceive.Items.AddRange(GenericLevelService.GetNames()); CostToReceive.Text = GenericLevelService.GetName(_mainOrganization.Communication.Email.CostToReceiveLevel); #endregion }