All Downloads are FREE. Search and download functionalities are using the official Maven repository.

examples.Example3 Maven / Gradle / Ivy

There is a newer version: 5.1.0
Show newest version
/**
 *     PureEdgeSim:  A Simulation Framework for Performance Evaluation of Cloud, Edge and Mist Computing Environments 
 *
 *     This file is part of PureEdgeSim Project.
 *
 *     PureEdgeSim is free software: you can redistribute it and/or modify
 *     it under the terms of the GNU General Public License as published by
 *     the Free Software Foundation, either version 3 of the License, or
 *     (at your option) any later version.
 *
 *     PureEdgeSim is distributed in the hope that it will be useful,
 *     but WITHOUT ANY WARRANTY; without even the implied warranty of
 *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *     GNU General Public License for more details.
 *
 *     You should have received a copy of the GNU General Public License
 *     along with PureEdgeSim. If not, see .
 *     
 *     @author Mechalikh
 **/
package examples;

import com.mechalikh.pureedgesim.simulationcore.Simulation;

public class Example3 {
	/**
	 * This is a simple example showing how to launch simulation using a custom
	 * energy model. by removing it, pureEdgeSim will use the default model. As you
	 * can see, this class extends the Main class provided by PureEdgeSim, which is
	 * required for this example to work
	 */
	public static void main(String[] args) {
		
		//Create a PureEdgeSim simulation
		Simulation sim = new Simulation();
		
		/*
		 * To use your custom Energy model, do this: The custom energy model class can
		 * be found in the examples folder as well. by removing this line, pureEdgeSim
		 * will use the default energy model. *
		 */
		sim.setCustomEnergyModel(CustomEnergyModel.class);

		// To use the PureEdgeSim default Energy Model you can also uncomment this:
		// setCustomEnergyModel(DefaultEnergyModel.class);

		// Start the simulation
		sim.launchSimulation();
	}

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy