APM Python Interface Documentation
APM Python Functions
The following Python functions are available in the apm.py file available by downloading the APM Python toolbox.
- apm(server,app,aline) - Send commands to the server
- Typical commands are 'clear all', 'clear csv', 'clear apm', 'solve'.
- 'clear all': Clear the prior application
- 'clear csv': Clear just the data file (CSV)
- 'clear apm': Clear just the model file (APM)
- 'solve': Solve the problem
- apm_get(server,app,filename) - Retrieve a file from the server
- apm_info(server,app,type,aline) - Classify a parameter or variable
- More information about FV, MV, SV, and CV types
- Type FV: Fixed value, one decision or fixed value over the time horizon
- Type MV: Manipulated variable, multiple decision values over the horizon
- Type SV: State variable, view in web-viewer but don't control
- Type CV: Controlled variable with target variable
- apm_ip(server) - Retrieve the client IP address
- Example: ip = apm_ip('https://apmonitor.com')
- apm_load(server,app,filename) - Load model file
- apm_meas(server,app,name,value) - Specify a measurement
- apm_option(server,app,name,value) - Set an option
- apm_sol(server,app) - Retrieve the solution
- apm_tag(server,app,name) - Retrieve an option
- apm_t0(server,app,mode) - Retrieve an restart file
- apm_web(server,app) - Open a web interface to the dashboard
- apm_web_root(server,app) - Open a web interface to the root directory
- apm_web_var(server,app) - Open a web interface to the variable values
- csv_data(server,app,filename) - Load data file locally
- csv_element(name,row,replay) - Retrieve an element from loaded csv data
- csv_load(server,app,filename) - Load data file
- csv_lookup(name,replay) - Retrieve the column number for a variable