private List <MentalModel> ReadMentalModels() { SkipUntilConfiguration("MentalModelAttributes"); var agentArchetype = new InputVar <string>("AgentArchetype"); var name = new InputVar <string>("Name"); var modifiable = new InputVar <bool>("Modifiable"); var maxNumberOfDecisionOptions = new InputVar <int>("MaxNumberOfDecisionOptions"); var decisionOptionGoalRelationship = new InputVar <string>("DecisionOptionGoalRelationship"); var associatedWithGoals = new InputVar <string>("AssociatedWithGoals"); var consequentValueRange = new InputVar <string>("ConsequentValueRange"); var consequentRound = new InputVar <int>("ConsequentRound"); // Debugger.Launch(); var mentalModels = new List <MentalModel>(); while (CurrentName != "DecisionOptionAttributes") { var stringReader = new StringReader(CurrentLine); var mentalModel = new MentalModel(); ReadValue(agentArchetype, stringReader); mentalModel.AgentArchetype = agentArchetype.Value; ReadValue(name, stringReader); mentalModel.Name = name.Value; ReadValue(modifiable, stringReader); mentalModel.Modifiable = modifiable.Value; ReadValue(maxNumberOfDecisionOptions, stringReader); mentalModel.MaxNumberOfDecisionOptions = maxNumberOfDecisionOptions.Value; ReadValue(decisionOptionGoalRelationship, stringReader); mentalModel.DecisionOptionGoalRelationship = decisionOptionGoalRelationship.Value; ReadValue(associatedWithGoals, stringReader); mentalModel.AssociatedWithGoals = associatedWithGoals.Value; if (stringReader.Index < CurrentLine.Length) { ReadValue(consequentValueRange, stringReader); mentalModel.ConsequentValueRange = consequentValueRange.Value; ReadValue(consequentRound, stringReader); mentalModel.ConsequentRound = consequentRound.Value; } mentalModels.Add(mentalModel); GetNextLine(); } return(mentalModels); }
public void detachMentalModel() { externalMentalModel = null; }
public void attachMentalModel(MentalModel model) { externalMentalModel = model; }