X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/24dbcb1a8071fe684d776063f04b314d92094e8d..23da67335f942457b0d8b1f10e9849eba0eee9f7:/contrib/psg/src/peersim/cdsim/FullNextCycle.java diff --git a/contrib/psg/src/peersim/cdsim/FullNextCycle.java b/contrib/psg/src/peersim/cdsim/FullNextCycle.java deleted file mode 100644 index 0bc97f472e..0000000000 --- a/contrib/psg/src/peersim/cdsim/FullNextCycle.java +++ /dev/null @@ -1,137 +0,0 @@ -/* - * Copyright (c) 2003-2005 The BISON Project - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 2 as - * published by the Free Software Foundation. - * - * This program 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 Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -package peersim.cdsim; - -import peersim.config.*; -import peersim.core.*; -import peersim.util.RandPermutation; - -/** -* Control to run a cycle of the cycle driven simulation. -* This does not need to be explicitly configured (although you can do it for -* hacking purposes). -*/ -public class FullNextCycle implements Control { - - -// ============== fields =============================================== -// ===================================================================== - - -/** -* The type of the getPair function. This parameter is of historic interest and -* was needed in a publication we wrote. You don't need to care about this. -* But if you wanna know: if set to "rand", then in a cycle the simulator -* does not simply iterate through the nodes, but instead picks a random one -* N times, where N is the network size. -* @config -*/ -private static final String PAR_GETPAIR = "getpair"; - -/** -* Shuffle iteration order if set. Not set by default. If set, then nodes are -* iterated in a random order. However, in the network the nodes actually -* stay in the order they originally were. The price for leaving the -* network untouched is memory: we need to store the permutation we use -* to iterate the network. -* @config -*/ -private static final String PAR_SHUFFLE = "shuffle"; - -// -------------------------------------------------------------------- - -protected final boolean getpair_rand; - -protected final boolean shuffle; - -/** Holds the protocol schedulers of this simulation */ -protected Scheduler[] protSchedules = null; - -/** The random permutation to use if config par {@value #PAR_SHUFFLE} is set. */ -protected RandPermutation rperm = new RandPermutation( CDState.r ); - -// =============== initialization ====================================== -// ===================================================================== - -/** -* Reads config parameters and {@link Scheduler}s. -*/ -public FullNextCycle(String prefix) { - - getpair_rand = Configuration.contains(prefix+"."+PAR_GETPAIR); - shuffle = Configuration.contains(prefix+"."+PAR_SHUFFLE); - - // load protocol schedulers - String[] names = Configuration.getNames(Node.PAR_PROT); - protSchedules = new Scheduler[names.length]; - for(int i=0; i