it.unibo.alchemist.model.interfaces.Incarnation Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of alchemist-interfaces Show documentation
Show all versions of alchemist-interfaces Show documentation
Interfaces of core and model components of Alchemist
/*
* Copyright (C) 2010-2014, Danilo Pianini and contributors
* listed in the project's pom.xml file.
*
* This file is part of Alchemist, and is distributed under the terms of
* the GNU General Public License, with a linking exception, as described
* in the file LICENSE in the Alchemist distribution's top directory.
*/
package it.unibo.alchemist.model.interfaces;
import org.apache.commons.math3.random.RandomGenerator;
/**
* @param Concentration type
*/
public interface Incarnation {
/**
* Given an {@link Node}, an {@link Molecule} and a property expressed as
* a {@link String}, returns a numeric value. If a numeric value is not
* deducible, Double.NaN is returned.
*
* @param node
* the node
* @param mol
* the molecule to analyze
* @param prop
* the property to extract
* @return a numeric value representing the property
*/
double getProperty(Node node, Molecule mol, String prop);
/**
* Parses a {@link String}, and provides a {@link Molecule}.
*
* @param s
* the {@link String} to parse
* @return an {@link Molecule} created parsing the passed {@link String}
*/
Molecule createMolecule(String s);
/**
* Creates a new concentration object of a specific concrete type.
*
* @param s the {@link String} to parse
* @return a concentration of a certain concrete type
*/
T createConcentration(String s);
/**
* @param rand
* the random engine
* @param env
* the environment that will host this object
* @param param
* a {@link String} describing the object
* @return a new {@link TimeDistribution}
*/
Node createNode(RandomGenerator rand, Environment env, String param);
/**
* @param rand
* the random engine
* @param env
* the environment that will host this object
* @param node
* the node that will host this object
* @param param
* a {@link String} describing the object
* @return a new {@link TimeDistribution}
*/
TimeDistribution createTimeDistribution(RandomGenerator rand, Environment env, Node node, String param);
/**
* @param rand
* the random engine
* @param env
* the environment that will host this object
* @param node
* the node that will host this object
* @param time
* the time distribution of the reaction
* @param param
* a {@link String} describing the object
* @return a new {@link Reaction}
*/
Reaction createReaction(RandomGenerator rand, Environment env, Node node, TimeDistribution time, String param);
/**
* @param rand
* the random engine
* @param env
* the environment that will host this object
* @param node
* the node that will host this object
* @param time
* the time distribution of the reaction
* @param reaction
* the reaction hosting this object
* @param param
* a {@link String} describing the object
* @return a new {@link Condition}
*/
Condition createCondition(RandomGenerator rand, Environment env, Node node, TimeDistribution time, Reaction reaction, String param);
/**
* @param rand
* the random engine
* @param env
* the environment that will host this object
* @param node
* the node that will host this object
* @param time
* the time distribution of the reaction
* @param reaction
* the reaction hosting this object
* @param param
* a {@link String} describing the object
* @return a new {@link Action}
*/
Action createAction(RandomGenerator rand, Environment env, Node node, TimeDistribution time, Reaction reaction, String param);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy