Class FWSimDataframe

All Implemented Interfaces:
Serializable, Cloneable, Iterable<FWSimDataset>, Collection<FWSimDataset>, List<FWSimDataset>, RandomAccess, SequencedCollection<FWSimDataset>

public class FWSimDataframe extends ArrayList<FWSimDataset>
Dependency table of a solution: one FWSimDataset per use of a variable (which component or setting uses which variable, and in which role). It is filled while the solution is set up and used in the check levels INTENSE and ONLY to write <sessionid>_solution_variables.csv and to report unused constants and control variables.
See Also:
  • Constructor Details

    • FWSimDataframe

      public FWSimDataframe()
      Creates an empty table.
  • Method Details

    • addInterfaceParam

      public void addInterfaceParam(String aName, String aVarName, String aRule)
      Adds the parameters (${...}) used in a setting of an interface.
      Parameters:
      aName - name of the interface
      aVarName - name of the setting (element name)
      aRule - value of the setting
    • addConstant

      public void addConstant(FWSimVariable<?> aVariable)
      Adds a solution variable.
      Parameters:
      aVariable - the variable
    • addResource

      public void addResource(FWSimInputAdapter aFwSimInputAdapter)
      Adds a resource: the variables of its frequency rule, its key variables and its other header variables.

      Note: the second check for a component prefix tests the header variable again instead of the key, so the key is never split into component and variable.

      Parameters:
      aFwSimInputAdapter - the resource adapter or transformer
    • addSimComponent

      public void addSimComponent(FWSimComponent aSimComponent)
      Adds a SimComponent: for managements and simple components the variables used in their rules, otherwise the variables of its frequency rule and its inputs with the bound variables.
      Parameters:
      aSimComponent - the component
    • addOutput

      public boolean addOutput(FWSimOutput aSimOutput)
      Adds an output: the variables of its output and reset rules and the variables of its header (from rules or direct references).
      Parameters:
      aSimOutput - the output
      Returns:
      always true
    • toCSV

      public void toCSV(File aFileName)
      Writes the table as CSV file (separator ;). Errors are logged.
      Parameters:
      aFileName - the file
    • getUnusedConstants

      public Set<String> getUnusedConstants()
      Returns:
      the solution variables (category var) that are not used by any component, rule or output
    • getConstants

      public List<String> getConstants(Boolean aIncludeSysvars)
      Parameters:
      aIncludeSysvars - true to add projectid and simulationid first
      Returns:
      the names of the solution variables (category var)
    • getListOfControlVariables

      public Set<String> getListOfControlVariables()
      Returns:
      the variables that control the run: resource keys and the variables of resource and output frequencies and management rules