Difference between revisions of "Model file formats"

(Footer nav was inconsistent)
m
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
[[Category: Analytica User Guide]]
+
[[Category: Analytica User Guide]]
 
[[Category: Models]]
 
[[Category: Models]]
  
Line 5: Line 5:
  
 
==Supported formats of model files==
 
==Supported formats of model files==
Analytica supports two formats for saving models — the default format and an XML format. Both formats are fairly easy-to-read text files, which you can view and edit in standard text editors and word-processor applications. (See examples below.)
+
Analytica supports two formats for saving models — the default format and an XML format. Both formats are text files, which are fairly easy to read. You can view and edit them in standard text editors and word processors. (See examples below.)
  
 +
== Selecting a file format ==
 
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.
 
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==
 
==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:
+
The default format lists each object starting with its class and identifier. Each subsequent line contains an attribute name, followed by “:”, and the attribute value. Here is part of a sample model file in the default format:
  
 
<pre style="background:white; border:white">
 
<pre style="background:white; border:white">
Line 19: Line 20:
 
Software version 4.0.0
 
Software version 4.0.0
  
Model Sample_old_file_format Title: Sample of old file format Author: Richard Morgan
+
Model Sample_old_file_format  
Date: Jun 1, 2007 11:55 PM Savedate: Jun 1, 2007 3:56 PM
+
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
 
Objective Net_income

Latest revision as of 19:53, 29 April 2025



Supported formats of model files

Analytica supports two formats for saving models — the default format and an XML format. Both formats are text files, which are fairly easy to read. You can view and edit them in standard text editors and word processors. (See examples below.)

Selecting a file format

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 starting with its class and identifier. Each subsequent line contains an attribute name, followed by “:”, and 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


Comments


You are not allowed to post comments.