Esempio n. 1
0
 public Message(Actor sender, SubSystem recipient, double length)
 {
     this.sender         = sender;
     this.recipient      = recipient;
     daysSinceSent       = 0;
     answered            = false;
     answerAssumed       = false;
     messageResponseTime = length;
 }
Esempio n. 2
0
 public Actor(SubSystem subSystem, double totalmessagetime, double centralization, double assumptionchance, double messageResponseRate, double assumptionaccuracy, double assumptioneffect, double experience)
 {
     this.subSystem = subSystem;
     this.totalMessageResponseTime = totalmessagetime;
     this.centralization           = centralization;
     this.assumptionChance         = assumptionchance;
     this.messageResponseRate      = messageResponseRate;
     this.assumptionAccuracy       = assumptionaccuracy;
     this.assumptionEffect         = assumptioneffect;
     this.experience = experience;
 }
Esempio n. 3
0
        // Build the data
        public void populate()
        {
            while (subSystems.data.ReadNextRecord())
            {
                SubSystem sub = new SubSystem(subSystems.data["name"], false);
                subSystemList.Add(subSystems.data["name"], sub);
            }

            while (mainData.data.ReadNextRecord())
            {
                SubSystem sub = subSystemList[mainData.data["subsystem"]];
                double    totalmessagetime = Convert.ToDouble(mainData.data["totalmessageresponsetime"]);
                double    centralization   = DataReader.getProbabilityFromScale(mainData.data["centralization"], 1, 5);
                double    assumptions      = DataReader.getProbabilityFromScale(mainData.data["assumptions"], 1, 5);
                // double messageresponserate = DataReader.getProbabilityFromScale(mainData.data["messageresponserate"], 1, 5) + 0.5;
                double messageresponserate = Convert.ToDouble(mainData.data["messageresponserate"]);
                double assumptionaccuracy  = DataReader.getProbabilityFromScale(mainData.data["assumptionaccuracy"], 1, 5);
                double assumptioneffect    = DataReader.getProbabilityFromScale(mainData.data["assumptioneffect"], 1, 5);
                double tasktime            = Convert.ToDouble(mainData.data["tasktime"]);
                double experience          = DataReader.getProbabilityFromScale(mainData.data["experience"], 1, 5);

                sub.setTime(tasktime);

                Actor actor = new Actor(sub, totalmessagetime, centralization, assumptions, messageresponserate, assumptionaccuracy, assumptioneffect, experience);
                actorsList.Add(actor);
                actor.resetDay();

                // Go through all the subsystems
                foreach (KeyValuePair <String, SubSystem> kvp in subSystemList)
                {
                    SubSystem subOther = kvp.Value;
                    // Get the subSystem the actor is assigned to
                    SubSystem subActor = subSystemList[mainData.data["subsystem"]];
                    // Get the dependency the actors subSystem has on the other subSystem
                    double dependency = Convert.ToDouble(mainData.data["subsystemdependency [" + subOther.name + "]"]);
                    // Store it
                    //if (subOther != subActor)
                    //{
                    subSystemList[mainData.data["subsystem"]].subSystemDependencies.Add(kvp.Value, dependency);
                    //}
                }
            }
        }
Esempio n. 4
0
 // Gets the dependency THIS subsystem has on the passed subsystem
 public double getDependencyOnSubSystem(SubSystem sub)
 {
     return(subSystemDependencies[sub]);
 }