public main() { world = new World(); RequestsOfA = new double[1000, 3]; RequestsOfB = new double[1000, 3]; RequestsOfA.Initialize(); RequestsOfB.Initialize(); }
public Agent(double gama = 0.01, double beta = 0.50, double eta = 0.50, double stgama = 0.25, double rough = 0.1, double alpha = 0.50, double exploration = 1.0, string logfile = "agent.xls", bool modeltype = true) { world = new World(); LongTermTrust = new double[world.NO_OF_TRUSTEES]; ShortTermTrust = new double[world.NO_OF_TRUSTEES]; logfptr = new StreamWriter(logfile); //logfptr = fopen(logfile, "w+"); time = 0; Gama = gama; Beta = beta; Eta = eta; StGama = stgama; Exploration = exploration; Alpha = alpha; Rough = rough; TotalExperience = 0; TotalExploration = 0; TotalEnvChange = 0; AgentType = modeltype; if (AgentType == true) { logfptr.Write("Gama\t{0}\nBeta\t{1}\nEta\t{2}\n\n\n\n\n\n", Gama, Beta, Eta); logfptr.Write("Gama\t{0}\nBeta\t{1}\nEta\t{2}\n\n\n\n\n\n", Gama, Beta, Eta); logfptr.Write("time\t"); logfptr.Write("\tReq\t"); logfptr.Write("Exp\t"); } else if (AgentType == false) { logfptr.Write("Gama\t{0}\nBeta\t{1}\nEta\t{2}\nStGama\t{3}\nRough\t{4}\nAlpha\t{5}\nExploration\t{6}\n\n", Gama, Beta, Eta, StGama, Rough, Alpha, Exploration); logfptr.Write("time\t"); logfptr.Write("Env.Chan\t"); logfptr.Write("Exploration\t"); logfptr.Write("\tST1\tST2\tST3"); logfptr.Write("\tRP1\tRP2\tRP3\t"); logfptr.Write("\tRN\t"); logfptr.Write("\tReq\t"); logfptr.Write("Exp\t"); } for (int currentTrustee = 0; currentTrustee < world.NO_OF_TRUSTEES; currentTrustee++) { logfptr.Write("T{0}\t", currentTrustee + 1); } logfptr.WriteLine(); for (int currentTrustee = 0; currentTrustee < world.NO_OF_TRUSTEES; currentTrustee++) { ShortTermTrust[currentTrustee] = LongTermTrust[currentTrustee] = 0.0; } logfptr.Flush(); }
public RTDecisionMaking() { world=new World(); }
public Trustee(int tid, double std, double mean) { world = new World(); TrusteeID = (uint)tid; ExperienceStddev = std; ExperienceMean = mean; }