1 /* Copyright (c) 2012-2014. The SimGrid Team.
2 * All rights reserved. */
4 /* This program is free software; you can redistribute it and/or modify it
5 * under the terms of the license (GNU LGPL) which comes with this package. */
7 package energy.consumption;
9 import org.simgrid.msg.Msg;
10 import org.simgrid.msg.Host;
11 import org.simgrid.msg.MsgException;
14 public static final double task_comp_size = 10;
15 public static final double task_comm_size = 10;
16 public static final int hostNB = 2 ;
18 public static void main(String[] args) throws MsgException {
22 if (args.length < 1) {
23 Msg.info("Usage : Energy platform_file");
24 Msg.info("Usage : Energy ../platforms/energy_platform.xml");
27 /* Construct the platform */
28 Msg.createEnvironment(args[0]);
29 /* Instanciate a process */
30 new EnergyConsumer("MyHost1","energyConsumer").start();
31 /* Execute the simulation */
33 Msg.info("Total simulation time: "+ Msg.getClock());