ADE 介绍

Revision as of 11:22, 12 September 2015 by Jhuawen (talk | contribs) (Created page with "下面的图形显示了一个ADE概念模型。你的应用程序调用由ADE接口类暴露的函数。这些函数将信息返回给你的应用程序,并从你的应用...")

ADE 用户指南 >

此章对Analytica决策引擎(ADE)做了全面概述,同时总结了本书中所介绍的信息。

Analytica 决策引擎是什么?

Analytica决策引擎(ADE)是一个强大的COM组件,可以让你通过一个程序访问Analytica模型。ADE可以让你在服务器计算机上运行Analytica模型。 ADE提供了一个应用程序设计界面(API) ,通过该界面其他应用程序可以建立、读取、检查、分析、评估、修改、以及保存 Analytica 模型。例如,你能过建立一个可以通过web浏览器访问的用户界面,以便用户可以运行Analytica模型。或者你可以从其他可以提供输入、运行模型以及采集和显示结果的应用程序使用ADE访问你的Analytica模型。

虽然你可以通过API发布的命令使用ADE建立并编辑模型,但是通过使用Analytica企业版来实现此功能要方便的多(详情请参考Analytica入门教程和Analytica用户指南,包括Analytica用户指南中的“Analytica 企业版”章节)。在你获得一个Analytica模型后,你可以通过web浏览器或者其他应用程序使用ADE建立自定义用户界面,以连接模型和其他应用程序。

ADE通过两种形式提供,以便可以和各种应用程序兼容。这两种形式就是:进程内自动化服务器ActiveX控件Adew.dll,和COM本地自动化服务器ADE.exe。这些服务器所展现的这些类型、方法和属性可以从任何支持使用COM、ActiveX控件自动化,或者.NET 界面的编程环境访问。这些环境包括:VB、 VB.NET、ASP、ASP.NET、C#、Visual C/C++、J#、VB Script,以及 JavaScript等等。例如,你可以在32位Microsoft Windows 平台上使用Visual Basic或者C#为你的模型建立图形用户接口(GUIS),可以根据具体的应用程序和具体的最终用户类型调整。

下面的图形显示了一个ADE概念模型。你的应用程序调用由ADE接口类暴露的函数。这些函数将信息返回给你的应用程序,并从你的应用程序里面保存Analytic模型。

ConceptualModelofADE.jpg

Using the ADE Server

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.

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. 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, title, and description, as well as definition and value for variables.

You can access the value of a variable via the 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).

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.

The CARenderingStyle class provides control over formatting of returned values as numbers or text.

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.

See Also

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


You are not allowed to post comments.