コード例 #1
0
        /// <summary>
        ///   Adds the state to the simulator.
        /// </summary>
        private void AddState(SimulationTraceStep step)
        {
            var newState = new byte[RuntimeModel.StateVectorSize];

            fixed(byte *state = newState)
            {
                RuntimeModel.Serialize(state);
            }

            step.State = newState;
        }
コード例 #2
0
        private void AddCurrentSituationToTrace()
        {
            var step = new SimulationTraceStep();

            AddState(step);
            AddChoices(step);
            var evaluatedCompilableFormulas = EvaluateCompilableFormulas();

            AddEvaluatedCompilableFormulas(step, evaluatedCompilableFormulas);
            UpdateNormalizedFormulaSatisfactionCount(evaluatedCompilableFormulas);
            _simulationTrace.Add(step);
        }
コード例 #3
0
 private void AddEvaluatedCompilableFormulas(SimulationTraceStep step, StateFormulaSet evaluatedCompilableFormulas)
 {
     step.EvaluatedNormalizedFormulas = evaluatedCompilableFormulas;
 }
コード例 #4
0
 private void AddChoices(SimulationTraceStep step)
 {
     step.Choices = _choiceResolver.GetChoices().ToArray();
 }