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

jadex.micro.testcases.nfproperties.FakeCpuLoadProperty Maven / Gradle / Ivy

Go to download

The Jadex micro applications package contains several example applications, benchmarks and testcases using micro agents.

There is a newer version: 4.0.267
Show newest version
package jadex.micro.testcases.nfproperties;

import jadex.bridge.IInternalAccess;
import jadex.bridge.nonfunctional.NFPropertyMetaInfo;
import jadex.bridge.nonfunctional.SimpleValueNFProperty;

/**
 *  Property simulating a random amount of CPU load.
 */
public class FakeCpuLoadProperty extends SimpleValueNFProperty
{
	/**
	 * Creates the property.
	 */
	public FakeCpuLoadProperty(IInternalAccess comp)
	{
		super(comp, new NFPropertyMetaInfo("fakecpuload", Double.class, Void.class, true, 10000, true, null));
	}
	
	/**
	 *  Measure the value.
	 */
	public Double measureValue()
	{
		return Math.random() * 100.0;
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy