Examples of Simulation


Examples of org.kie.internal.simulation.Simulation

        }

        try {
            for ( Method method : methods ) {

                Simulation simulation = (Simulation) method.invoke( object,
                                                                    null );

                for ( SimulationPath path : simulation.getPaths().values() ) {
                    for ( SimulationStep step : path.getSteps() ) {
                        for ( Command command : step.getCommands() ) {
                            if ( command instanceof TestGroupCommand ) {
                                String testName = ((TestGroupCommand) command).getName();
                                Description testGroupDescr = Description.createTestDescription( cls,
View Full Code Here

Examples of org.movsim.autogen.Simulation

            LOG.info("global time offset set={} --> {} milliseconds.", dateTime, timeOffsetMillis);
            ProjectMetaData.getInstance().setTimeOffsetMillis(timeOffsetMillis);
        }
        projectMetaData.setXodrNetworkFilename(inputData.getScenario().getNetworkFilename()); // TODO

        Simulation simulationInput = inputData.getScenario().getSimulation();

        final boolean loadedRoadNetwork = parseOpenDriveXml(roadNetwork, projectMetaData);
        routing = new Routing(inputData.getScenario().getRoutes(), roadNetwork);
       
        vehicleFactory = new VehicleFactory(simulationInput.getTimestep(), inputData.getVehiclePrototypes(),
                inputData.getConsumption(), routing);

        roadNetwork.setWithCrashExit(simulationInput.isCrashExit());

        simulationRunnable.setTimeStep(simulationInput.getTimestep());

        // TODO better handling of case "duration = INFINITY"
        double duration = simulationInput.isSetDuration() ? simulationInput.getDuration() : -1;

        simulationRunnable.setDuration(duration < 0 ? Double.MAX_VALUE : duration);

        if (simulationInput.isWithSeed()) {
            MyRandom.initializeWithSeed(simulationInput.getSeed());
        }

        defaultTrafficComposition = new TrafficCompositionGenerator(simulationInput.getTrafficComposition(),
                vehicleFactory);

        // For each road in the MovSim XML input data, find the corresponding roadSegment and
        // set its input data accordingly
        // final Map<String, RoadInput> roadInputMap = simulationInput.get.getRoadInput();
        if (loadedRoadNetwork == false && simulationInput.getRoad().size() == 1) {
            defaultTestingRoadMapping(simulationInput.getRoad().get(0));
        } else {
            matchRoadSegmentsAndRoadInput(simulationInput.getRoad());
        }

        trafficLights = new TrafficLights(inputData.getScenario().getTrafficLights(), roadNetwork);

        reset();
View Full Code Here

Examples of org.openpixi.pixi.physics.Simulation

    defaultSettings.setParticleSolver(new LeapFrogHalfStep());
                defaultSettings.setInterpolator(new ChargeConservingCIC());
                defaultSettings.setOCLParticleSolver("leap frog half step");
                defaultSettings.setOCLGridInterpolator("charge conserving CIC");
               
    Simulation sequentialSimulation = new Simulation(defaultSettings);

    Settings openCLSettings = ClassCopier.copy(defaultSettings);
    Simulation openCLSimulation = new Simulation(openCLSettings);

    sequentialSimulation.run();
    openCLSimulation.run();

    ParticleComparator comparator = new ParticleComparator();
    comparator.compare(sequentialSimulation.particles, openCLSimulation.particles);
  }
View Full Code Here

Examples of org.openpixi.pixi.physics.Simulation

    defaultSettings.setParticleSolver(new BorisDamped());
                defaultSettings.setInterpolator(new ChargeConservingCIC());
                defaultSettings.setOCLParticleSolver("boris damped");
                defaultSettings.setOCLGridInterpolator("charge conserving CIC");
               
    Simulation sequentialSimulation = new Simulation(defaultSettings);

    Settings openCLSettings = ClassCopier.copy(defaultSettings);
    Simulation openCLSimulation = new Simulation(openCLSettings);

    sequentialSimulation.run();
    openCLSimulation.run();

    ParticleComparator comparator = new ParticleComparator();
    comparator.compare(sequentialSimulation.particles, openCLSimulation.particles);
  }
View Full Code Here

Examples of org.openpixi.pixi.physics.Simulation

    Interpolation interpolation = createInterpolationIterator(sharedDataManager);
    sharedDataManager.setGrid(grid);

    sharedDataManager.initializeCommunication();

    this.simulation = new Simulation(
        localSettings, grid, particles,
        particleBoundaries, interpolation);
  }
View Full Code Here

Examples of org.openpixi.pixi.physics.Simulation

    defaultSettings.setParticleSolver(new EulerRichardson());
                defaultSettings.setInterpolator(new ChargeConservingCIC());
                defaultSettings.setOCLParticleSolver("euler richardson");
                defaultSettings.setOCLGridInterpolator("charge conserving CIC");
               
    Simulation sequentialSimulation = new Simulation(defaultSettings);

    Settings openCLSettings = ClassCopier.copy(defaultSettings);
    Simulation openCLSimulation = new Simulation(openCLSettings);

    sequentialSimulation.run();
    openCLSimulation.run();

    ParticleComparator comparator = new ParticleComparator();
    comparator.compare(sequentialSimulation.particles, openCLSimulation.particles);
  }
View Full Code Here

Examples of org.openpixi.pixi.physics.Simulation

    defaultSettings.setParticleSolver(new Boris());
                defaultSettings.setInterpolator(new CloudInCell());
                defaultSettings.setOCLParticleSolver("boris");
                defaultSettings.setOCLGridInterpolator("cloud in cell");
               
    Simulation sequentialSimulation = new Simulation(defaultSettings);

    Settings openCLSettings = ClassCopier.copy(defaultSettings);
    Simulation openCLSimulation = new Simulation(openCLSettings);

    sequentialSimulation.run();
    openCLSimulation.run();

    ParticleComparator comparator = new ParticleComparator();
    comparator.compare(sequentialSimulation.particles, openCLSimulation.particles);
  }
View Full Code Here

Examples of org.openpixi.pixi.physics.Simulation

    defaultSettings.setParticleSolver(new Boris());
                defaultSettings.setInterpolator(new ChargeConservingCIC());
                defaultSettings.setOCLParticleSolver("boris");
                defaultSettings.setOCLGridInterpolator("charge conserving CIC");
               
    Simulation sequentialSimulation = new Simulation(defaultSettings);

    Settings openCLSettings = ClassCopier.copy(defaultSettings);
    Simulation openCLSimulation = new Simulation(openCLSettings);

    sequentialSimulation.run();
    openCLSimulation.run();

    ParticleComparator comparator = new ParticleComparator();
    comparator.compare(sequentialSimulation.particles, openCLSimulation.particles);
  }
View Full Code Here

Examples of org.openpixi.pixi.physics.Simulation

    iterations = settings.getIterations();
    runid = settings.getRunid();

    if (settings.getSimulationType() == 0) {
      // Creates the actual physics simulation that can be run iteratively.
      simulation = new Simulation(settings);
      // Creates the diagnostics wrapper class that knows about all
      // enabled diagnostic methods.
      diagnostics = new DiagnosticsScheduler(simulation.grid, simulation.particles, settings);

      // Checks if the user has specified at least two parameters
View Full Code Here

Examples of org.openpixi.pixi.physics.Simulation

    defaultSettings.setParticleSolver(new SemiImplicitEuler());
                defaultSettings.setInterpolator(new ChargeConservingCIC());
                defaultSettings.setOCLParticleSolver("semiimplicit euler");
                defaultSettings.setOCLGridInterpolator("charge conserving CIC");
               
    Simulation sequentialSimulation = new Simulation(defaultSettings);

    Settings openCLSettings = ClassCopier.copy(defaultSettings);
    Simulation openCLSimulation = new Simulation(openCLSettings);

    sequentialSimulation.run();
    openCLSimulation.run();

    ParticleComparator comparator = new ParticleComparator();
    comparator.compare(sequentialSimulation.particles, openCLSimulation.particles);
  }
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.