Package fmg.fmg8.statistik

Examples of fmg.fmg8.statistik.PopSnapshot


            } else {
                automatSp = false;
            }
                this.schnappAuts++;
                this.schnappZyklen = 0;
                this.aufnahme.addPopSn(new PopSnapshot(
                                       this.umgebung.getAkteure(),
                                       this.umgebung.getGegVerschieb(),
                                       this.simZyklen,
                                       automatSp));
        }
View Full Code Here


                } else {
                    automatSp = false;
                }
   
                this.schnappAuts++;
                this.aufnahme.addPopSn(new PopSnapshot(
                        this.umgebung.getAkteure(),
                        this.umgebung.getGegVerschieb(),
                        this.simZyklen,
                        automatSp,
                        this.umgebung.getAktDynPixel()));
View Full Code Here

     * @param pops  Die Populationen.
     *
     * @return  Die extrahierten Fitnesswerte.
     */
    public static String extrahiereFit(final List<PopSnapshot> pops) {
        PopSnapshot pop;
        long popNummer;
        String sGes = "";
        Iterator<PopSnapshot> it = pops.iterator();
       
        // Erste Zeile.
        sGes = sGes + "SnapshotID";
       
        for (int i = 0;
             i < ((PopSnapshot) pops.get(0)).getRobSchnapp().length;
             i++) {
            sGes = sGes + ";Fitness (Roboter " + i + ")";
        }
        sGes = sGes + "\n";
       
        // Rest.
        while (it.hasNext()) {
            String s = "";
           
            pop = it.next();
            popNummer = pop.getId();
           
            s = s + popNummer;
               
            for (int i = 0; i < pop.getRobSchnapp().length; i++) {
                s = s
                    + ";"
                    + pop.getRobSchnapp()[i].getFitness()[0];
            }
           
            sGes = sGes + s + "\n";
        }

View Full Code Here

     * @return  Die Fitnesswerte der Roboter der Population als String.
     */
    public static String extrEinzelPopFitness(final Aufnahme a,
                                              final int      popNum) {
        String s = "";
        PopSnapshot p = (PopSnapshot) a.getPops().get(popNum);
        RobSnapshot[] robs = p.getRobSchnapp();
       
        for (int i = 0; i < robs.length; i++) {
            s = s + robs[i].getFitness();
            if (i < robs.length - 1) {
                s = s + "_";
View Full Code Here

     * @param pops  Die Populationen.
     *
     * @return  Die extrahierten Fitnesswerte.
     */
    public static String extrahiereFit(final List<PopSnapshot> pops) {
        PopSnapshot pop;
        long popNummer;
        String sGes = "";
        Iterator<PopSnapshot> it = pops.iterator();
       
        // Erste Zeile.
        sGes = sGes + "SnapshotID";
       
        for (int i = 0;
             i < ((PopSnapshot) pops.get(0)).getRobSchnapp().length;
             i++) {
            sGes = sGes + ";Fitness (Roboter " + i + ")";
        }
        sGes = sGes + "\n";
       
        // Rest.
        while (it.hasNext()) {
            String s = "";
           
            pop = it.next();
            popNummer = pop.getId();
           
            s = s + popNummer;
               
            for (int i = 0; i < pop.getRobSchnapp().length; i++) {
                s = s
                    + ";"
                    + pop.getRobSchnapp()[i].getFitness()[0];
            }
           
            sGes = sGes + s + "\n";
        }

View Full Code Here

     * @return  Die Fitnesswerte der Roboter der Population als String.
     */
    public static String extrEinzelPopFitness(final Aufnahme a,
                                              final int      popNum) {
        String s = "";
        PopSnapshot p = (PopSnapshot) a.getPops().get(popNum);
        RobSnapshot[] robs = p.getRobSchnapp();
       
        for (int i = 0; i < robs.length; i++) {
            s = s + robs[i].getFitness();
            if (i < robs.length - 1) {
                s = s + "_";
View Full Code Here

            final Translator[] trans) {

        this.aktVisTrans = new LinkedList<VisTrans>();
       
        if (this.rob == null) {
            this.rob = new Roboter(
                    0,
                    0,
                    0,
                    fmg.fmg8.umgebung2D.Konstanten.ROB_AUSDEHNUNG_X,
                    fmg.fmg8.umgebung2D.Konstanten.ROB_AUSDEHNUNG_Y,
View Full Code Here

        Iterator<Integer> it2;
        Iterator<Transition> it3;
        Knoten knot;
        Knoten knot1;
        Knoten knot2;
        Vektor2D koord1;
        Vektor2D koord2;

        if (!g.istLeer()) {
            final ArrayList<Knoten> knotenListe
                = new ArrayList<Knoten>(g.holAdj().values());
            int knAnzahl = knotenListe.size();
           
            if (knAnzahl < 2) {
                knAnzahl = 2;
            }
           
            int gitterX = Math.abs(this.rechts - this.links)
                          / (int) ((Math.ceil(Math.sqrt(knAnzahl))) - 1);
            int gitterY = Math.abs(this.unten - this.oben)
                          / (int) ((Math.ceil(Math.sqrt(knAnzahl))) - 1);

            int koordX = this.links;
            int koordY = this.oben;
           
            int kX;
            int kY;
            Transition bed;
            int folgeZustand;
            String bedingung;
            int xAusgleich;
            int zaehler = 0;
           
            // Knoten
            it = knotenListe.iterator();
            while (it.hasNext()) {
                knot = it.next();

                if (this.gesetzteKn.containsKey(knot.holeName())) {
                    kX = (int) this.gesetzteKn.get(knot.holeName()).x;
                    kY = (int) this.gesetzteKn.get(knot.holeName()).y;
                    this.setzeKnoten(knot,
                                     darstellung,
                                     kX,
                                     kY,
                                     (Knoten) ausgKn);

                    if (g.istStartZ(knot)) {
                        darstellung.hinzuPfeil(kX - 60,
                                               kY - 60,
                                               kX - 45,
                                               kY - 45,
                                               0.5,
                                               false);
                    }
                } else {
                    this.setzeKnoten(knot,
                                     darstellung,
                                     koordX,
                                     koordY,
                                     (Knoten) ausgKn);

                    this.gesetzteKn.put(knot.holeName(),
                                        new Vektor2D(koordX, koordY));

                    if (g.istStartZ(knot)) {
                        darstellung.hinzuPfeil(koordX - 60,
                                               koordY - 60,
                                               koordX - 45,
View Full Code Here

     *                werden soll.
     * @param x       X-Koordinate.
     * @param y       Y-Koordinate.
     */
    public void neueKoord(final Knoten knoten, final int x, final int y) {
        Vektor2D koord;

        if (this.gesetzteKn.containsKey(knoten.holeName())) {
            koord = this.gesetzteKn.get(knoten.holeName());
            koord.x = x;
            koord.y = y;
        } else {
            this.gesetzteKn.put(knoten.holeName(), new Vektor2D(x, y));
        }
    }
View Full Code Here

                    this.drehen.set(i, !this.drehen.get(i));
                    this.winkel.set(i, this.random.nextDouble() * 0.5);
                }
            }
            if (this.versch.get(i)) {
                Vektor2D vSchiebg = umg.getDynVersch()[this.waende.get(i)];
                vSchiebg.add(new Vektor2D(
                        this.xRicht.get(i),
                        this.yRicht.get(i)));
               
                if (null != umg.verschWand(
                        this.waende.get(i),
                        vSchiebg)) {
                    this.versch.set(i, !this.versch.get(i));
                    this.xRicht.set(i, this.random.nextDouble() * 0.5);
                    this.yRicht.set(i, this.random.nextDouble() * 0.5);
                }
            } else {
                Vektor2D vSchiebg = umg.getDynVersch()[this.waende.get(i)];
                vSchiebg.add(new Vektor2D(
                        -this.xRicht.get(i),
                        -this.yRicht.get(i)));
               
                if (null != umg.verschWand(
                        this.waende.get(i),
View Full Code Here

TOP

Related Classes of fmg.fmg8.statistik.PopSnapshot

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.