Ejemplo n.º 1
0
    public override void Aggregate(Measurement.Trial data)
    {
        long RT1    = 0;
        long RT2    = 0;
        int  CRESP  = -1;
        int  clicks = 0;
        int  RESP   = -1;

        for (int i = 0; i < data.Interaktionen.Count; ++i)
        {
            if (data.Interaktionen[i] is Measurement.Optionsauswahl)
            {
                clicks++;
                if (RT1 == 0)
                {
                    RT1 = data.Interaktionen[i].Zeitpunkt;
                }
                RT2   = data.Interaktionen[i].Zeitpunkt;
                CRESP = (data.Interaktionen[i] as Measurement.Optionsauswahl).CRESP ? 1 : 0;
                RESP  = (data.Interaktionen[i] as Measurement.Optionsauswahl).Nummer;
            }
        }

        var z2 = new StringBuilder();

        z2.Append(data.Name);
        z2.AppendFormat(",{0},{1},{2},{3},{4},{5}", RT1, RT2, data.Dauer, clicks, RESP, CRESP);
        results.Add(z2);
    }
Ejemplo n.º 2
0
    public override void Aggregate(Measurement.Trial data)
    {
        long[] RT       = new long[MaxIterations];
        long   RT_total = 0;
        int    attempts = Iteration;
        int    CRESP    = IsSolved ? 1 : 0;

        //if (!IsSolved)
        //    attempts = 4;


        Vector2 coords = new Vector2();

        if (Solution.Item2 != null)
        {
            coords = Solution.Item2.transform.position;
        }

        int clicks = 0;

        for (int i = 0; i < data.Interaktionen.Count; ++i)
        {
            if (data.Interaktionen[i] is Measurement.Optionsauswahl)
            {
                if (clicks > Iteration)
                {
                    throw new Exception("Collected more Selections than Iterations in a GreenStabilityTrial");
                }

                RT[clicks] = data.Interaktionen[i].Zeitpunkt - SimulationDuration * clicks;
                RT_total   = RT[clicks];

                clicks++;
            }
        }

        for (int i = Iteration - 1; i > 0; --i)
        {
            RT[i] -= RT[i - 1];
        }


        var z2   = new StringBuilder();
        var info = System.Globalization.CultureInfo.InvariantCulture;

        z2.AppendFormat("{0},{1},{2},({3};{4}),{5},{6},{7},{8}", Solution.Item1, CRESP, attempts, coords.x.ToString("#0.00", info), coords.y.ToString("#0.00", info), RT[0], RT[1], RT[2], RT_total);
        results.Add(z2);
    }
Ejemplo n.º 3
0
 /// Implements data->string conversion for the results.csv
 public virtual void Aggregate(Measurement.Trial data)
 {
 }