Model file formats
Supported formats of model files
Analytica supports two formats for saving models — the default format and an XML format. Both formats are text files, and are fairly easy to read. You can view and edit them in standard text editors and word processors. (See examples below.)
Analytica normally saves a new model in the default format. You can change to the XML format in by checking Save in XML Format in the Save as dialog when you first select Save from the File menu, or whenever you select Save as. It remembers and reuses the format you select in future sessions.
Sample default file format
The default format lists each object with each attribute on a separate line. The first line gives its class and identifier. Subsequent lines give each attribute name, followed by “:” followed by the attribute value. Here is part of a sample model file in the default format:
{ From user Richard Morgan, Model Sample_old_file_format ~~ at Jun 1, 2007 3:56 PM } Software version 4.0.0 Model Sample_old_file_format Title: Sample of old file format Author: Richard Morgan Date: Jun 1, 2007 11:55 PM Savedate: Jun 1, 2007 3:56 PM Objective Net_income Title: Net income Units: $ millions Definition: Revenues - Expenses Nodelocation: 304,64,1 Variable Revenues Title: Revenues Units: $ millions Definition: 700 * (1+ 0.10)^(Year - 2003) Nodelocation: 176,32,1 Variable Expenses Title: Expenses Units: $ millions Definition: Table(Year)(750, 750, 780, 800, 850) Nodelocation: 176,96,1 Close Sample_old_file_format
Sample XML file format
Here is part of the same model, saved in the XML format:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <ana user="Richard" project="Sample_XML_file_format" generated=" Jun 1, 2007 3:57 PM" software version="4.0.0" software="Analytica"> <model name="Sample_XML_file_format"> <title>Sample XML file format</title> <author>Richard Morgan</author> <date> Jun 1, 2007 11:55 AM</date> <saveauthor>Richard Morgan</saveauthor> <savedate>Fri, Jun 1, 2007 3:57 PM</savedate> <fileinfo>0,Model Sample_XML_file_format, 2,2,0,1, C:\Documents\Upgrade guide\Netincome example XML.ANA</fileinfo> <objective name="Net_income"> <title>Net income</title> <units>$ millions</units> <definition>Revenues - Expenses</definition> <nodelocation>304,64,1</nodelocation> <nodesize>48,24</nodesize> <valuestate>2,313,273,197,250,0,MIDM </valuestate> <numberformat>1,D,4,2,0,1</numberformat> </objective> <Variable name="Revenues"> <title>Revenues</title> <units>$ millions</units> <definition>700 * (1+ 0.10)^(Year - 2003)</definition> <nodelocation>176,32,1</nodelocation> <nodesize>48,24</nodesize> </Variable> <Variable name="Expenses"></code> <title>Expenses</title></code> <units>$ millions</units></code> <definition>Table(Year)(750, 750, 780, 800, 850)</definition></code> <nodelocation>176,96,1</nodelocation></code> <nodesize>48,24</nodesize></code> </Variable> </model> </ana>
See Also
- Create a model
- Example Models
- Model Licensing
- Model File Character Encoding
- Stochastic Information Packets (SIPs)
- COM Integration
- Text functions
- Save
Enable comment auto-refresher