/// <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; }
private void AddCurrentSituationToTrace() { var step = new SimulationTraceStep(); AddState(step); AddChoices(step); var evaluatedCompilableFormulas = EvaluateCompilableFormulas(); AddEvaluatedCompilableFormulas(step, evaluatedCompilableFormulas); UpdateNormalizedFormulaSatisfactionCount(evaluatedCompilableFormulas); _simulationTrace.Add(step); }
private void AddEvaluatedCompilableFormulas(SimulationTraceStep step, StateFormulaSet evaluatedCompilableFormulas) { step.EvaluatedNormalizedFormulas = evaluatedCompilableFormulas; }
private void AddChoices(SimulationTraceStep step) { step.Choices = _choiceResolver.GetChoices().ToArray(); }