private void ShowModels() { foreach (Unit unit in Unit.All()) { ModelBehavior modelBehavior = unit.GetComponent <ModelBehavior>(); modelBehavior.ShowModel(); } }
public void Initialize() { // Connect to model model = GetComponent <ModelBehavior>(); // Open new file for writing and give it column names GetFileName(); writer = new StreamWriter(FileName, false); writer.WriteLine("Step, Time, PreyPop, PredPop, MutantPop, PreyInCaptureRange, PreyInCaptureRangeQuesting, PreyInCaptureRangeHandling, PreyConsumed, PredHandling, Polarization, Crowding, CrowdingQuesting, CrowdingHandling, CollectivePred, CollectivePrey, NumberOfGroups, MeanGroupSize, VarGroupSize, MaxGroupSize, NumberOfSingletonGroups, NumberOfMutantGroups, PreyInCaptureRangeMutant, LocalConspecificsMutant, LocalHeterospecificsMutant"); }
public void Initialize() { // Connect to model model = GetComponent <ModelBehavior>(); // Open new file for writing and give it column names // that match exactly the parameters // as shown in SaveNow method below GetFileName(); writer = new StreamWriter(FileName, false); writer.WriteLine("RunID, " + "MaxCommunitySize, " + "InitialPreyPopulationSize, " + "InitialPredPopulationSize, " + "InitialMutantPopulationSize, " + "TimeStep, " + "BirthRate, " + "CarryingCapacity, " + "InteractionRadius, " + "RepulsionRadius, " + "AttractionRadius, " + "AlignmentRadius, " + "CaptureRadius, " + "MaxTurnRate, " + "CaptureRate, " + "MutantAdvantage," + "ConversionProbability, " + "DeathRate," + "HandlingTime," + "MetabolicRate," + "PreyNoise," + "PredNoise," + "ArenaLength," + "ArenaLengthInBuckets," + "PreySpeed," + "PredSpeed," + "Pursuit," + "Avoidance," + "DeviantMutant" ); }
void Awake() { model = GetComponent <ModelBehavior> (); if (RecordData) { if (!Directory.Exists(model.OutputPath)) { System.IO.Directory.CreateDirectory(model.OutputPath); } pararecorder = GetComponent <ParameterRecorder>(); datarecorder = GetComponent <DataRecorder>(); } ReplicatesCompleted = 0; HalfMaxSteps = MaxSteps / 2; SetupSimulation(); }
void Start() { model = GetComponent <ModelBehavior> (); GenerateTexture(); GenerateMesh(); }