Package eas.simulation.spatial.sim2D.standardAgents

Examples of eas.simulation.spatial.sim2D.standardAgents.ObstacleAgent


    public ObstacleScene(final ParCollection params) {
        super("Rectangle obstacle scene", params);

        this.addCollidingAgent(
                new ObstacleAgent(0, null, null),
                new Vector2D(250, -5),
                0,
                new Vector2D(1, 1));
        this.addCollidingAgent(
                new ObstacleAgent(1, null, null),
                new Vector2D(250, 515),
                0,
                new Vector2D(1, 1));
        this.addCollidingAgent(
                new ObstacleAgent(2, null, null),
                new Vector2D(5, 255),
                90,
                new Vector2D(1, 1));
        this.addCollidingAgent(
                new ObstacleAgent(3, null, null),
                new Vector2D(495, 255),
                90,
                new Vector2D(1, 1));
    }
View Full Code Here


    public ObstacleScene2(final ParCollection params) {
        super("Rectangle obstacle scene", params);

        this.addCollidingAgent(
                new ObstacleAgent(0, null, null),
                new Vector2D(250, -5),
                0,
                new Vector2D(1, 1));
        this.addCollidingAgent(
                new ObstacleAgent(1, null, null),
                new Vector2D(250, 515),
                0,
                new Vector2D(1, 1));
        this.addCollidingAgent(
                new ObstacleAgent(2, null, null),
                new Vector2D(5, 255),
                90,
                new Vector2D(1, 1));
        this.addCollidingAgent(
                new ObstacleAgent(3, null, null),
                new Vector2D(495, 255),
                90,
                new Vector2D(1, 1));
    }
View Full Code Here

        WandaEnvironment<AbstractAgent2D<?>> env = new WandaEnvironment<AbstractAgent2D<?>>(0 , params);
       
        // Rahmen (ca. 3000x3000)
        // Rahmen
        // horizontaler Balken unten
        env.addCollidingAgent(new ObstacleAgent(0, null, null), new Vector2D(0,1500), 0, new Vector2D(6,1));
        // horizontaler Balken oben
        env.addCollidingAgent(new ObstacleAgent(0, null, null), new Vector2D(0,-1500), 0, new Vector2D(6,1));
        // vertikaler Balken links
        env.addCollidingAgent(new ObstacleAgent(0, null, null), new Vector2D(-1510, 0), 90, new Vector2D(6,1));
        // vertikaler Balken rechts
        env.addCollidingAgent(new ObstacleAgent(0, null, null), new Vector2D(1510, 0), 90, new Vector2D(6,1));
       
        // Erzeugen der Agenten und Verhaltensuebertragung
        WandaAgent agent1 = new WandaAgent(0, env, params);
        agent1.addActuator(new aBerechnungSwarmSimulation());
       
View Full Code Here

         * ids 0...9 are reserved for ObstacleAgents even ids beginning from 10
         * are reserved for SheepAgents (so, first possible id==10) uneven ids
         * beginning from 10 are reserved for WolfAgents (so, first possible
         * id==11)
         */
        env[0].addCollidingAgent((obstacleAgents[0] = new ObstacleAgent(0,
                env[0], params)), new Vector2D(250, -5), 0);
        env[0].addCollidingAgent((obstacleAgents[1] = new ObstacleAgent(1,
                env[0], params)), new Vector2D(250, 515), 0);
        env[0].addCollidingAgent((obstacleAgents[2] = new ObstacleAgent(2,
                env[0], params)), new Vector2D(5, 255), 90);
        env[0].addCollidingAgent((obstacleAgents[0] = new ObstacleAgent(3,
                env[0], params)), new Vector2D(495, 255), 90);

        sheepAgents = new SheepAgent[params.getParValueInt("numberOfSheep")];
        double sheepSpeed = (params.getParValueDouble("sheepSpeed"));
        for (int i = 0; i < sheepAgents.length; i++) {
View Full Code Here

    WandaEnvironment<AbstractAgent2D<?>> env = new WandaEnvironment<AbstractAgent2D<?>>(
        1, params);
   
    //env.addCollidingAgent(agent, position, angle, scale)
    env.addCollidingAgent(                                    //oben
            new ObstacleAgent(0, null, null),
            new Vector2D(250, -5),
            0,
            new Vector2D(4, 1));
    env.addCollidingAgent(                                    //unten
            new ObstacleAgent(1, null, null),
            new Vector2D(250, 1200),
            0,
            new Vector2D(4, 1));
    env.addCollidingAgent(                                    //links
            new ObstacleAgent(2, null, null),
            new Vector2D(-740, 597),
            90,
            new Vector2D(2.365, 1));
    env.addCollidingAgent(                                    //rechts
            new ObstacleAgent(3, null, null),
            new Vector2D(1240, 597),
            90,
            new Vector2D(2.365, 1));
   

   
    env.addCollidingAgent(                                 //Hindernis
                new ObstacleAgent(4, null, null),
                new Vector2D(450, 400),
                0,
                new Vector2D(1, 1));
   
    Random rand = new Random(params.getSeed());
View Full Code Here

    WandaEnvironment<AbstractAgent2D<?>> env = new WandaEnvironment<AbstractAgent2D<?>>(
        1, params);
   
    //env.addCollidingAgent(agent, position, angle, scale)
    env.addCollidingAgent(                                    //oben
            new ObstacleAgent(0, null, null),
            new Vector2D(250, -5),
            0,
            new Vector2D(4, 1));
    env.addCollidingAgent(                                    //unten
            new ObstacleAgent(1, null, null),
            new Vector2D(250, 1200),
            0,
            new Vector2D(4, 1));
    env.addCollidingAgent(                                    //links
            new ObstacleAgent(2, null, null),
            new Vector2D(-740, 597),
            90,
            new Vector2D(2.365, 1));
    env.addCollidingAgent(                                    //rechts
            new ObstacleAgent(3, null, null),
            new Vector2D(1240, 597),
            90,
            new Vector2D(2.365, 1));
   
    env.addCollidingAgent(                                    //"K" links
                new ObstacleAgent(4, null, null),
                new Vector2D(-540, 597),
                90,
                new Vector2D(1.5, 1));
    env.addCollidingAgent(                                    //"K" unten
                new ObstacleAgent(5, null, null),
                new Vector2D(-340, 790),
                45,
                new Vector2D(1, 1));
    env.addCollidingAgent(                                    //"K" oben
                new ObstacleAgent(5, null, null),
                new Vector2D(-340, 410),
                135,
                new Vector2D(1, 1));
   
    env.addCollidingAgent(                                    //"I"
                new ObstacleAgent(4, null, null),
                new Vector2D(200, 597),
                90,
                new Vector2D(1.5, 1));
   
    env.addCollidingAgent(                                    //"T" hoch
                new ObstacleAgent(4, null, null),
                new Vector2D(700, 615),
                90,
                new Vector2D(1.45, 1));
   
    env.addCollidingAgent(                                    //"T" quer
                new ObstacleAgent(4, null, null),
                new Vector2D(700, 240),
                0,
                new Vector2D(1, 1));
   
   
View Full Code Here

     * @param ident
     * @param params
     */
    public SimpleMazeScene2(String ident, ParCollection params) {
        super(ident, params);
        this.addCollidingAgent(new ObstacleAgent(0, null, params), new Vector2D(0, 0), 0, new Vector2D(1, 0.1));
        this.addCollidingAgent(new ObstacleAgent(1, null, params), new Vector2D(0, 300), 0, new Vector2D(1, 0.1));
        this.addCollidingAgent(new ObstacleAgent(2, null, params), new Vector2D(-251, 150), 90, new Vector2D(0.6, 0.1));
        this.addCollidingAgent(new ObstacleAgent(3, null, params), new Vector2D(251, 150), 90, new Vector2D(0.6, 0.1));
        this.addCollidingAgent(new ObstacleAgent(4, null, params), new Vector2D(125.5, 52), 90, new Vector2D(0.2, 0.2));
        this.addCollidingAgent(new ObstacleAgent(5, null, params), new Vector2D(0, 52), 90, new Vector2D(0.2, 0.2));
        this.addCollidingAgent(new ObstacleAgent(6, null, params), new Vector2D(-125.5, 52), 90, new Vector2D(0.2, 0.2));
        this.addCollidingAgent(new ObstacleAgent(7, null, params), new Vector2D(125.5, 248), 90, new Vector2D(0.2, 0.2));
        this.addCollidingAgent(new ObstacleAgent(8, null, params), new Vector2D(0, 248), 90, new Vector2D(0.2, 0.2));
        this.addCollidingAgent(new ObstacleAgent(9, null, params), new Vector2D(-125.5, 248), 90, new Vector2D(0.2, 0.2));
        this.addCollidingAgent(new ObstacleAgent(10, null, params), new Vector2D(-188.25, 150), 90, new Vector2D(0.3, 0.2));
        this.addCollidingAgent(new ObstacleAgent(11, null, params), new Vector2D(-62.75, 150), 0, new Vector2D(0.3, 0.2));
        this.addCollidingAgent(new ObstacleAgent(12, null, params), new Vector2D(62.75, 150), 90, new Vector2D(0.3, 0.2));
        this.addCollidingAgent(new ObstacleAgent(13, null, params), new Vector2D(170.25, 150), 0, new Vector2D(0.25, 0.2));
        this.scaleScene(5);
       
    }
View Full Code Here

     */
    public GateScene(String ident, ParCollection params) {
        super(ident, params);

        this.addCollidingAgent(
                new ObstacleAgent(0, null, null),
                new Vector2D(0, -175),
                0,
                new Vector2D(1, 0.25));

        this.addCollidingAgent(
                new ObstacleAgent(0, null, null),
                new Vector2D(0, 175),
                0,
                new Vector2D(1, 0.25));

        this.addCollidingAgent(
                new ObstacleAgent(0, null, null),
                new Vector2D(250, 0),
                90,
                new Vector2D(0.69, 0.25));

        this.addCollidingAgent(
                new ObstacleAgent(0, null, null),
                new Vector2D(-250, 0),
                90,
                new Vector2D(0.69, 0.25));

        this.addCollidingAgent(
                new ObstacleAgent(0, null, null),
                new Vector2D(0, -102),
                90,
                new Vector2D(0.28, 0.25));

        this.addCollidingAgent(
                new ObstacleAgent(0, null, null),
                new Vector2D(0, 102),
                90,
                new Vector2D(0.28, 0.25));

    }
View Full Code Here

     * @param ident
     * @param params
     */
    public SimpleMazeScene(String ident, ParCollection params) {
        super(ident, params);
        this.addCollidingAgent(new ObstacleAgent(0, null, params), new Vector2D(0, 0), 0, new Vector2D(1, 0.1));
        this.addCollidingAgent(new ObstacleAgent(1, null, params), new Vector2D(0, 300), 0, new Vector2D(1, 0.1));
        this.addCollidingAgent(new ObstacleAgent(2, null, params), new Vector2D(-251, 150), 90, new Vector2D(0.6, 0.1));
        this.addCollidingAgent(new ObstacleAgent(3, null, params), new Vector2D(251, 150), 90, new Vector2D(0.6, 0.1));
        this.addCollidingAgent(new ObstacleAgent(4, null, params), new Vector2D(125.5, 52), 90, new Vector2D(0.2, 0.2));
        this.addCollidingAgent(new ObstacleAgent(5, null, params), new Vector2D(0, 52), 90, new Vector2D(0.2, 0.2));
        this.addCollidingAgent(new ObstacleAgent(6, null, params), new Vector2D(-125.5, 52), 90, new Vector2D(0.2, 0.2));
        this.addCollidingAgent(new ObstacleAgent(7, null, params), new Vector2D(125.5, 248), 90, new Vector2D(0.2, 0.2));
        this.addCollidingAgent(new ObstacleAgent(8, null, params), new Vector2D(0, 248), 90, new Vector2D(0.2, 0.2));
        this.addCollidingAgent(new ObstacleAgent(9, null, params), new Vector2D(-125.5, 248), 90, new Vector2D(0.2, 0.2));
        this.addCollidingAgent(new ObstacleAgent(10, null, params), new Vector2D(-188.25, 150), 90, new Vector2D(0.3, 0.2));
        this.addCollidingAgent(new ObstacleAgent(11, null, params), new Vector2D(-62.75, 150), 90, new Vector2D(0.3, 0.2));
        this.addCollidingAgent(new ObstacleAgent(12, null, params), new Vector2D(62.75, 150), 90, new Vector2D(0.3, 0.2));
        this.addCollidingAgent(new ObstacleAgent(13, null, params), new Vector2D(188.25, 150), 90, new Vector2D(0.3, 0.2));
        this.scaleScene(5);
       
    }
View Full Code Here

        JasmineRobot agent;
        Vector2D pos;
        double richt;

        env.addCollidingAgent(
                new ObstacleAgent(0, env, params),
                new Vector2D(0, -1000),
                0,
                new Vector2D(10, 1));
        env.addCollidingAgent(
                new ObstacleAgent(1, env, params),
                new Vector2D(0, 1000),
                0,
                new Vector2D(10, 1));
        env.addCollidingAgent(
                new ObstacleAgent(2, env, params),
                new Vector2D(-2500, 0),
                90,
                new Vector2D(3.95, 1));
        env.addCollidingAgent(
                new ObstacleAgent(3, env, params),
                new Vector2D(2500, 0),
                90,
                new Vector2D(3.95, 1));

        for (int j = 4; j <= 500; j++) {
View Full Code Here

TOP

Related Classes of eas.simulation.spatial.sim2D.standardAgents.ObstacleAgent

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.