Examples of SimulationsZeit


Examples of fmg.fmg8.umgebung2D.SimulationsZeit

     * Startet die Simulation.
     *
     * @param evol  Ob evolviert werden soll.
     */
    private void simStarten(final boolean evol) {
        SimulationsZeit simZ;
        Vis aktVis = this.aktGrph;
        String lauf;
        Vis[] visGr = new Vis[this.graphen.size()];
        int i = 0;
        Iterator<Vis> it = this.graphen.iterator();
        while (it.hasNext()) {
            visGr[i] = (Vis) it.next();
            i++;
        }
       
        this.setzeSimLf(true);
        this.pars.setEvolution(evol);
        this.pars.setBezier(
                fmg.fmg8.graphVis.zeichenModi.Konstanten.BEZIER_ZAHL_SCHNELL);
       
        this.pars.setPNGAutSp(false);
        this.speichereAlleGraphen(Messages.getString("Vis.All"));
        this.pars.setPNGAutSp(true);
        this.selGraph(aktVis);

        if (evol) {
            lauf = "Evolution";
        } else {
            lauf = "Simulation";
        }
       
        this.simGUI = new GuiSimulation(lauf
                                            + " ["
                                            + this.graphen.size()
                                            + " Robots]",
                                        this.sensFenster,
                                        this,
                                        this.pars);

        simZ = new SimulationsZeit(
                this.pars,
                this.simGUI,
                visGr,
                DynFactory.getKonstDyn(
                        this.pars.getDynArt(),
View Full Code Here

Examples of fmg.fmg8.umgebung2D.SimulationsZeit

        }
       
    /*
     * Erzeugt eine Simulationsumgebung, in der die Aufnahme angezeigt wird:
     */
        SimulationsZeit simZ;
        int size = robs.length;
       
        String[][] vAutStd  = new String[size][];
        String[][] tAutStd  = new String[size][];
        String[][] vAut  = new String[size][];
        String[][] tAut  = new String[size][];
        int[] identitaeten  = new int[size];
        Vektor2D[] positionen = new Vektor2D[size];
        double[] winkel     = new double[size];
        Vektor2D[] versch;
        Vektor2D[] neuVersch;
        int[][] fitness = new int[size][];
        Condition[][] conds = new Condition[size][];
       
        Vis[] visGr = new Vis[this.graphen.size()];
       
        int i = 0;
        Iterator<Vis> it = this.graphen.iterator();
        while (it.hasNext()) {
            visGr[i] = it.next();
           
            for (int j = 0; j < robs.length; j++) {
                if (visGr[i].getRob().getId() == robs[j].getId()) {
                    vAutStd[i] = robs[j].getVStdCodes();
                    vAut[i] = robs[j].getVCodes();
                    tAutStd[i] = robs[j].getTStdCodes();
                    tAut[i] = robs[j].getTCodes();
                    fitness[i] = robs[j].getFitness();
                    identitaeten[i] = robs[j].getId();
                    positionen[i] = robs[j].getPosition();
                    winkel[i] = robs[j].getWinkel();
                    conds[i] = new Condition[robs[j].getConds().length];
                    for (int k = 0; k < robs[j].getConds().length; k++) {
                        conds[i][k] = robs[j].getConds()[k];
                    }
                    break;
                }
            }
            i++;
        }
           
        // Erzeugt eine neue Simulation, falls noch keine erzeugt wurde.
        if (this.guiSim == null) {
            this.parsAufn.setAufnSp(false);
            this.parsAufn.setEndlos(true);
            this.parsAufn.setEvolution(false);
            this.parsAufn.setVerzoegerung(Long.MAX_VALUE);
           
            this.guiSim = new GuiSimulation("Snapshot"
                                                + " ["
                                                + this.graphen.size()
                                                + " robots]",
                                            null,
                                            this,
                                            this.parsAufn);
   
            simZ = new SimulationsZeit(this.parsAufn,
                                       this.guiSim,
                                       visGr,
                                       vAutStd,
                                       conds,
                                       identitaeten);
View Full Code Here

Examples of fmg.fmg8.umgebung2D.SimulationsZeit

        }
       
    /*
     * Erzeugt eine Simulationsumgebung, in der die Aufnahme angezeigt wird:
     */
        SimulationsZeit simZ;
        int size = robs.length;
       
        String[][] vAutStd  = new String[size][];
        String[][] tAutStd  = new String[size][];
        String[][] vAut  = new String[size][];
        String[][] tAut  = new String[size][];
        int[] identitaeten  = new int[size];
        Vektor2D[] positionen = new Vektor2D[size];
        double[] winkel     = new double[size];
        Vektor2D[] versch;
        Vektor2D[] neuVersch;
        int[][] fitness = new int[size][];
        Condition[][] conds = new Condition[size][];
       
        Vis[] visGr = new Vis[this.graphen.size()];
       
        int i = 0;
        Iterator<Vis> it = this.graphen.iterator();
        while (it.hasNext()) {
            visGr[i] = it.next();
           
            for (int j = 0; j < robs.length; j++) {
                if (visGr[i].getRob().getId() == robs[j].getId()) {
                    vAutStd[i] = robs[j].getVStdCodes();
                    vAut[i] = robs[j].getVCodes();
                    tAutStd[i] = robs[j].getTStdCodes();
                    tAut[i] = robs[j].getTCodes();
                    fitness[i] = robs[j].getFitness();
                    identitaeten[i] = robs[j].getId();
                    positionen[i] = robs[j].getPosition();
                    winkel[i] = robs[j].getWinkel();
                    conds[i] = new Condition[robs[j].getConds().length];
                    for (int k = 0; k < robs[j].getConds().length; k++) {
                        conds[i][k] = robs[j].getConds()[k];
                    }
                    break;
                }
            }
            i++;
        }
               
        if (this.guiSim == null) {
            this.parsAufn.setAufnSp(false);
            this.parsAufn.setEndlos(true);
            this.parsAufn.setEvolution(false);
            this.parsAufn.setVerzoegerung(Long.MAX_VALUE);
           
            this.guiSim = new GuiSimulation("Snapshot"
                                                + " ["
                                                + this.graphen.size()
                                                + " Roboter]",
                                            null,
                                            this,
                                            this.parsAufn);
   
            simZ = new SimulationsZeit(this.parsAufn,
                                       this.guiSim,
                                       visGr,
                                       vAutStd,
                                       conds,
                                       identitaeten);
View Full Code Here

Examples of fmg.fmg8.umgebung2D.SimulationsZeit

     * Startet die Simulation.
     *
     * @param evol  Ob evolviert werden soll.
     */
    private void simStarten(final boolean evol) {
        SimulationsZeit simZ;
        Vis aktVis = this.aktGrph;
        String lauf;
        Vis[] visGr = new Vis[this.graphen.size()];
        int i = 0;
        Iterator<Vis> it = this.graphen.iterator();
        while (it.hasNext()) {
            visGr[i] = (Vis) it.next();
            i++;
        }
       
        this.setzeSimLf(true);
        this.pars.setEvolution(evol);
        this.pars.setBezier(
                fmg.fmg8.graphVis.zeichenModi.Konstanten.BEZIER_ZAHL_SCHNELL);
       
        this.pars.setPNGAutSp(false);
        this.speichereAlleGraphen(Messages.getString("Vis.All"));
        this.pars.setPNGAutSp(true);
        this.selGraph(aktVis);

        if (evol) {
            lauf = "Evolution";
        } else {
            lauf = "Simulation";
        }
       
        this.simGUI = new GuiSimulation(lauf
                                            + " ["
                                            + this.graphen.size()
                                            + " Robots]",
                                        this.sensFenster,
                                        this,
                                        this.pars);

        simZ = new SimulationsZeit(this.pars, this.simGUI, visGr);
        this.simGUI.setVisible(true);
        this.simGUI.registriereTakt(simZ);
        this.setVisible(false);
        this.simGUI.simStarten();
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.