Files

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 APM.COLDSTART, APM.DBS_READ, and APM.CSV_READ. The DBS file configuration parameters starting with APM. are always read regardless of the APM.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 APM.COLDSTART=1)
  3. DBS file (skipped when APM.DBS_READ=0, except header parameters)
    • defaults.dbs
    • problem.dbs
    • measurements.dbs (source is Replay.csv when APM.REPLAY>=1)
    • overrides.dbs
  4. CSV file (skipped when APM.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.