createCodeStubsForSimVariables: Create java and xml code stubs from a csv file

View source: R/variable_generation.R

createCodeStubsForSimVariablesR Documentation

Create java and xml code stubs from a csv file

Description

The function creates Java code stubs for defining the fields, adding variables and initialising values. It creates XML subs for parameter file, as well as resource definition for parameter and input data, inputs for simcomponent and outputs.

Usage

createCodeStubsForSimVariables(
  variables,
  component = "MyComponent",
  outfolder = NULL,
  ...
)

Arguments

variables

dataframe or path to csv file with variables

component

name of SimComonent

outfolder

optional, if given code is written the folder's files

...

parameters passed to read.table (e.g. sep, dec etc.)

Details

The dataframe / CSV file should have columns

  • contenttype (one of: constant, input, state, rate, out)

  • id

  • description

  • datatype (Simplace Datatype or corresponding Java Datatype)

  • unit

  • min

  • max

  • default

Value

list of code snippets


simplaceUtil documentation built on Aug. 6, 2024, 3:01 p.m.