Exemple #1
0
        /// <summary>
        ///     Update scenarii settings via the form
        ///     Add scenarios after calling base.UpdateSettings
        /// </summary>
        protected override void SetUpScenarii()
        {
            base.SetUpScenarii();
            var scenario = TimeBasedScenario.CreateInstance(_environment);

            scenario.NumberOfSteps = ushort.Parse(tbSteps.Text, CultureInfo.InvariantCulture);
            AddScenario(scenario);
        }
Exemple #2
0
        private void AddScenario(ushort max)
        {
            var scenario = TimeBasedScenario.CreateInstance(_environment);

            scenario.NumberOfSteps = 10;
            _simulation.AddScenario(scenario);
            _simulation.Iterations.Max = max;
        }
Exemple #3
0
        public void Initialize()
        {
            _environment.SetOrganization(_mainOrganization);
            _simulation.SetEnvironment(_environment);
            _environment.SetDebug(true);
            var scenario = TimeBasedScenario.CreateInstance(_environment);

            scenario.NumberOfSteps = NumberOfSteps;
            _simulation.AddScenario(scenario);
        }
        public void Initialize()
        {
            Knowledge.CreateInstance(_mainOrganization.ArtifactNetwork, _mainOrganization.Models, "1", 50);
            _environment.SetOrganization(_mainOrganization);
            _simulation.SetEnvironment(_environment);
            _environment.SetDebug(true);
            var scenario = TimeBasedScenario.CreateInstance(_environment);

            scenario.NumberOfSteps = 10;
            _simulation.AddScenario(scenario);
        }
Exemple #5
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();
        }
Exemple #6
0
        protected override void SetUpOrganization()
        {
            base.SetUpOrganization();
            Iterations.Max = ushort.Parse(NumberOfIterations.Text, CultureInfo.InvariantCulture);

            #region Task model

            _mainOrganization.Templates.Human.Cognitive.TasksAndPerformance.CanPerformTask =
                CanPerformTask.Checked;
            _mainOrganization.Templates.Human.Cognitive.TasksAndPerformance.CanPerformTaskOnWeekEnds =
                CanPerformTasksOnWeekends.Checked;
            _mainOrganization.Templates.Human.Cognitive.TasksAndPerformance.TasksLimit
            .LimitTasksInTotal = LimitNumberTasks.Checked;
            _mainOrganization.Templates.Human.Cognitive.TasksAndPerformance.TasksLimit
            .LimitSimultaneousTasks = LimitSimultaneousTasks.Checked;

            _mainOrganization.Templates.Human.Cognitive.InteractionPatterns.AgentCanBeIsolated =
                FrequencyLevelService.GetValue(AgentCanBeIsolated.SelectedItem.ToString());
            try
            {
                _mainOrganization.InitialCapacity = float.Parse(InitialCapacity.Text);
                InitialCapacity.BackColor         = SystemColors.Window;
            }
            catch (FormatException)
            {
                InitialCapacity.BackColor = Color.Red;
            }

            #endregion

            #region message

            _mainOrganization.Templates.Human.Cognitive.InteractionCharacteristics.LimitMessagesPerPeriod =
                LimitMessages.Checked;
            _mainOrganization.Templates.Human.Cognitive.InteractionCharacteristics.LimitMessagesSentPerPeriod =
                LimitMessagesSent.Checked;
            _mainOrganization.Templates.Human.Cognitive.InteractionCharacteristics.LimitReceptionsPerPeriod =
                LimitMessagesReceived.Checked;

            _mainOrganization.Communication.Email.CostToSendLevel =
                GenericLevelService.GetValue(CostToSend.SelectedItem.ToString());
            _mainOrganization.Communication.Email.CostToReceiveLevel =
                GenericLevelService.GetValue(CostToReceive.SelectedItem.ToString());

            #endregion

            var scenario = TimeBasedScenario.CreateInstance(_environment);
            scenario.NumberOfSteps = ushort.Parse(tbSteps.Text, CultureInfo.InvariantCulture);
            AddScenario(scenario);

            SetRandomLevel(cbRandomLevel.SelectedIndex);
            SetTimeStepType(TimeStepType.Daily);
        }
        public void Initialize()
        {
            _environment.SetOrganization(_mainOrganization);
            _simulation.SetEnvironment(_environment);
            _environment.IterationResult.KnowledgeAndBeliefResults.Frequency = TimeStepType.Weekly;
            _environment.IterationResult.OrganizationFlexibility.Frequency   = TimeStepType.Weekly;

            _environment.SetDebug(true);
            var scenario = TimeBasedScenario.CreateInstance(_environment);

            scenario.NumberOfSteps = NumberOfSteps;
            _simulation.AddScenario(scenario);
        }
Exemple #8
0
        protected override void SetUpOrganization()
        {
            base.SetUpOrganization();

            #region Knowledge

            _mainOrganization.Models.Generator = cbBinaryKnowledge.Checked
                ? RandomGenerator.RandomBinary
                : RandomGenerator.RandomUniform;

            #endregion

            #region Learning

            _mainOrganization.Models.Learning.On = cbLearningOn.Checked;
            _mainOrganization.Templates.Human.Cognitive.KnowledgeAndBeliefs.HasKnowledge =
                cbHasKnowledge.Checked;
            _mainOrganization.Templates.Human.Cognitive.KnowledgeAndBeliefs.HasInitialKnowledge =
                cbHasInitialKnowledge.Checked;
            _mainOrganization.KnowledgeLevel =
                KnowledgeLevelService.GetValue(cbInitialKnowledgeLevel.SelectedItem.ToString());

            _mainOrganization.Templates.Human.Cognitive.MessageContent.CanSendKnowledge =
                cbCanSendKnowledge.Checked;
            _mainOrganization.Templates.Human.Cognitive.MessageContent.CanReceiveKnowledge =
                cbCanReceiveKnowledge.Checked;

            #endregion

            #region Forgetting

            _mainOrganization.Models.Forgetting.On = cbForgettingOn.Checked;
            _mainOrganization.Templates.Human.Cognitive.InternalCharacteristics.ForgettingStandardDeviation =
                GenericLevelService.GetValue(cgForgettingStdDev.SelectedItem.ToString());
            _mainOrganization.Templates.Human.Cognitive.InternalCharacteristics.PartialForgetting =
                cbPartialForgetting.Checked;
            _mainOrganization.Templates.Human.Cognitive.InternalCharacteristics.ForgettingSelectingMode =
                rbICForgettingSelectingRandomMode.Checked
                    ? ForgettingSelectingMode.Random
                    : ForgettingSelectingMode.Oldest;

            #endregion

            _fullKnowledge = 0;
            var scenario = TimeBasedScenario.CreateInstance(_environment);
            scenario.NumberOfSteps = ushort.Parse(tbSteps.Text, CultureInfo.InvariantCulture);
            AddScenario(scenario);

            SetRandomLevel(cbRandomLevel.SelectedIndex);
            _mainOrganization.AddWiki();
        }
Exemple #9
0
        protected override void SetUpOrganization()
        {
            base.SetUpOrganization();
            Iterations.Max = ushort.Parse(NumberOfIterations.Text, CultureInfo.InvariantCulture);
            if (TimeBased.Checked)
            {
                var scenario = TimeBasedScenario.CreateInstance(_environment);
                scenario.NumberOfSteps = ushort.Parse(NumberOfSteps.Text);
                AddScenario(scenario);
            }

            if (TaskBased.Checked)
            {
                var scenario = TaskBasedScenario.CreateInstance(_environment);
                scenario.NumberOfTasks = ushort.Parse(NumberOfTasks.Text, CultureInfo.InvariantCulture);
                AddScenario(scenario);
            }

            if (MessageBased.Checked)
            {
                var scenario = MessageBasedScenario.CreateInstance(_environment);
                scenario.NumberOfMessages = ushort.Parse(NumberOfMessages.Text, CultureInfo.InvariantCulture);
                AddScenario(scenario);
            }

            cbIterations.Items.Clear();
            for (var i = 0; i < Iterations.Max; i++)
            {
                cbIterations.Items.Add(i);
            }

            SetEvents();

            #region models

            if (ModelsOn.Checked)
            {
                _mainOrganization.Models.SetOn(1);
                _mainOrganization.Models.Generator = RandomGenerator.RandomUniform;
            }
            else
            {
                _mainOrganization.Models.SetOff();
            }

            #endregion

            #region Murphies

            if (MurphiesOn.Checked)
            {
                _mainOrganization.Murphies.SetOn(1);
                _mainOrganization.Murphies.IncompleteKnowledge.CommunicationMediums = CommunicationMediums.Email;
                _mainOrganization.Murphies.IncompleteBelief.CommunicationMediums    = CommunicationMediums.Email;
            }
            else
            {
                _mainOrganization.Murphies.SetOff();
            }

            #endregion


            SetRandomLevel(cbRandomLevel.SelectedIndex);
            cbIterations.Enabled = false;
            _mainOrganization.AddKnowledge();
        }