Package eas.simulation.spatial.sim2D.marbSimulation.endlAutomat.conditions

Examples of eas.simulation.spatial.sim2D.marbSimulation.endlAutomat.conditions.Condition


     * Adds a token to the condition.
     *
     * @param token  The token to add.
     */
    public void nextToken(final Integer token) {
        Condition cond, condL, condR;
       
        if (this.tokenIsInClasses(token, this.possibleClasses())) {
            this.actualData.add(token);
           
            // MiniOperand
View Full Code Here


    private void insertEdge(final int knotNam1,
                            final int knotNam2,
                            final EndlicherAutomat aut) {
        Knoten knot1 = aut.holeKnoten(knotNam1);
        Knoten knot2 = aut.holeKnoten(knotNam2);
        Condition c;
       
        if (knot1 == null) {
            this.insertNode(knotNam1, aut);
        }
        if (knot2 == null) {
View Full Code Here

        int quellKnotNam = qKnotNam, zielKnotNam = zKnotNam;
        Knoten knot1;
        Knoten knot2;
        List<Transition> vorhTrans;
        List<Condition> vorhConds;
        Condition c;
        Condition[] cZwisch;
        ArrayList<Integer> knListe;
       
        /*
         * Falls eine Kante zwischen den Knoten bereits existierte, erzeuge
         * eine Kante zwischen anderen (welchen?) Knoten... Zu überprüfen.
         */
        if (aut.holeKnoten(qKnotNam) != null
                && aut.holeKnoten(qKnotNam).getInfo() != null
                && aut.holeKnoten(qKnotNam).holeNachfolger().containsKey(
                        zielKnotNam)) {
            quellKnotNam = this.instrCounter;
            this.instrCounter++;
            zielKnotNam = this.instrCounter;
            this.instrCounter++;
           
            knListe = aut.getKnList();
            quellKnotNam = knListe.get(
                    StaticMethods.modZwischen(quellKnotNam, 0, knListe.size() - 1));
            zielKnotNam = knListe.get(
                    StaticMethods.modZwischen(zielKnotNam, 0, knListe.size() - 1));

            // Wenn immer noch eine Kante existiert, füge nichts ein.
            if (aut.holeKnoten(quellKnotNam) != null
                  && aut.holeKnoten(quellKnotNam).getInfo() != null
                  && aut.holeKnoten(quellKnotNam).holeNachfolger().containsKey(
                          zielKnotNam)) {
                StaticMethods.log(
                        StaticMethods.LOG_STAGE1,
                        "Ergänzungskante nicht eingefügt, da die ersten beiden"
                        + " Versuche bereits Kanten aufwiesen.",
                        this.pars);
                return;
            }
        }

        knot1 = aut.holeKnoten(quellKnotNam);
        knot2 = aut.holeKnoten(zielKnotNam);

        // Füge Knoten neu ein, falls sie noch nicht existieren.
        if (knot1 == null) {
            this.insertNode(quellKnotNam, aut);
            knot1 = aut.holeKnoten(quellKnotNam);
        }
        if (knot2 == null) {
            this.insertNode(zielKnotNam, aut);
            knot2 = aut.holeKnoten(zielKnotNam);
        }

        if (knot1.getInfo() == null || knot1.getInfo().getBeds().size() == 0) {
            c = new ConstLeaf(true);
        } else {
            int i = 0;
            vorhTrans = knot1.getInfo().getBeds();
            vorhConds = new ArrayList<Condition>(vorhTrans.size());

            for (Transition t : vorhTrans) {
                vorhConds.add(t.getCond());
            }
           
            cZwisch = new Condition[vorhConds.size()];
           
            for (Condition condition : vorhConds) {
                cZwisch[i] = StaticMethods.ausFormatBed(condition.formatted());
                cZwisch[i].negiere();
                i++;
            }
           
            c = cZwisch[0];
            for (int j = 1; j < cZwisch.length; j++) {
                c = new InnerNode(
                        c,
                        cZwisch[j],
                        eas.simulation.spatial.sim2D.marbSimulation.Konstanten.UND);
            }
        }
       
        c = c.simplify();
       
        // BO
//        System.out.println();
//        System.out.println(
//            aut.holeKnoten(quellKnotNam).getInfo().getBedingungen());
//        System.out.println(c);
//        c = c;
        // EO
       
        if (!c.equals(new ConstLeaf(false))) {
            /*
             * Achtung: Die folgende Instruktion macht alle vorherigen
             * Berechnungen für die Bedingung c nutzlos und überschreibt sie
             * mit "true". Das hat denselben Effekt wie wenn eine
             * komplementierende Bedingung eingefügt wird, ist aber sehr viel
View Full Code Here

        Integer aktName;
        Knoten[] knotenListe = new Knoten[rob.length];
        Knoten zwischKnoten;
        Integer kn1, kn2;
        Knoten zKnoten;
        Condition zCond;
        int aktion;
        int param;      
        int alt;
        boolean istStart;
        RobEA aktRob;
View Full Code Here

        int param;      
        int aktion;
        int anzRobs;
        int aktName;
        int[] fitness;
        Condition zCond;
        Integer kn1, kn2;
        Knoten zwischKnoten;
        boolean vorhandenAll;
        Iterator<Integer> it;
        Iterator<Integer> it1;
View Full Code Here

        Integer aktKnNum;
        Knoten aktKn;
        ZInfo info;
        Knoten zielKn;
        Integer zielKnNum;
        Condition aktBed;
        Condition neuBed = null;
        Condition zwischBed;
        int numOrig1, numOrig2;
        int idlBefehl;
        EndlicherAutomat[] endAs = new EndlicherAutomat[endAuts.length];
        LinkedList<Transition> trans;
        Transition tran;
        String[] args = {"log 4"};
       
        if (conds == null
                || endAuts.length != conds.length
                || endAuts.length == 0) {
            ParCollection parColl = GlobalVariables.getPrematureParameters();
            parColl.overwriteParameterList(args);
            StaticMethods.log(StaticMethods.LOG_ERROR,
                          "Gesamtautomat konnte nicht erzeugt werden.",
                          parColl);
        }
       
        for (int i = 0; i < endAs.length; i++) {
            endAs[i] = new EndlicherAutomat();
           
            if (params.getParValueBoolean("UseTranslatorWITHCompletingTransitions")) {
                endAs[i].generateFromSequence(
                        endAuts[i].erzeugeStringSeq(),
                        eas.simulation.spatial.sim2D.marbSimulation.translator.ConstantsTranslator.getStdTranslatorBE(params),
                        false, params);
            } else {
                endAs[i].generateFromSequence(
                        endAuts[i].erzeugeStringSeq(),
                        ConstantsTranslatorWOC.getStdTranslatorBE(params),
                        false, params);
            }
           
            if (endAs[i].istLeer()) {
                endAs[i].einfuegenKnoten(Integer.MAX_VALUE,
                        StaticMethods.posSuch(
                                eas.simulation.ConstantsSimulation.getBefehlNamenArray(params),
                                "stp"),
                        1,
                        1);
               
                endAs[i].setStart(endAs[i].holeKnoten(Integer.MAX_VALUE));
            }
        }
       
        // Neue Knoten zuordnen.
        for (int i = 0; i < endAs.length; i++) {
            knotZuord[i] = new HashMap<Integer, Integer>();
           
            knot = new ArrayList<Integer>(endAs[i].holAdj().keySet());
            it = knot.iterator();

            while (it.hasNext()) {
                aktKnNum = it.next();
                aktKn = endAs[i].holeKnoten(aktKnNum);
                info = aktKn.getInfo();
                neu.einfuegenKnoten(lfdNr,
                                    info.getAktion(),
                                    info.getParam(),
                                    info.getAlter());
               
                knotZuord[i].put(aktKnNum, lfdNr);
                lfdNr++;
            }
        }
       
        // Neue Kanten INTER Automaten zuordnen.
        for (int i = 0; i < endAs.length; i++) {
            zielKn = endAs[i].holeStartzustand();
           
            if (zielKn != null) {
                zielKnNum = (Integer) knotZuord[i].get(zielKn.holeName());
                neuBed = StaticMethods.ausFormatBed(conds[i].formatted());
                for (int j = 0; j < i; j++) {
                    zwischBed = StaticMethods.ausFormatBed(conds[j].formatted());
                    zwischBed.negiere();
                    neuBed = new InnerNode(neuBed,
                                           zwischBed,
                                           eas.simulation.spatial.sim2D.marbSimulation.Konstanten.UND);
                }
               
                for (int j = 0; j < endAs.length; j++) {
                    if (j != i) {
                        knot = new ArrayList<Integer>(
                                endAs[j].holAdj().keySet());
                        it = knot.iterator();
                       
                        while (it.hasNext()) {
                            aktKnNum = (Integer) knotZuord[j].get(it.next());
                            neu.einfuegKante(aktKnNum, zielKnNum, neuBed, 1);
                        }
                    }
                }
            }
        }

        // Neue Kanten INTRA Automaten zuordnen.
        for (int i = 0; i < endAs.length; i++) {
            knot1 = new ArrayList<Integer>(endAs[i].holAdj().keySet());
            it1 = knot1.iterator();
           
            while (it1.hasNext()) {
                numOrig1 = it1.next();
                aktKnNum = (Integer) knotZuord[i].get(numOrig1);
                aktKn = endAs[i].holeKnoten(numOrig1);
               
                if (aktKn.getInfo() != null
                        && aktKn.getInfo().getBedingungen() != null) {
                    trans = aktKn.getInfo().getBedingungen();
                    it3 = trans.iterator();
                   
                    while (it3.hasNext()) {
                        tran = it3.next();
                        numOrig2 = tran.getFolgezustand();
                        zielKnNum = (Integer) knotZuord[i].get(numOrig2);
                        aktBed = tran.getCond();
                       
                        if (aktBed != null) {
                            neu.einfuegKante(aktKnNum, zielKnNum, aktBed, 1);
                        }
                    }
                }
            }
        }

        // true - Kanten zu den einzelnen Startknoten einfügen.
        for (int i = 0; i < endAs.length; i++) {
            zielKn = endAs[i].holeStartzustand();
           
            if (zielKn != null) {
                zielKnNum = (Integer) knotZuord[i].get(zielKn.holeName());
               
                knot = new ArrayList<Integer>(endAs[i].holAdj().keySet());
                it = knot.iterator();
               
                while (it.hasNext()) {
                    aktKnNum = (Integer) knotZuord[i].get(it.next());
                    neu.einfuegKante(aktKnNum,
                                     zielKnNum,
                                     StaticMethods.ausBed("t"),
                                     1);
                }
            }
        }

        // Einen IDLE-Startknoten einfügen.
        idlBefehl = StaticMethods.posSuch(eas.simulation.ConstantsSimulation.getBefehlNamenArray(params),
                                      "IDL");
        neu.einfuegenKnoten(lfdNr, idlBefehl, 1, 1);
        neu.setStart(neu.holeKnoten(lfdNr));
        for (int i = 0; i < conds.length; i++) {
            if (i > 0) {
                neuBed = conds[i];
            } else {
                neuBed = StaticMethods.ausFormatBed(conds[i].formatted());
                for (int j = 1; j < conds.length; j++) {
                    zwischBed = StaticMethods.ausFormatBed(conds[j].formatted());
                    zwischBed.negiere();
                    neuBed = new InnerNode(
                            neuBed,
                            zwischBed,
                            eas.simulation.spatial.sim2D.marbSimulation.Konstanten.ODER);
                }
View Full Code Here

     */
    public static double condStrength(final Condition cond,
                               final long erstmalig,
                               final long spaeter) {
        long iterat;
        Condition c = cond.simplify();
        Random rand = new Random();
        HashSet<Integer> sensors = cond.aktSens();
        int[] sens;
        int max = 0;
        double value;
        boolean vorhanden = false;
        String cForm = c.formatted();
        double newVal;
       
        Iterator<Integer> it = sensors.iterator();
        while (it.hasNext()) {
            int zwisch = it.next();
           
            if (zwisch > max) {
                max = zwisch;
            }
        }
       
        sens = new int[max];
       
        if (StaticMethods.berConds == null) {
            berConds = new HashMap<String, Double>();
            berCondsIt = new HashMap<String, Long>();
        }
       
        if (berConds.containsKey(cForm)) {
            iterat = spaeter;
            vorhanden = true;
        } else {
            iterat = erstmalig;
        }
       
        value = 0;
        for (long i = 0; i < iterat; i++) {
            it = sensors.iterator();
            while (it.hasNext()) {
                sens[it.next() - 1] = rand.nextInt(256);
            }
           
            if (c.evaluiereSens(sens)) {
                value++;
            }
        }
       
        if (vorhanden) {
View Full Code Here

        // Bedingungen vereinfachen.
        beds = this.getBedListe();       
        it1 = beds.iterator();
        while (it1.hasNext()) {
            trans = it1.next();
            Condition bedE = trans.getCond().simplify();
            trans.setBedingung(bedE.formatted());
        }
       
        // Unerreichbare Knoten löschen.
        it2 = this.getKnList().iterator();
        while (it2.hasNext()) {
View Full Code Here

     *
     * @param kn1  Quellknoten.
     * @param kn2  Zielknoten.
     */
    public void ergaenze(final Integer kn1, final Integer kn2) {
        Condition cond = new ConstLeaf(true);
        Condition zwisch;
       
        if (this.holeKnoten(kn1).getInfo().getBedingungen().size() > 0) {
            cond = StaticMethods.ausFormatBed(
                    this.holeKnoten(kn1).getInfo().
                        getBedingungen().get(0).getCond().formatted());
            cond.negiere();
        }
       
        for (int i = 1;
            i < this.holeKnoten(kn1).getInfo().getBedingungen().size();
            i++) {
            zwisch = StaticMethods.ausFormatBed(
                    this.holeKnoten(kn1).getInfo().
                        getBedingungen().get(i).getCond().formatted());
            zwisch.negiere();
            cond = new InnerNode(
                    cond,
                    zwisch,
                    eas.simulation.spatial.sim2D.marbSimulation.Konstanten.UND);
        }
View Full Code Here

                                    "SteuerFenster.KanteNeu"));
                } else if (cmd.equals(Messages.getString(
                                "SteuerFenster.AusSequenz"))) {
                    int autNum = this.aktGrph.getAktAut();
                    String condS = this.aktGrph.getConditions()[autNum];
                    Condition cond = StaticMethods.ausBed(condS);
                   
                    this.aktGrph.getRob().erzeugeAusSequenz(
                        this.aktGrph.getAktAut(),
                        this.aktGrph.holeAktTxtSeq(),
                        cond,
                        this.aktGrph.getRob().getAktTAut(),
                        true);
                    this.loescheSelKnot();
                    StaticMethods.log(
                            StaticMethods.LOG_DEBUG,
                            "Aus Sequenz mit aktuellem Translator.",
                            this.pars);
                } else if (cmd.equals("Aus Std-Sequenz")) {
                    int autNum = this.aktGrph.getAktAut();
                    String condS = this.aktGrph.getConditions()[autNum];
                    Condition cond = StaticMethods.ausBed(condS);
                   
                    this.aktGrph.getRob().erzeugeAusSequenz(
                        this.aktGrph.getAktAut(),
                        this.aktGrph.holeAktTxtSeq(),
                        cond,
                        true);
                    this.loescheSelKnot();
                    StaticMethods.log(
                            StaticMethods.LOG_DEBUG,
                            "Aus Sequenz mit Standardkodierung "
                            + "ohne Translator.",
                            this.pars);
                } else if (cmd.equals(Messages.getString(
                                "SteuerFenster.AusSequenzen"))) {
                    this.aktGrph.erzeugeAlleAusSeq(
                            this.aktGrph.getSeqs(),
                            StaticMethods.ausBeds(this.aktGrph.getConditions()),
                            true);
                    this.loescheSelKnot();
                } else if (cmd.equals(Messages.getString(
                                "SteuerFenster.GraphLoeschen"))) {
                    GeneralDialog nachfrage;
                    ArrayList<String> buttons = new ArrayList<String>();
                    buttons.add(Messages.getString("SteuerFenster.OK"));
                    buttons.add(Messages.getString("SteuerFenster.Abbrechen"));

                    nachfrage = new GeneralDialog(
                                    this,
                                    "Soll der aktuelle Endliche Automat "
                                    + "<" + this.aktGrph
                                    + "> wirklich von der Festplatte gelöscht"
                                    + " UND aus der Darstellung entfernt "
                                    + "werden?",
                                    Messages.getString(
                                                "SteuerFenster.GraphLoeschen"),
                                    buttons,
                                    null);
                    nachfrage.setVisible(true);

                    if (nachfrage.getResult().equals(Messages.getString(
                                    "SteuerFenster.OK"))) {
                        this.loescheGraph(this.aktGrph, true);
                        this.waehleGraph(0);
                    }
                } else if (cmd.equals(Messages.getString(
                                "SteuerFenster.NeuerGraph"))) {
                    this.neuerGraph();
                    this.waehleGraph(this.graphZaehl - 1);
                } else if (cmd.equals(Messages.getString(
                                "SteuerFenster.GraphLeeren"))) {
                    GeneralDialog nachfrage;
                    ArrayList<String> buttons = new ArrayList<String>();
                    buttons.add(Messages.getString("SteuerFenster.OK"));
                    buttons.add(Messages.getString("SteuerFenster.Abbrechen"));

                    nachfrage = new GeneralDialog(
                                    this,
                                    "Sollen ALLE KNOTEN des aktuellen "
                                    + "Endlichen Automaten "
                                    + "<" + this.aktGrph
                                    + "> wirklich gelöscht"
                                    + " werden?",
                                    Messages.getString(
                                                  "SteuerFenster.GraphLeeren"),
                                    buttons,
                                    null);
                    nachfrage.setVisible(true);

                    if (nachfrage.getResult().equals(Messages.getString(
                                    "SteuerFenster.OK"))) {
                        this.aktGrph.leereAktGraph();
                        this.selKn(null);
                    }
                } else if (cmd.equals(Messages.getString(
                                    "SteuerFenster.AlleLeeren"))) {
                    GeneralDialog nachfrage;
                    ArrayList<String> buttons = new ArrayList<String>();
                    buttons.add(Messages.getString("SteuerFenster.OK"));
                    buttons.add(Messages.getString("SteuerFenster.Abbrechen"));
               
                    nachfrage = new GeneralDialog(
                                    this,
                                    "Sollen ALLE KNOTEN ALLER AUTOMATEN "
                                        + " wirklich gelöscht werden?",
                                    Messages.getString(
                                                  "SteuerFenster.AlleLeeren"),
                                    buttons,
                                    null);
                    nachfrage.setVisible(true);
               
                    if (nachfrage.getResult().equals(Messages.getString(
                                    "SteuerFenster.OK"))) {
                        Vis aktGraph;
                        Iterator<Vis> it = this.graphen.iterator();
                        while (it.hasNext()) {
                            aktGraph = it.next();
                            aktGraph.leereAlleGraphen();
                            aktGraph.neuZeichnen();
                        }
                        this.selKn(null);
                    }
                } else if (cmd.equals(Messages.getString(
                                "SteuerFenster.GraphKopieren"))) {
                    String[] seq = this.aktGrph.getRob().erzeugeStrSeqs();
                    Condition[] conds = this.aktGrph.getRob().getConds();
                    DarstModEA[] darAlt;
                    darAlt = (DarstModEA[])
                        StaticMethods.seriaClone(this.aktGrph.getDarstellArt());

                    this.neuerGraph();
                    this.waehleGraph(this.graphZaehl - 1);
                    this.aktGrph.setzeAlleSeq(seq);
                    this.aktGrph.getRob().erzeugeAusSequenzen(seq,
                                                              conds,
                                                              null,
                                                              false);
                    this.aktGrph.setDarstellArt(darAlt);

                } else if (cmd.equals(Messages.getString(
                                "SteuerFenster.GraphSpeichern"))) {
                    this.aktGrph.speichereGraph(
                                    Messages.getString("Vis.All"));
                } else if (cmd.equals(Messages.getString(
                                "SteuerFenster.GraphLaden"))) {
                    GeneralDialog nachfrage;
                    ArrayList<String> buttons = new ArrayList<String>();
                    buttons.add(Messages.getString("SteuerFenster.OK"));
                    buttons.add(Messages.getString("SteuerFenster.Abbrechen"));

                    nachfrage = new GeneralDialog(
                                    this,
                                    Messages.getString("SteuerFenster."
                                                    + "SollNeuLaden")
                                    + " <" + this.aktGrph
                                    + ">.",
                                    Messages.getString(
                                                  "SteuerFenster.GraphLaden"),
                                    buttons,
                                    null);
                    nachfrage.setVisible(true);

                    if (nachfrage.getResult().equals(Messages.getString(
                                    "SteuerFenster.OK"))) {
                        this.aktGrph.ladeRob();
                        this.loescheSelKnot();
                    }
                } else if (cmd.equals(Messages.getString(
                                "SteuerFenster.SIM"))) {
                    this.simStarten(false);
                } else if (cmd.equals(Messages.getString(
                                "SteuerFenster.EVO"))) {
                    this.simStarten(true);
                } else if (cmd.equals(
                        Messages.getString("SteuerFenster.GraphUmbenennen"))) {
                    GeneralDialog dia;
                    ArrayList<String> buttons = new ArrayList<String>();
                    buttons.add(Messages.getString("SteuerFenster.OK"));
                    buttons.add(Messages.getString("SteuerFenster.Abbrechen"));

                    dia = new GeneralDialog(
                                    this,
                                    null,
                                    Messages.getString("SteuerFenster."
                                                     + "SollUmbenennen"),
                                    buttons,
                                    this.aktGrph.getGraphName(),
                                    1,
                                    50,
                                    true);
                    dia.setVisible(true);

                    if (dia.getResult().equals(
                                    Messages.getString("SteuerFenster.OK"))) {
                        String name = dia.getText();
                        boolean ok = true;
                        Iterator<Vis> it = this.graphen.iterator();

                        while (it.hasNext()) {
                            Vis aktG = it.next();
                            if (aktG.getGraphName().equals(name)) {
                                ok = false;
                            }
                        }

                        if (ok) {
                            int index = this.grAuswahl.getSelectedIndex();
                            int max = this.grAuswahl.getItemCount();
                            ArrayList<String> strings = new ArrayList<String>();
                            for (int i = 0; i < max; i++) {
                                if (i == index) {
                                    strings.add(name);
                                } else {
                                    strings.add(this.grAuswahl.getItem(i));
                                }
                            }

                            this.grAuswahl.removeAll();
                            this.aktGrph.setGraphName(name);

                            for (int i = 0; i < max; i++) {
                                this.grAuswahl.add(strings.get(i));
                            }

                            this.grAuswahl.select(index);
                        }
                    }

                } else if (cmd.equals(
                           Messages.getString("SteuerFenster.Mutation"))) {
                    this.aktGrph.mutiere();
                } else if (cmd.equals(
                        Messages.getString("SteuerFenster.Rekombination"))) {
                    ArrayList<String> a = new ArrayList<String>();
                    Iterator<Vis> it = this.graphen.iterator();
                    while (it.hasNext()) {
                        Vis v = it.next();
                        a.add(v.toString());
                    }
                   
                    GeneralDialog dia = new GeneralDialog(
                              this,
                              "Rekombination",
                              "Bitte die zu rekombinierenden\nGraphen wählen.",
                              a,
                              Messages.getString("SteuerFenster.Abbrechen"),
                              Messages.getString("SteuerFenster.OK"),
                              true,
                              -1);
                    dia.setVisible(true);
                    if (dia.getResult()
                            == Messages.getString("SteuerFenster.OK")) {
                       
                        String[] str = dia.getListe().getSelectedItems();
                        RobEA[] pop = new RobEA[str.length];
                        Vis v;
                       
                        for (int i = 0; i < str.length; i++) {
                            it = this.graphen.iterator();
                            while (it.hasNext()) {
                                v = it.next();
                                if (v.toString().equals(str[i])) {
                                    pop[i] = v.getRob();
                                   
                                    for (int j = 0;
                                         j < v.getRob().vAuts().length;
                                         j++) {
                                        ArrayList<String> b
                                            = new ArrayList<String>(1);
                                        b.add(Messages.getString(
                                                "SteuerFenster.OK"));
                                        GeneralDialog dia2
                                            = new GeneralDialog(
                                                    this,
                                                    "",
                                                    "Fitness " + j
                                                      + " ("
                                                      + str[i]
                                                      + ")",
                                                    b,
                                                    "" + pop[i].getFitness()[0],
                                                    1,
                                                    50,
                                                    true);
   
                                        dia2.setVisible(true);
                                       
                                        pop[i].setFitness(j,
                                            Integer.parseInt(dia2.getText()));
                                        }
                                   
                                    break;
                                }
                            }
                        }

                        RobCode[] r = this.rekombArt.rekombEinz(pop);
                        for (int i = 0; i < r.length; i++) {
                            v = this.neuerGraph();
                            v.erzeugeAlleAusSeq(
                                    r[i].getVStdCodes(),
                                    null,
                                    false);
                            this.selGraph(v);
                        }
                    }
                   
                } else if (cmd.equals(
                           Messages.getString("SteuerFenster.ErzeugeHEX"))) {
                    FileDialog dia;

                    dia = new FileDialog(this,
                                         Messages.getString("SteuerFenster."
                                                        + "ErzeugeHEXTitel"),
                                         FileDialog.SAVE);
                    dia.setVisible(true);

                    if (!(dia.getDirectory() == null)
                        && !(dia.getFile() == null)) {
                        LinkedList<Integer> seq
                            = this.aktGrph.getRob().erzeugeSequenz(
                                    this.aktGrph.getAktAut());
                        FileWriter f = new FileWriter(dia.getDirectory()
                                                      + File.separatorChar
                                                      + dia.getFile());
                        Iterator<Integer> it = seq.iterator();

                        while (it.hasNext()) {
                            f.write(it.next().intValue());
                        }
                        f.close();
                    }
                } else if (cmd.equals(
                        Messages.getString("SteuerFenster.Vereinfache"))) {
                    this.aktGrph.getRob().vAuts()[
                                   this.aktGrph.getAktAut()].vereinfache();
                    Condition condSimp =
                        this.aktGrph.getRob().getConds()[
                                  this.aktGrph.getAktAut()].simplify();
                    this.aktGrph.getRob().setCond(this.aktGrph.getAktAut(),
                                                  condSimp);
                   
                } else if (cmd.equals(
                        Messages.getString("SteuerFenster.VereinfacheAlle"))) {
                    Iterator<Vis> it = this.graphen.iterator();
                    Condition condSimp;
                    Vis aktVis;
                    while (it.hasNext()) {
                        aktVis = it.next();
                        for (int i = 0;
                             i < aktVis.getRob().vAuts().length;
View Full Code Here

TOP

Related Classes of eas.simulation.spatial.sim2D.marbSimulation.endlAutomat.conditions.Condition

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.