Ejemplo n.º 1
0
        protected override void SetUpOrganization()
        {
            base.SetUpOrganization();

            _mainOrganization.Models.Influence.On = InfluenceModelOn.Checked;
            _mainOrganization.Models.Beliefs.On   = BeliefsModelOn.Checked;

            _mainOrganization.WorkerTemplate.Cognitive.InternalCharacteristics.RiskAversionLevel =
                GenericLevelService.GetValue(RiskAversion.SelectedItem.ToString());

            #region influencer

            _mainOrganization.InfluencerTemplate.Cognitive.KnowledgeAndBeliefs.HasBelief          = HasBeliefs.Checked;
            _mainOrganization.InfluencerTemplate.Cognitive.MessageContent.CanSendBeliefs          = CanSendBeliefs.Checked;
            _mainOrganization.InfluencerTemplate.Cognitive.KnowledgeAndBeliefs.DefaultBeliefLevel =
                BeliefLevelService.GetValue(InfluencerBeliefLevel.SelectedItem.ToString());

            #endregion

            #region Worker

            _mainOrganization.WorkerTemplate.Cognitive.KnowledgeAndBeliefs.HasBelief        = HasBeliefs.Checked;
            _mainOrganization.WorkerTemplate.Cognitive.KnowledgeAndBeliefs.HasInitialBelief = HasInitialBeliefs.Checked;
            _mainOrganization.WorkerTemplate.Cognitive.MessageContent.CanReceiveBeliefs     = CanReceiveBeliefs.Checked;
            _mainOrganization.Models.BeliefWeightLevel =
                BeliefWeightLevelService.GetValue(BeliefWeight.SelectedItem.ToString());

            #endregion

            _mainOrganization.AddBeliefs();
        }
Ejemplo n.º 2
0
        protected override void SetUpOrganization()
        {
            base.SetUpOrganization();
            if (!cbLimitNumberOfTriesBelief.Checked)
            {
                _mainOrganization.Murphies.IncompleteBelief.LimitNumberOfTries = -1;
            }
            else
            {
                _mainOrganization.Murphies.IncompleteBelief.LimitNumberOfTries =
                    Convert.ToSByte(BeliefsRate.Text, CultureInfo.InvariantCulture);
            }

            if (!cbLimitNumberOfTriesKnowledge.Checked)
            {
                _mainOrganization.Murphies.IncompleteKnowledge.LimitNumberOfTries = -1;
            }
            else
            {
                _mainOrganization.Murphies.IncompleteKnowledge.LimitNumberOfTries =
                    Convert.ToSByte(tbMaxNumberOfTriesKnowledge.Text, CultureInfo.InvariantCulture);
            }

            if (!InformationLimitOfTries.Checked)
            {
                _mainOrganization.Murphies.IncompleteInformation.LimitNumberOfTries = -1;
            }
            else
            {
                _mainOrganization.Murphies.IncompleteInformation.LimitNumberOfTries =
                    Convert.ToSByte(InformationMaxOfTries.Text, CultureInfo.InvariantCulture);
            }

            _mainOrganization.Murphies.MultipleBlockers = cbMultipleBlockers.Checked;
            _mainOrganization.KnowledgeLevel            =
                KnowledgeLevelService.GetValue(KnowledgeLevel.SelectedItem.ToString());
            _mainOrganization.Templates.Human.Cognitive.KnowledgeAndBeliefs.DefaultBeliefLevel =
                BeliefLevelService.GetValue(BeliefsLevel.SelectedItem.ToString());

            _mainOrganization.Models.Learning.On = EmailSearching.Checked;

            _mainOrganization.Templates.Human.Cognitive.InteractionCharacteristics.PreferredCommunicationMediums =
                EmailComm.Checked ? CommunicationMediums.Email : CommunicationMediums.FaceToFace;


            var scenario = TimeBasedScenario.CreateInstance(_environment);

            scenario.NumberOfSteps = ushort.Parse(tbSteps.Text, CultureInfo.InvariantCulture);
            AddScenario(scenario);


            _mainOrganization.AddKnowledge();
        }