예제 #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();
 }