/*
* File name: ParameterClass.java (package eas.users.fredy)
* Author(s): Lukas König
* Java version: 8.0 (at generation time)
* Generation date: 23.05.2014 (16:00:34)
*
* (c) This file and the EAS (Easy Agent Simulation) framework containing it
* is protected by Creative Commons by-nc-sa license. Any altered or
* further developed versions of this file have to meet the agreements
* stated by the license conditions.
*
* In a nutshell
* -------------
* You are free:
* - to Share -- to copy, distribute and transmit the work
* - to Remix -- to adapt the work
*
* Under the following conditions:
* - Attribution -- You must attribute the work in the manner specified by the
* author or licensor (but not in any way that suggests that they endorse
* you or your use of the work).
* - Noncommercial -- You may not use this work for commercial purposes.
* - Share Alike -- If you alter, transform, or build upon this work, you may
* distribute the resulting work only under the same or similar license to
* this one.
*
* + Detailed license conditions (Germany):
* http://creativecommons.org/licenses/by-nc-sa/3.0/de/
* + Detailed license conditions (unported):
* http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en
*
* This header must be placed in the beginning of any version of this file.
*/
package eas.users.fredy.grid;
import java.util.LinkedList;
import eas.startSetup.SingleParameter;
import eas.startSetup.parameterDatatypes.Datatypes;
/**
* @author Lukas König
*/
public class ParameterClass {
public static LinkedList<SingleParameter> getParameters() {
LinkedList<SingleParameter> list = new LinkedList<>();
list.add(new SingleParameter(
"numberOfProsumers",
Datatypes.integerRange(1, 10000),
2,
"The number of prosumer agents.",
ParameterClass.class.getSimpleName().toUpperCase(),
ParameterClass.class));
list.add(new SingleParameter(
"storageFileName",
Datatypes.STRING,
"file.txt",
"Input file.",
ParameterClass.class.getSimpleName().toUpperCase(),
ParameterClass.class));
return list;
}
private static int numberOfProsumers;
private static String storageFileName;
public static String getStorageFileName() {
return storageFileName;
}
public static int getNumberOfProsumers() {
return numberOfProsumers;
}
public static void setStorageFileName(String renewableGeneration) {
ParameterClass.storageFileName = renewableGeneration;
resetRequested = true;
}
public static void setNumberOfProsumers(int myIntegerParameter) {
if (myIntegerParameter != ParameterClass.numberOfProsumers) {
System.out.println("\n\nI noticed that the parameter myIntegerParameter changed from "
+ ParameterClass.numberOfProsumers
+ " to "
+ myIntegerParameter);
ParameterClass.numberOfProsumers = myIntegerParameter;
resetRequested = true;
}
}
public static boolean resetRequested;
}