public static void ClearTraces() { nextToSendForThisAgent = new Dictionary <Agent, Agent>(); agents = new List <Agent>(); amountOfPublicVariables = -1; TraceVariable.ClearTraces(); TraceOperator.ClearTraces(); TraceState.ClearTraces(); }
private static void AddOperator(List <TraceOperator> operators, int agentID, Agent agent, int opID, Action action, bool isPrivate) { int ownerID = Agent.getID(action.agent); bool myOperation = ownerID == agentID; //string opName = action.Name; string opName = action.Name.Replace("_", " "); int cost = 1; Dictionary <int, int> pre = new Dictionary <int, int>(); initializeDict(agentID, pre, action.HashPrecondition, myOperation, agent); Dictionary <int, int> eff = new Dictionary <int, int>(); initializeDict(agentID, eff, action.HashEffects, myOperation, agent); TraceOperator traceOperator = new TraceOperator(agentID, ownerID, opName, isPrivate, opID, cost, pre, eff); operators.Add(traceOperator); }
public void initializeOperators(List <Action> publicActions, List <Action> privateActions) { operators = TraceOperator.getOperators(agent, publicActions, privateActions); }