net.simplace.sim.control.generators.EquidistantCalSimGenerator

Creates equidistant parameter values within a range.

The generator generates for each given parameter count many steps between min and max and creates for each parameter set a simulation.

An optional constraint prohibits the creation of simulations with invalid values that do not match the constraint rule.

Example

|  <generator  id="Generator" class="net.simplace.sim.control.generators.EquidistantCalSimGenerator">
|    <cal id="TsumAnthesis" datatype="DOUBLE" target="vTempSumAnthesis">
|      <input id="min" datatype="DOUBLE">0</input>
|      <input id="max" datatype="DOUBLE">1500</input>
|      <input id="count" datatype="INT">31</input>
|    </cal>
|    <cal id="TsumMaturity" datatype="DOUBLE" target="vTempSumMaturity">
|      <input id="min" datatype="DOUBLE">1000</input>
|      <input id="max" datatype="DOUBLE">2000</input>
|      <input id="count" datatype="INT">21</input>
|    </cal>
|    <constraint rule="${Generator.TsumMaturity} &gt; ${Generator.TsumAnthesis}+100">
|  </generator>

Notice

The number of generated simulation can be considerably high if you use many parameters, as the the parameters counts multiply. E. g. if you have 10 parameters and 50 counts the generator would generate \(50 \cdot 50 \cdot ...\cdot 50 = 50^{10} \approx 10^{17} \) parameter sets.

To illustrate this magnitude: just to store each set of 10 parameters we need 10 bytes. Storing all parameters, we need \(10^{18}\) bytes - or one million harddisks with 1TB capacity. And if a super fast computer would calculate hundred millions of simulations per second, we would still need \(10^9\) seconds or more than 30 years to calculate them.




public class EquidistantCalSimGenerator extends DefaultSimulationGenerator {
// Public Constructors
public EquidistantCalSimGenerator(Element aGeneratorElement, FWSimSession
aSession, HashMap aFieldMap, FWSimVariable.CONTENT_TYPE aContentType);


// Public Instance Methods
public void init(); // Overrides DefaultSimulationGenerator

public HashMap createVariables(); // Overrides DefaultSimulationGenerator

public void generate(FWSimulationControlCache aCache, ResultSet aResultSet)
throws Exception; // Overrides DefaultSimulationGenerator



}



Hierarchy: java.lang.Object - net.simplace.sim.control.FWSimulationControlContainer (net.simplace.sim.util.FWSimFieldContainer) - net.simplace.sim.control.FWSimulationGenerator - DefaultSimulationGenerator - EquidistantCalSimGenerator