System Files

The APMonitor modeling language has five core files that it uses to configure problem data, extract model information, and store previous results. The only file required to run a problem is the main model file with extension .apm. All of the files are editable by any text editor.

  • APM: Model File (required)
  • INFO: Information File (optional)
  • DBS: Database File (optional)
  • T0: Solution File for Warm Re-starts (optional)
  • CSV: Data File (optional)

Order of Data Access

Information is accessed in a specific order. File reads can be skipped when various DBS file parameters are adjusted such as NLC.COLDSTART, NLC.DBS_READ, and NLC.CSV_READ. The DBS file configuration parameters starting with NLC. are always read regardless of the NLC.DBS_READ parameter status. These configuration parameters have default values in the case that problem.dbs is not present.

  1. APM file
  2. T0 files
    • rto.t0
    • ss.t0
    • mode.t0 (skipped when NLC.COLDSTART=1)
  3. DBS file (skipped when NLC.DBS_READ=0, except header parameters)
    • defaults.dbs
    • problem.dbs
    • measurements.dbs (source is Replay.csv when NLC.REPLAY>=1)
    • overrides.dbs
  4. CSV file (skipped when NLC.CSV_READ=0)

The first file that is accessed is the APM file. The model parser extracts all default values set in the APM file and assigns that value over all data sets or over the time horizon.

Once the model is initialized with default values, the program then looks for default values in the rto.t0 file and ss.t0 file. If these files are used to initialize a dynamic problem, the steady-state values are propogated along the time horizon. As a final step, the program attempts to read the warm-start file for that specific mode. The mode indicates the warm-restart file name (ss.t0, mpu.t0, rto.t0, sim.t0, est.t0, or ctl.t0).

The DBS files are read next, starting with defaults.dbs and finishing with overrides.dbs. Most of the problem configuration information is stored in problem.dbs. This file is re-written every cycle and contains all of the information set by other DBS files or values that are adjusted by validity limit checks.

The DBS file contains information that is relevant to the current conditions. The CSV file contains information about previous or future values. The CSV file contains rows of data that represent a time-series or data sets used in parameter estimation.