Difference between revisions of "Introduction to ADE"

m
 
(3 intermediate revisions by 2 users not shown)
Line 12: Line 12:
  
 
<!--T:4-->
 
<!--T:4-->
Although you can use ADE to build and edit models with commands issued via the API, it is usually much more convenient to use Analytica Enterprise for this purpose (see the Analytica Tutorial and Analytica User Guide for details, including the “Analytica Enterprise” chapter of the Analytica User Guide). After you have an Analytica model, you can use ADE to build a custom user interface via a web browser or other application, to interface the model with another application.
+
Although you can use ADE to build and edit models with commands issued via the API, it is usually much more convenient to use Analytica Enterprise for this purpose (see the [[Analytica Tutorial]] and [[Analytica User Guide]] for details, including the [[Analytica Enterprise]] chapter of the Analytica User Guide). After you have an Analytica model, you can use ADE to build a custom user interface via a web browser or other application, to interface the model with another application.
  
 
<!--T:5-->
 
<!--T:5-->
Line 23: Line 23:
 
[[File:ConceptualModelofADE.jpg|400px]]
 
[[File:ConceptualModelofADE.jpg|400px]]
  
==Using the ADE Server== <!--T:8-->
+
== Using ADE == <!--T:8-->
ADE provides objects of six OLE classes: [[CALicense]], [[CAEngine]], [[CAObject]], [[CATable]], [[CAIndex]], and [[CARenderingStyle]] (“CA” stands for Class Analytica). You use these classes to interact with your Analytica model through ADE. The [[CAEngine]] class contains methods and properties to open and close existing models, create new models, and access objects in your Analytica model.
+
ADE provides objects of six OLE classes that let other applications interact with an Analytica model running in ADE. We introduce these classes below.  It is important to distinguish these OLE object classes in ADE from the Analytica object classes. [[Class|Analytica classes]] include chance, decision, index, objective, and variable (which we refer to collectively as '''''variable classes'''''); model, module, and library (which we refer to collectively as '''''module classes'''''); functions, and attributes.  
  
<!--T:9-->
+
* [[CAEngine]]: This class contains methods and properties to open and close existing models, create new models, and access objects in your Analytica model. You must create a [[CAEngine]] object before your code can interact with ADE.  
It is important to distinguish these OLE object classes in ADE from the Analytica object classes. [[Class|Analytica classes]] include chance, decision, index, objective, and variable (which we refer to collectively as '''''variable classes'''''); model, module, and library (which we refer to collectively as '''''module classes'''''); functions, and attributes. You can access Analytica objects as instances of the [[CAObject]] class. This class provides properties and methods to get and set attributes of Analytica objects, including [[Identifier|identifier]], [[Title|title]], and [[Description|description]], as well as [[Definition|definition]] and [[Value|value]] for variables.
 
  
<!--T:10-->
+
* [[CALicense]]: You can create a [[CAEngine]] class directly, or you can first obtain a [[CALicense]] object, and then use it to create a [[CAEngine]]. The [[CALicense]] class can tell you whether your ADE license lets you to create a [[CAEngine]]. If it does not, it gives detailed information about why the [[CAEngine]] could not be created.
You can access the value of a variable via the [[CATable::ResultTable|ResultTable]] property of class [[CAObject]]. A [[CATable]] represents an Analytica '''''array''''' (also known as a '''''table''''') so that you can get or set its individual elements (also known as '''''cells'''''). Each element can be a '''''number''''' or a '''''string''''' value (termed a text value in Analytica).
 
  
<!--T:11-->
+
* [[CAObject]]: Instances of this class correspond to Analytica objects. It provides properties and methods to get and set attributes of Analytica objects, including [[Identifier|identifier]], [[Title|title]], and [[Description|description]], as well as [[Definition|definition]] and [[Value|value]] for variables.
A [[CATable]] has zero or more dimensions. Zero dimensions means it is '''''atomic''''' (it has a single element). Each dimension is identified by an Analytica index, represented by the [[CAIndex]] class. A [[CAIndex]] has a name and a list of labels, numbers, or strings used to identify the rows or columns (more generally, '''''slices''''') of the array. In Analytica, you identify dimensions of an array by name, not by order.  
 
  
<!--T:12-->
+
* [[CATable::ResultTable|ResultTable]] is a property of class [[CAObject]]. It provides access to a value that is an array or table. A [[CATable]] represents an Analytica '''''array''''' so that you can get or set its individual elements  ('''''cells'''''). Each element may be a '''''number''''' or a '''''string''''' (a [[text]] value in Analytica).  A [[CATable]] has zero or more dimensions. Zero dimensions means it is '''''atomic''''' (a single element).  
The [[CARenderingStyle]] class provides control over formatting of returned values as numbers or text.
 
  
<!--T:13-->
+
* [[CAIndex]]: Each instance of this class identifies a dimension of an array, and corresponds to an Analytica index. A [[CAIndex]] has a name and a list of labels, numbers, or strings used to identify the rows or columns (more generally, '''''slices''''') of the array. In Analytica, you identify dimensions of an array by name, not by order.
Before your code can interact with ADE, you must create a [[CAEngine]] object, from which all else is obtained. You can create a [[CAEngine]] class directly, or you can first obtain a [[CALicense]] object, and then use it to create a [[CAEngine]]. The [[CALicense]] class can tell you whether your ADE license allows you to create a [[CAEngine]], and provide more detailed information about why the [[CAEngine]] could not be created when a failure occurs.
+
 
 +
* [[CARenderingStyle]]: This class provides control over formatting of returned values as numbers or text.
  
 
==See Also== <!--T:14-->
 
==See Also== <!--T:14-->
 +
  
 
<!--T:15-->
 
<!--T:15-->

Latest revision as of 19:35, 16 May 2018

Other languages:
English • ‎中文 • ‎中文(中国大陆)‎

ADE User Guide >

This chapter provides an overview of the Analytica Decision Engine (ADE) and summarizes the information presented in this book.

What is the Analytica Decision Engine?

The Analytica Decision Engine (ADE) is a powerful COM component that helps you to access Analytica models via a program. ADE lets you run any Analytica model on a server computer. It provides an Application Programming Interface (API) through which other application programs can create, read, check, parse, evaluate, modify, and save Analytica models. For example, you can create a user interface accessible via a web browser so that users can run Analytica models as web applications. Or you can use ADE to access your Analytica model from another application that can supply inputs, run the model, and collect and display results.

Although you can use ADE to build and edit models with commands issued via the API, it is usually much more convenient to use Analytica Enterprise for this purpose (see the Analytica Tutorial and Analytica User Guide for details, including the Analytica Enterprise chapter of the Analytica User Guide). After you have an Analytica model, you can use ADE to build a custom user interface via a web browser or other application, to interface the model with another application.

ADE is provided in two forms so that it is compatible with a wide range of applications. These forms are an ActiveX in-process automation server, Adew.dll, and a COM local automation server, ADE.exe. The classes, methods, and properties exposed by these servers are accessible from any programming environment that supports the use of COM, ActiveX Automation, or .NET interfaces. Such environments include VB, VB.NET, ASP, ASP.NET, C#, Visual C/C++, J#, VB Script, and JavaScript. For example, you can use Visual Basic or C# to create graphical user interfaces (GUIs) on 32-bit Microsoft Windows platforms for your Analytica models, tailored to specific applications and specific classes of end users.

The figure below shows a conceptual model of ADE. Your application makes calls to the functions exposed by the interface classes of ADE. Those functions then return information to your application. Server objects allow you to read, check, parse, evaluate, modify, and save Analytica models from within your applications.

ConceptualModelofADE.jpg

Using ADE

ADE provides objects of six OLE classes that let other applications interact with an Analytica model running in ADE. We introduce these classes below. It is important to distinguish these OLE object classes in ADE from the Analytica object classes. Analytica classes include chance, decision, index, objective, and variable (which we refer to collectively as variable classes); model, module, and library (which we refer to collectively as module classes); functions, and attributes.

  • CAEngine: This class contains methods and properties to open and close existing models, create new models, and access objects in your Analytica model. You must create a CAEngine object before your code can interact with ADE.
  • CALicense: You can create a CAEngine class directly, or you can first obtain a CALicense object, and then use it to create a CAEngine. The CALicense class can tell you whether your ADE license lets you to create a CAEngine. If it does not, it gives detailed information about why the CAEngine could not be created.
  • ResultTable is a property of class CAObject. It provides access to a value that is an array or table. A CATable represents an Analytica array so that you can get or set its individual elements (cells). Each element may be a number or a string (a text value in Analytica). A CATable has zero or more dimensions. Zero dimensions means it is atomic (a single element).
  • CAIndex: Each instance of this class identifies a dimension of an array, and corresponds to an Analytica index. A CAIndex has a name and a list of labels, numbers, or strings used to identify the rows or columns (more generally, slices) of the array. In Analytica, you identify dimensions of an array by name, not by order.
  • CARenderingStyle: This class provides control over formatting of returned values as numbers or text.

See Also

ADE User Guide <- Introduction to ADE -> Installation of ADE
Comments


You are not allowed to post comments.