analysisserveruserguide - phoenix integration · 2017. 5. 16. · analysisserveruserguide...

99
Analysis Server User Guide This manual explains the basic principles and functionality of the Analysis Server, a software system that enables users to incorporate legacy software into reusable components that can be published on a network. This manual also discusses seven utilities for creating new software components: AnalysisLibraryWrapper , FileWrapper , ExcelWrap- per , ScriptWrapper , PerlWrapper , PXCWrapper , and Java Bean component authoring. The Analysis Server answers several questions that have plagued engineering analysis groups for years: l "How can I provide multi-platform access to our legacy software?" l "How do I make our complicated, convoluted codes a little easier for novices to use?" l "Why do I have to spend all day writing input files and parsing output files when I only want a few critical val- ues?" The Analysis Server allows the user to control complex engineering programs through a simple set of commands (e.g. get, set, and execute). This interface is consistent across all Analysis Server components, so users who understand how to manipulate one component can manipulate them all. The result is enhanced user-friendliness without rewriting the original software. Distributed access and ease of use are only the tip of the Analysis Server's capabilities. Its command set can be incor- porated into a client program, which means that other programs can directly access data from Analysis Server com- ponents. An Analysis Server client can transfer data directly from legacy software to an Excel workbook, for example. If the client program has an integration architecture, it is possible to make several previously stand-alone leg- acy programs from geographically distant, hardware distinct machines work together as though modules of a single program. This manual provides useful information for those who wish to author components and place them on a server machine or use Analysis Server components on their own machines. Topics l The Analysis Server Overview l Installing and Configuring the Analysis Server l Analysis Server Security l Analysis Server Commands l Adding Your Components to the Server l The AnalysisLibraryWrapper Utility l The FileWrapper Utility l The ExcelWrapper Utility l The ScriptWrapper Utility l The PerlWrapper Utility l The PXCWrapper Utility l Custom Components Using Java l Setting up a Naming Service Quick Links l FAQ (online) l Build History l FileWrapper Statements l aserver.conf Syntax

Upload: others

Post on 15-Aug-2021

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: AnalysisServerUserGuide - Phoenix Integration · 2017. 5. 16. · AnalysisServerUserGuide ThismanualexplainsthebasicprinciplesandfunctionalityoftheAnalysisServer,asoftwaresystemthatenables

Analysis Server User GuideThis manual explains the basic principles and functionality of the Analysis Server, a software system that enablesusers to incorporate legacy software into reusable components that can be published on a network. This manual alsodiscusses seven utilities for creating new software components: AnalysisLibraryWrapper, FileWrapper, ExcelWrap-per, ScriptWrapper, PerlWrapper, PXCWrapper, and Java Bean component authoring. The Analysis Server answersseveral questions that have plagued engineering analysis groups for years:

l "How can I provide multi-platform access to our legacy software?"l "How do I make our complicated, convoluted codes a little easier for novices to use?"l "Why do I have to spend all day writing input files and parsing output files when I only want a few critical val-

ues?"

The Analysis Server allows the user to control complex engineering programs through a simple set of commands (e.g.get, set, and execute). This interface is consistent across all Analysis Server components, so users who understandhow to manipulate one component can manipulate them all. The result is enhanced user-friendliness without rewritingthe original software.

Distributed access and ease of use are only the tip of the Analysis Server's capabilities. Its command set can be incor-porated into a client program, which means that other programs can directly access data from Analysis Server com-ponents. An Analysis Server client can transfer data directly from legacy software to an Excel workbook, forexample. If the client program has an integration architecture, it is possible to make several previously stand-alone leg-acy programs from geographically distant, hardware distinct machines work together as though modules of a singleprogram.

This manual provides useful information for those who wish to author components and place them on a servermachine or use Analysis Server components on their own machines.

Topicsl The Analysis Server Overviewl Installing and Configuring the Analysis Serverl Analysis Server Securityl Analysis Server Commandsl Adding Your Components to the Serverl The AnalysisLibraryWrapper Utilityl The FileWrapper Utilityl The ExcelWrapper Utilityl The ScriptWrapper Utilityl The PerlWrapper Utilityl The PXCWrapper Utilityl Custom Components Using Javal Setting up a Naming Service

Quick Linksl FAQ (online)l Build Historyl FileWrapper Statementsl aserver.conf Syntax

Page 2: AnalysisServerUserGuide - Phoenix Integration · 2017. 5. 16. · AnalysisServerUserGuide ThismanualexplainsthebasicprinciplesandfunctionalityoftheAnalysisServer,asoftwaresystemthatenables

Analysis Server OverviewThe Analysis Server enables users to incorporate analysis software into reusable components that can be published ona network. Once published, users can access these components from any computer on a network, regardless of theirplatform type, through a simple protocol. The Analysis Server protocol is similar to the HTTP protocol used to pub-lish web documents; as long as the components are properly placed on the server's computer, they can be accessedand used generically. The Analysis Server allows users to control computationally intensive software from cheaper,lightweight platforms. The Analysis Server also hides the details of data management from the user. This means thatthe user can concentrate on what the data means rather than how to make it fit into an arcane file format for a legacyprogram. This chapter explains the concept behind the Analysis Server and its benefits to engineers.

ConceptThe Analysis Server provides generic access and control for components through a technique known as softwarewrapping. Since the advent of object-oriented technology, programmers have used wrapping as a means of reusinglegacy software in object-oriented environments. A software wrapper is a thin software program or module that con-verts program-specific input and output operations into generic sets of commands that can apply to a wide range ofprograms. For example, an engineer may have a FORTRAN program that uses input and output decks. In order topublish the program on the Analysis Server, they could write a wrapper allowing them to enter all inputs and run theprogram using get and set operations, like these:

>set program.input1 = 3value set for <program.input1>>execute programprogram completed.>get program.output16.0

Notice that engineers do not have to write the actual input decks for the program; in fact, they do not need to knowthat the program requires input decks at all. Once the component author invests the one-time effort required to writethe wrapper, the wrapper automatically performs the tedious task of writing the input and output file. This leaves theengineer free to focus on results. Most input and output files can be wrapped quickly and easily using the FileWrap-per utility. Even files with hundreds of inputs and outputs can be wrapped using the FileWrapper utility in a minimalamount of time. If more flexibility and control is desired, the author can write a wrapper in Java.

A user is not limited to accessing components through an interactive session. Developers can write Analysis Server cli-ents that can access components automatically. For example, it is possible to write Excel spreadsheet routines that callan Analysis Server component repeatedly to perform a parametric study. Programmers can write Analysis Server cli-ents in a variety of languages, such as Perl, Java, and C++. The Analysis Server can also be reused as an OLE auto-mation component. Because it is possible to connect to the Analysis Server from multiple locations simultaneously,several users can access the same code from different workstations.

Benefits

Page 3: AnalysisServerUserGuide - Phoenix Integration · 2017. 5. 16. · AnalysisServerUserGuide ThismanualexplainsthebasicprinciplesandfunctionalityoftheAnalysisServer,asoftwaresystemthatenables

As mentioned, one benefit is saving time otherwise spent building and troubleshooting complex files. When softwareis used extensively as an R&D or production tool, users may spend a large portion of their time on this tedious, error-prone task. Smart users write scripts that partially automate some of the repetitiveness of these tasks, but these scriptsoften require program-specific knowledge to use. The Analysis Server's simple get and set methods allow users tooperate the code without worrying about these details.

The flexibility of software wrapping also allows the Analysis Server to present legacy software as a set of severalsimple-to-use components rather than as a complex, monolithic program. Expert users understand all of a program'shigh-level features and can interpret its data accurately and confidently. Basic users operate the program occasionallyfor a limited number of tasks and may lack the overall conceptual understanding. These basic users may present adilemma since they cannot reliably use the program in all situations, but may not have an expert available for con-sultation. The Analysis Server solves this dilemma by allowing developers to create one wrapper that exposes theentire program for the expert user and one wrapper that exposes only one or two well understood features to thenovice.

Writing Analysis Server client programs provides another benefit. Developers can integrate several analysis com-ponents into a single program where they can share data dynamically. These programs can be written with drivers,such as optimizers and graphing tools, that can treat these components as a unified whole. For example, a user can cre-ate a client that links a UNIX-based FORTRAN analysis to a PC based business application. With the client, the usercan enter a range of analysis inputs and then graph these inputs against the outputs of the business application. If a bet-ter analysis becomes available, the user can swap the new program for the old one without affecting the client,provided that the new program's wrapper has the same interface functions as the old one.

Phoenix Integration has created an Analysis Server client called ModelCenter that enables users to access all the Ana-lysis Servers available on a given network, retrieve their components, and compose them visually into a model con-taining several components and their data sharing relationships. These relationships, called links, enable users tographically assign the outputs of one analysis to the inputs of another, creating a chain of linked analysis programsthat can operate as a single unit. Users can then employ a collection of tools to perform operations such as graphing,parametric sweeps, and optimization on the integrated model.

Analysis Server TerminologyA public_aserver directory is a base user directory that holds all of the categories and components that a user haspublished. When the user establishes a connection to the Analysis Server, the Analysis Server searches for all the pub-lic_aserver directories that it can find in a specified path. The Analysis Server's configuration file specifies that path.Each public_aserver is listed as a category when the user performs a listCategories command.

The public_aserver directory is similar to a public_html directory; all items inside this directory are accessible to thepublic, but no items outside of these directories are accessible. Typically, each user in a multi-user system can own apublic_aserver directory in their home directory, just as they can own a public_html directory.

The analyses directory provides the base repository for Analysis Server components. When publishing a widelyused component on the Analysis Server, it can be placed inside of the analyses directory. The analyses directory is amaster directory for components; components in this directory and its subdirectories belong to the Analysis Server

Page 4: AnalysisServerUserGuide - Phoenix Integration · 2017. 5. 16. · AnalysisServerUserGuide ThismanualexplainsthebasicprinciplesandfunctionalityoftheAnalysisServer,asoftwaresystemthatenables

itself rather than to individual users with accounts on that server. When users want to publish their own components,the components can also be placed in their public_aserver directories.

A category is a grouping of components inside an Analysis Server directory. A category hierarchy is analogous to aconventional directory structure inside the computer's directory hierarchy. It is actually implemented by creating sub-directories inside the analyses directory or any public_aserver directory on a server machine. The user can create ahierarchical organization of categories by placing subdirectories inside higher-level category directories. The user canalso place any number of components (which are analogous to conventional computer files) inside any category orsubcategory directory.

When a public_aserver directory is created in a designated directory on the server machine, the Analysis Server usesthe name of that directory as its base category. Users are responsible for creating, maintaining, and documenting anycomponents that they place in their public_aserver directory. The user can traverse a category structure using thelistCategories (la) command and a slash (/) syntax.

A component is a wrapped analysis code with a generic interface for setting input values, retrieving output values,and running the analysis. The term component is used here because the wrapper makes it possible to combine the ana-lysis with several other components to form a larger model. A component can be as simple as a parameterized geo-metric object or as complicated as a wrapped computational fluid dynamics (CFD) code. Typically, a component willperform a calculation based upon a set of inputs and then provide the results of the calculation.

The ExcelWrapper utility is a tool that helps users convert Excel spreadsheets into components through a simple spe-cification method. This manual contains a section that discusses how to use ExcelWrapper, and provides anExcelWrapper example. Each ExcelWrapper component is defined by a file that has a .excelWrapper extension.

The FileWrapper utility is a tool that helps users create components for file-in/file-out programs through a simplespecification method. This manual contains a section that discusses how to use FileWrapper, and provides a FileWrap-per example. Each FileWrapper component is defined by a file that has a .fileWrapper extension.

The PXCWrapper utility is a tool that helps users create components from a ModelCenter model. This manual con-tains a section that discusses how to use PXCWrapper, and provides a PXCWrapper example. Each PXCWrappercomponent is defined by a file that has a .pxcWrapper extension.

The ScriptWrapper utility is a tool that helps users create components using different installed scripting languages.This manual contains a section that discusses how to use ScriptWrapper, and provides a ScriptWrapper example.Each ScriptWrapper component is defined by a file that has a .scriptWrapper extension.

The AnalysisLibraryWrapper utility is an extension to the ScriptWrapper utility that provides additional features tomanage PHX AnalysisLibrary content. This manual contains a section that discusses how to use Ana-lysisLibraryWrapper, and provides a AnalysisLibraryWrapper example. Each AnalysisLibraryWrapper component isdefined by a file that has a .analysisLibrary extension.

A .jar file is a special Java file that stores a set of Java classes. When the user chooses to create Analysis Server com-ponents through Java programming, the component is saved into a .jar file and placed in the analyses directory or apublic_aserver directory.

Page 5: AnalysisServerUserGuide - Phoenix Integration · 2017. 5. 16. · AnalysisServerUserGuide ThismanualexplainsthebasicprinciplesandfunctionalityoftheAnalysisServer,asoftwaresystemthatenables

Java is a pure object-oriented language that provides platform independence and dynamic class loading capability.These unique capabilities allow the Analysis Server to dynamically access components and enjoy platform inde-pendence. You can write your own components using Java and automatically publish them on the Analysis Server

A method is a function that operates on a component's data. All components require an execute method that controlshow to run its analysis and an end method that operates when the component is terminated. Components typicallyhave methods for retrieving and assigning data values as well.

An object or a component instance is an instance of a component. The Analysis Server allows users to run severalobjects of the same component on one server. For example, say a component that computes the area of a circle existson an Analysis Server. A user who wants to compute the area of two circles can either start one object and run ittwice, or start two objects and run each with a different input radius.

A property is a characteristic of a component. Properties include the component's individual inputs and outputs.They also include hierarchical groupings of properties. For example, an object called cooling_system may be instan-tiated from a component that computes the total volume of a cooling system. It may include inputs from the system'sexpansion tank, piping, heat exchanger, and pump. The cooling system components themselves can be listed as prop-erties. Their associated input parameters can be listed as subproperties. Users can traverse an object's property hier-archy using a dot syntax. In this example, the user could list the properties of the pipe subsystem by typing

>listProperties cooling_system.pipe

and set its radius equal to 3 by typing

>set cooling_system.pipe.radius = 3

The PerlWrapper utility is a tool that enables users to write components as Perl scripts. The PerlWrapper is a goodtool for writing simple components, especially conversion routines and small functions, quickly. This manual containsa section that discusses how to use PerlWrapper and provides a PerlWrapper example.

A tag is a special word in the comment line of a FileWrapper, PerlWrapper, or ExcelWrapper file that specifies adescriptive field for the component. An Analysis Server component contains six such fields: author, description, ver-sion, iconFile, helpURL, and keywords. These description fields are optional when creating a component.

A wrapper is a thin piece of software that enables analysis programs to be published as a reusable component. Wrap-pers hide program-specific quirks and enable users to access programs and their data generically.

See also Analysis Server

Build History12/15/2014 Version 7.4 Released

Upgraded to Java 1.8.Implemented a Data Librarian, allowing Analysis Server to interface with AnalysisLibrary.Added support for .pacz files.

Page 6: AnalysisServerUserGuide - Phoenix Integration · 2017. 5. 16. · AnalysisServerUserGuide ThismanualexplainsthebasicprinciplesandfunctionalityoftheAnalysisServer,asoftwaresystemthatenables

Added a getScratchDirectory() function to the AnalysisServer API.Resolved an issue with the Analysis Server web interface on Linux.Resolved an issue which prevented Direct File Transfer from working properly between AnalysisServer 7.3 instances running on different computers.Resolved an issue where running Analysis Server for the first time without a license would notproperly create user directories.Fixed a bug that could cause AnalysisLibrary wrappers to fail if two clients attempt to start thesame wrapper simultaneously.General updates to documentation.

3/14/2014 Version 7.3 ReleasedAdded two new commands, getDimensions and setDimensions, which allow for resizing arrayson the server.Added a new argument to omit files when using the getHierarchy command.Added a new command, getSystemProperty, which provides information about the system theserver is running on.Added a binary mode to the getByUrl command to enable sending binary files over the networkdirectly with no conversion.Improved the performance of file variables. File contents are now stored on disk instead of inmemory.Fixed a bug where restoring defaults would not work on the Directories configuration page.Improved performance when using Run Shares.Fixed an error that could occur when syncing the variables between an Analysis Server groupand a ModelCenter group if any variables were removed.Fixed an issue where non-numeric references were always converted to double instead of the cor-rect reference type.Added support for .pxcz file format with pxcWrapper.Fixed an issue in ScriptWrapper where the defineVariable function would use the last row in thefile if an invalid index was specified.Fixed loading error with Reference Arrays in PxcWrapper. Reference Arrays are now hidden inPxcWrappers unless they reference only doubles.General updates to documentation.

5/20/2013 Version 7.2 ReleasedUpgraded to Java 1.7Added documentation on File DefinitionsAdded information on PXCWrapperGeneral enhancements to the help documentationUpdated the documentation on Java ScriptWrappersAdded the ability for bookmarks to contain quotation marks, commas, and pipe ('|') characters

Page 7: AnalysisServerUserGuide - Phoenix Integration · 2017. 5. 16. · AnalysisServerUserGuide ThismanualexplainsthebasicprinciplesandfunctionalityoftheAnalysisServer,asoftwaresystemthatenables

Added the ability to set the binary state of a file variable directly in the variable declaration inScriptWrappersAdded an AnalysisLibrary wrapper which allows you to create a component that uploads, down-loads, or creates dependencies with files as part of a ModelFixed a bug with loading Data Object class variablesFixed a bug that was causing the data tree for PXCWrapper object components to not get prop-erly recreatedFixed a bug that was preventing an error message from being shown when a problem occurredwith a PXCWrapper objectFixed some bugs that were causing the section on Python in the help documentation to not be dis-played properlyFixed a bug that was preventing halt from working over SSH style connectionsFixed a bug that was causing failed runs over SSH/CLI style connections when the ScriptWrap-per's security settings were also enabledFixed a bug that was causing child processes to be left behind when a model being ran with mul-tiple copies was haltedFixed a bug that was causing QuickWrap to enter an unstable state after adding a resizable arrayvariableAdded missing information for the Command Line Options page in the help documentationFixed a bug that was causing input files generated by scriptWrapper in Linux to get doublespaced

6/8/2012 Version 7.1 ReleasedAdded the ability to run executable in a specified directory for QuickWrapFixed a backwards compatibility bug that prevented scripts that use PHXRunShare from workingin Analysis Server 7.0Fixed a bug that prevented "Run each execution request in a temporary folder" from working inQuickWrapImproved performance of QuickWrap with very large files. Increased file size limit.Improved error handling in ExcelWrapper to prevent zombie Excel processes.Added ability in Java Data Objects to specify an external .jar file to callMade handling of escaped values in enumerations more reliable throughout productsFixed Analysis Server to run properly as a service in all cases on Vista/7Fixed some cases where ScriptWrappers would leak memoryFixed a bug that prevented bookmarks from working correctly in some cases in QuickWrapFixed a bug that prevented a particular error from being reported correctly with FileWrapperMade pxcWrapper work for models that contain Data ObjectsFixed an omission that you could not specify a default value for arrays in ScriptWrapperFixed an issue that can cause out of memory problems with large files in QuickWrap when wrap-

Page 8: AnalysisServerUserGuide - Phoenix Integration · 2017. 5. 16. · AnalysisServerUserGuide ThismanualexplainsthebasicprinciplesandfunctionalityoftheAnalysisServer,asoftwaresystemthatenables

Allowed ScriptWrapper and QuickWrap execute statements to use ${INPUT_FILE_1}/${OUTPUT_FILE_1} notation to automatically place in file names on command lineFixed several hangs in QuickWrap when selecting columns of data from very long linesFixed bugs with displaying Japanese characters in QuickWrapFixed a bug handling special characters such as backslash and quotes in QuickWrap delimitersFixed an issue where a QuickWrap progress dialog was "always on top", preventing you fromusing other applicationsFixed a bug that could cause QuickWrap to list variables multiple times when reloading a file.Fixed a bug that caused Save As in QuickWrap to still show the old filename.Fixed a bug that can cause a NullPointerException in QuickWrap when reloading a file that onlycontains binary output files.Fixed a bug that prevented QuickWrap from working in non-english locales.Fixed a bug that caused the communications channel to fail in some cases using SSH style con-nections. This caused halting to not work from ModelCenter.

5/16/2011 Version 7.0 ReleasedSettings and log files have been moved to <UserDir>\Phoenix Integration\AServer7 so that side-by-side install with older Analysis Server won't conflict. <>/UserDir>ModelCenter and Analysis Server are now officially supported on Microsoft Windows 7 andVista.Analysis Server now delivers with Java 1.6.Added a new variable type "Object". Data Objects allow for custom variables for easily creating,linking, and maintaining complex data sets.Added the ability to parse binary output files in script wrappers and QuickWrap.Added the ability to control script wrapper AutoDelete options from the QuickWrap interface.Added search functionality to QuickWrap input and output files.Fixed a bug that broke the ability to use various multidimensional FORTRAN arrays in Quick-Wrap when using columns mode.Fixed a bug with character spacing in the QuickWrap file view.Fixed various issues with translated strings in QuickWrap.Fixed a bug would not let users "pick" a range for arrays in QuickWrap.Fixed a bug that caused the cursor to occasionally disappear when editing a script in QuickWrap.Fixed a bug that caused QuickWrap to immediately appear unsaved when loading a script wrap-per.Fixed a bug that allowed the user to delete code from the un-editable section in a QuickWrapscript.Fixed a crash caused by loading a script wrapper in Standalone QuickWrap when on the ScriptView tab.Fixed a bug where any error caused while loading a script wrapper in Standalone QuickWrap

Page 9: AnalysisServerUserGuide - Phoenix Integration · 2017. 5. 16. · AnalysisServerUserGuide ThismanualexplainsthebasicprinciplesandfunctionalityoftheAnalysisServer,asoftwaresystemthatenables

Fixed a bug that allowed multiple variables by the same name in QuickWrap, which erroredwhen run.Fixed a bug where QuickWrap failed to run nested batch files.Fixed an issue with the QuickWrap frame loading so large that the menu options were not visible.Fixed a bug that caused "System.exit(0)" calls in a script wrapper to terminate the running Ana-lysis Server.Fixed a bug that caused QuickWrap to leak temporary batch files used to execute the component.Fixed a security exception that could occur when trying to instantiate a Java class in a script wrap-per.Added a maximize and minimize button to the Standalone QuickWrap GUI (does not affectModelCenter Plug-In version).File handles opened when running a script wrapper should now do a better job of closing on com-pletion.Improved the performance of transferring large files between ModelCenter and Analysis Server.QuickWrap no longer auto adds upper and lower bounds.Fixed a mistake in the ScriptWrapper help instructing the use of setGroup: "" instead of setGroup"". Made both forms also work now.Fixed a bug in the Analysis Server client API so that you no longer have to specify the portunless it is non-default.Fixed a bug that no error was reported when a bookmark isn't found in QuickWrap.QuickWrap and ScriptWrappers can now handle files with different encodingsHandle ascii file variables that contain null characters betterFixed a bug that sometimes caused the elapsed time to not update in QuickWrapUpgraded Python to v2.5.4Fixed a bug that when a runshare component is run in parallel there could be errorsFixed a bug that prevented file input variables from working with proxied connectionsFixed a bug in wildcards with access control lists in aserver.conf.Added an option to override the IP address reported to clients in case your local IP address is notcorrectly identified (usually when there are multiple adaptors on the box).Grouped variables in Java based ScriptWrapper can now be directly accessed with a simple dot-ted notation (group1.group2.varName).Explicitly error instead of silently ignoring timeout values on Java, Jython and Python ScriptWrap-pers.The launcher application will now write logs to the user's temp folder.Analysis Server now supports files larger than 2GB.Fixed a bug that ExcelWrapper couldn't handle empty cellsFixed a bug that could cause Analysis Server to not pass along authentication information throughpxcWrapper to inner Analysis Server connections.

Page 10: AnalysisServerUserGuide - Phoenix Integration · 2017. 5. 16. · AnalysisServerUserGuide ThismanualexplainsthebasicprinciplesandfunctionalityoftheAnalysisServer,asoftwaresystemthatenables

Error if a PHXRowFieldFile defines overlapping sections.1/12/2009 Version 6.0.2 Released

QuickWrap 2.0 Standalone now included with Analysis Server.Fixed a bug with running Analysis Server out of a folder with high Unicode characters in thename.Fixed a bug that setDelimiters("none") wasn't treating whole line as one field.Added support for reading numbers like 1.5-9. Some programs like Nastran do this.PXCWrapper now explicitly validates the asked for variables instead of blindly doing a "validateall".Fixed a bug that could cause an Index Out Of Range error in ExcelWrapper.Fixed a bug that causes some ScriptWrapper input files to be generated incorrectly when theScriptWrapper is started once and run multiple times.

4/30/2009 Version 6.0.1 ReleasedFixed a bug that causes some text files with particular Unicode characters to break downloadingthe value and ModelCenter to hang.Added support for Microsoft Vista and Microsoft Vista x64 platforms.NOTE: Configuration and log files are now located within your user's directory instead ofthe install directory.Fixed a bug that prevented absolute paths from working when specifying the icon file for a wrap-per.Performance improvements for loading large files in QuickWrap. Turn off Auto-Import as a work-around for remaining issues.Added ability to do $username and $password substitutions for the currently logged in user inFileWrappers.When using VBScript ScriptWrappers, you can now write an OnHalt method that will be calledwhen the component is halted.Updated code so that Analysis Server is compatible with Java 1.6. The included JVM on Win-dows was upgraded to Java 1.5.0_17.Fixed a bug that prevented ScriptWrappers written from the QuickWrap tool from being able torun.Fixed broken links in help file delivered with Analysis Server 6.0.

12/12/2008 Version 6.0 ReleasedInternationalized Analysis Server and added support for UTF-8 and Unicode content.Added a Graphical File Wrapping capability called Quick Wrap which replaces the old File Wrap-per Editor with an easy to use point-n-click interface for wrapping arbitrary file input/outputexecutables.For compatibility with CenterLink, Analysis Server now understands wrappers that are stored in".analysis" folders the same as the way they are stored in CenterLink's Analysis Library.

Page 11: AnalysisServerUserGuide - Phoenix Integration · 2017. 5. 16. · AnalysisServerUserGuide ThismanualexplainsthebasicprinciplesandfunctionalityoftheAnalysisServer,asoftwaresystemthatenables

Made the Java security policy file more configurable by the user.Fixed a bug that prevented proxy mode naming services from working (.link files)Fixed a bug that caused a Syntax Error in a Python Wrapper if the very first script line had codeon it.Added a phxExecutables global variable to Python and Java based Script Wrappers for con-venience.Made PXCWrapper now support geometry variables.Fixed a bug that sometimes under load would cause binary files to have incorrect contents.Fixed bug that caused line numbers to be reported incorrectly in Python Script Wrappers.Added a warning message that cleanTempDir() is not for customer use.Fixed a bug that crashed Analysis Server if you attempted to use a Script Wrapper of extremelength.Made it possible to have multiple paths listed in the userPath configuration directive.Made the CVS librarian compatible with CVSNT on Windows.Fixed a bug that prevented ExcelWrappers with input arrays from working correctly.Fixed a bug in the wrapper processing that made it impossible to use commas inside of Enu-merated Values or Aliases in a wrapper.Fixed a crash that was caused by improper error handling in the Python Wrapper.Fixed a bug that causes an Excel process to be left behind from ExcelWrapperMade RunShare lock against a .lck file instead of the actual wrapper to solve random errors withparallel runs on Windows.Updated licensing to FlexNet 11.4 series. Enabled early return of borrowed features. (Will requirean update to any floating license servers)Fixed a bug with arrays that sometimes caused a NullPointerExceptionAdded an undocumented LDAP authentication module.Rewrite of the ExcelWrapper capability to be more reliable. Implementation is by dynamicallywriting a ScriptWrapper, which can then be edited for customization.Additions to make file-based ScriptWrappers easier to use (supporting the Wrapper Editor work)

05/30/2007 Version 5.11 ReleasedFixed a bug that prevetned DebugMonitor from working.Made Java Script Wrappers have access to the logged in user's name and password.

21933 Fixed a bug that caused Excel processes to be left behind when using Excel Wrapper21991 Fixed a bug that caused custom librarians to be instantiated twice

04/30/2007 Version 5.1 Released336 02/13/2007 Added ability to handle CenterLink queues.

Made FileWrapper prompt statement now translate $ keywords and user variables.Fixed bugs with the way text files were read that caused the last newlines of the file to sometimesnot come out identical to the file loaded.

Page 12: AnalysisServerUserGuide - Phoenix Integration · 2017. 5. 16. · AnalysisServerUserGuide ThismanualexplainsthebasicprinciplesandfunctionalityoftheAnalysisServer,asoftwaresystemthatenables

Fixed several bugs with file variables and the Direct File Transfer featureFixed a bug that prevented halting from working correctly in some casesFixed a bug that prevented Model files with convergers from working in the PXCWrapper.Added an overloaded run method on PHXRunShare which allows you to specify the directory.Fixed a bug that made FileWrappers sometimes allow illegal changes to resizable arrays.Now log Java version and OS information to the log fileFixed a condition that caused heartbeating to failMade Direct File Transfer work correctly even if the wrapped file does not correctly exist in theRunShare directory (if the wrapper calls "readFile" or "fromFile" with an absolute path)Fixed a bug that caused the executables file to not be read in some cases when using relativepathsFixed a bug with trying to use setDelimiters in a FileWrapper and backslashed valuesFixed a bug that could cause a password to get written to a log fileMade pxcwrapper clean up more reliablyFixed a bug in ExcelWrapper's visible=method statement that prevented showing ExcelFixed a bug that prevented a ScriptWrapper's onEnd method from being called

10/01/2006 Version 5.0.2 Released335 10/01/2006 Performance improvements and fixed some leaky file handles.334 8/24/2006 Fixed a bug where the FileWrapper utility was locking to the wrong file.

333 8/21/2006 Improved logging messages when a component is not found to make debugging componentseasier.

332 8/17/2006Fixed 2 issues with ssh based connections and Analysis Server command line mode. The firstissue caused the connection to hang if a component wrote output to System.out. The second issuecaused the Analysis Server process to not go away when the input stream was closed.

7/25/2006 Version 5.0.1 Released

331 7/25/2006 Fixed an issue where direct transfer files urls wouldn't get parsed properly if they containedspaces.

330 7/19/2006 Fixed an issue in pxcwrappers where variables directly under an Assembly wouldn't be found the2nd time running a component.

329 7/17/2006 Fixed pxcwrappers to be haltable328 7/14/2006 Fixed an issue where Progress Monitoring wasn't working in a timely fashion.

327 7/13/2006 Fixed an issue where halted components weren't immediately reporting back that they had beenhalted.

6/06/06 Version 5.0 Released326 1/15/2006 Fixed an intermittent hang when using the Analysis Client package.

325 11/15/2005 Added the ability to call to a "local" copy of the Analysis Server within the current process usingthe com.phoenix_int.aserver.client package. See PHXAnalysisClient.connectLocal().

324 9/19/2005 Fixed a bug that prevented using the Naming Services when the destination box is using SSL

Page 13: AnalysisServerUserGuide - Phoenix Integration · 2017. 5. 16. · AnalysisServerUserGuide ThismanualexplainsthebasicprinciplesandfunctionalityoftheAnalysisServer,asoftwaresystemthatenables

encryption.

323 9/12/2005 Added the "setGroup" command to the RawInputFile and RawOutputFile sections of FileWrap-pers.

322 8/30/2005 Added code to recognize CenterLink specific parameters in the connection dictionary and to sub-mit job execution information back to CenterLink as jobs are run for debugging and logging.

321 8/30/2005Added JobSubmission, JobIdRegex, and JobNodeRegex parameters as a way to cause all execut-ables launched via the PHXRuntime facility automatically be pushed off to an external load bal-ancing system such as LSF.

320 8/30/2005 Added a connection specific dictionary of parameters which can be used to send system inform-ation from a client to the server.

319 8/17/2005

Added ability to specify locations for common executables and other files in the Analysis Serverconfiguration and reference them from ScriptWrappers and FileWrappers using standard $ vari-able notation. This allows for making wrappers that are generic across computers which mayhave different installation locations.

318 8/16/2005 The directory used for RunShare directories is now fully configurable to any location.

317 8/8/2005 Added ability to specify a variable name for a ScriptWrapper timeout so that the timeout can becontrolled from within ModelCenter.

316 8/8/2005 Added Python and Jython as scripting language choices. Using Python on some platforms mayrequire a one-time compile operation.

315 8/4/2005 Fixed a crash where Analysis Server would shutdown incorrectly on logoff/shutdown and whenbeing stopped when it ran as a service.

314 7/30/2005

Made "direct connections" for file variables possible. Now, Analysis Server can deal with files bypassing around a URL instead of the actual contents of the file, and the file can be transferredright as needed direct from Analysis Server to Analysis Server without having to downloadthrough ModelCenter.

313 6/20/2005 Made it possible to have spaces for enumerated aliases using quotes

312 5/20/2005 Added ability to make a description for raw file variables in Java Beans, File Wrappers, andScript Wrappers.

311 5/1/2005 Fixed a bug where the version information returned for a wrapper incorrectly reported the author.

310 4/21/2005

Added ability to call Analysis Server via SSH from the client instead of running a service.l Analysis Server will be running as the user logged in with the correct file and executable

permissionsl Analysis Server does not need to be started up as a servicel Analysis Server can be launched via a command line interface

3/18/05 Version 4.1 Released

309 1/10/05 Naming Service files (.link files) may now contain multiple destination URLs. When used in redir-ect mode it will do a simple round-robin load balancing between the various servers.

308 10/21/04 Fixed a bug with the PXCWrapper that prevented it from working correctly for some computers.

307 10/21/04 Updated Windows installer to make service "interactive with the desktop" to resolve issues whereAnalysis Server components were configured to try and pop up a dialog.

Page 14: AnalysisServerUserGuide - Phoenix Integration · 2017. 5. 16. · AnalysisServerUserGuide ThismanualexplainsthebasicprinciplesandfunctionalityoftheAnalysisServer,asoftwaresystemthatenables

306 10/21/04 Updated documentation to fix some bad examples, add some new API statements, and clear upsome wording

305 10/21/04 Improved an error message when Excel is not installed and you try to use the ExcelWrapper.304 10/21/04 Fixed an problem that prevented installation on SunOS 5.8

303 10/21/04 Fixed an error message to be more clear when a fortran style FileWrapper array is missing values.

302 8/02/04 Fixed a bug where a file with a newline as the first character can cause an IndexOutOfBound-sException in the FileWrapper.

301 7/20/04 Fixed a problem with calling executables from FileWrapper that happens rarely on some NTboxes.

300 6/10/04 Updated most platforms to JRE 1.5.

299 5/7/04 Added capability for wrapper methods to pass back additional information about whether the cli-ent should resync input values.

5/1/04 Version 4.0.1 Released

298 4/7/04 Fixed a FileWrapper problem which caused programs that do lots of output on stdout and stderrstreams to run really slow.

297 3/23/04 Fixed hasChanged flag on PHXBoolean and PHXString to work correctly.296 3/15/04 Fixed issue with extra newlines being added to a text file.

295 3/11/04 Fixed a bug with infinite recursion when using Run Share in a ScriptWrapper and '*' as a filter forcopying files.

294 1/28/04 Fixed a bug with negative numbers in Fortran format not getting parsed correctly if they had lead-ing whitespace.

293 1/15/04 Fixed a bug with the timeout argument of the "script:" statement in ScriptWrapper throwing anerror when loading the component.

292 11/12/03The keyVariable command in the FileWrapper utility found the last occurrence on the line of thestring instead of the first. It now uses the first. Note that when using occurrence > 1, it still onlycounts one instance per line as it is searching.

291 11/12/03 Fixed incorrect transposing of arrays when reading a 2d array into a 1d array in FileWrappers andJava ScriptWrappers.

290 11/12/03 Added optional default icon for associations file in the associations.dat file.

289 10/6/03 Fixed Issue #2300 - Reading multi-line description tags was ambitious and didn't stop reading at acomment break.

288 9/30/03 Fixed a bug where units and description information was getting lost when calling transferArray().

287 7/30/03 Fixed a bug in using negative occurrence values for markAsBeginning and markAsEnd.286 7/29/03 Added IPHXLineStore interface to public interface to make customizing the file parser possible.

6/1/03 Version 4.0 Released285 5/29/03 Moved CATIAWrapper to the Solutions Archive

Page 15: AnalysisServerUserGuide - Phoenix Integration · 2017. 5. 16. · AnalysisServerUserGuide ThismanualexplainsthebasicprinciplesandfunctionalityoftheAnalysisServer,asoftwaresystemthatenables

284 5/13/03 Made fileWrapper accept either setDelimiter or setDelimiters283 2/4/03 Added sleep() method to ScriptWrapper's wrapper object.282 1/2/03 Added ability to handle 2-d arrays from ExcelWrapper using the ndims=2 option.

281 12/17/02 Fixed method invocation so that you no longer need to override the invoke(String) method. Itautomatically looks for a java method in your class by that name that takes no arguments.

280 11/1/02 Fixed a bug where UNIX builds would not kill processes when fileWrappers were halted.279 10/29/02 Added multi-diminsional array support.

278 10/29/02 When using ExcelWrapper and an Excel file which has external links, forced the "Update Links"dialog to not display (links are always updated).

277 10/29/02 For consistency with ModelCenter, made both toFile/fromFile and writeFile/readFile both workin all places where raw files are used.

276 10/29/02 Fixed bugs with handling classes and beans inside of packages when using Java Bean com-ponents.

275 10/29/02 Updated SSL libraries to JSSE v1.0.3-01274 10/29/02 Fixed a bug with adding a new user to a group which has a space in the groupname.273 9/12/02 Added a heartbeat command and feature to act as a keepalive for firewalls.

9/11/02 Version 3.1.2 Released

272 9/6/02 Fixed a ScriptWrapper bug where parent groups were not always deleted when removing childvariables.

271 9/6/02 Fixed a Windows specific bug which caused intermittent crashes when using the new licensingcode

270 9/3/02 Fixed a NullPointerException which happens when calling macros in ExcelWrapper with someversions of Excel (Issue #1211).

8/9/02 Version 3.11 Released269 8/9/02 Added ability to remove a group from a simple self manager.

268 8/8/02 Fixed bug where Fortran style 'D' notation (0.334D+03) wasn't understood when using thefformat option on a variable.

267 8/7/02 Corrected the heirarchical behavior of .aserver security files to be more usable when denyAc-cessByDefault is turned on.

8/1/02 Version 3.1 Released

266 7/15/02 Improved licensing on the Windows Operating System. Can now be tied to a hard drive serialnumber or use advanced network features.

265 7/15/02 Fixed a potential deadlock at startup where modal dialog boxes could appear behind the main win-dow.

264 7/15/02 Added a "has version info" boolean to component descriptions.

263 6/13/02 Added FileWrapper-like API calls to the ScriptWrapper utility when language="java". Featuresinclude file parsing, run share modes, process monitoring and halting

262 6/13/02 Added beanShell provider to the scriptWrapper facility. This allows for writing cross-platform

Page 16: AnalysisServerUserGuide - Phoenix Integration · 2017. 5. 16. · AnalysisServerUserGuide ThismanualexplainsthebasicprinciplesandfunctionalityoftheAnalysisServer,asoftwaresystemthatenables

scripts in the Java language. See www.beanshell.org for more information about the scripting lan-guage

261 6/13/02 Updated to the latest SSL libraries

260 6/3/02 Associations are now listed even if the necessary class cannot be loaded. An error is generated ifthere is an attempt to load such a component.

10/8/01 Version 3.0 Released259 4/10/02 Added Analysis Server Express and Analysis Server Enterprise versions.258 2/6/02 Made Analysis Server work as an NT Service.

257 2/5/02 Added monitorable streams so that components which implement IPHXMonitorable can exposemonitor data to ModelCenter's Progress Meter without having to add a real variable

256 1/21/02 Added 'ps' command to API which allows clients to monitor processes and resource usage of com-ponents

255 1/21/02 Added archiving and versioning features11/12/01 Version 2.22 Released

254 11/12/01 Corrected an issue with sending large arrays to Excel253 10/18/01 Added "monitor" command for monitoring non-binary raw output files.

10/8/01 Version 2.21 Released252 10/6/01 Corrected an issue with returning string text with ASCII characters >127.

251 9/27/01 Added checkInputsAfterRun option to ExcelWrapper to have Analysis Server monitor for inputchanges after an ExcelWrapper finishes running.

250 9/18/01 Added backgrounding feature to any command to enable process monitoring

249 9/06/01 Added checksums (using Adler32 algorithm) to component descriptions which can be used todetermine if files have changed.

9/14/01 Version 2.2 Released248 8/20/01 Fixed bug where setGroup could not be "reset" in fileWrapper (setGroup "").247 8/14/01 Added a toggle to turn off multicast publishing of services.246 8/14/01 Added a Restart capability and improved the system shutdown.245 8/7/01 Fixed a bug that causes extra newlines on Windows with RowField Input/Output files.

244 8/6/01 Made Analysis Server publish all available services via multicast so that clients can automaticallyfill in SSL service.

243 8/6/01 Added "configure" button to the GUITable Row Outside Table:8/1/01 Version 2.1 Released

242 7/19/01 Methods can now have a human readable nameTable Row Outside Table:241 7/19/01 Added reinitialize method to ExcelWrapper to reload inputs from ExcelTable Row Outside Table:240 7/16/01 Fixed cases that caused ExcelWrapper to not correctly shut down Excel when there was an errorTable Row Outside Table:239 7/16/01 Added capability to handle boolean values in ExcelWrapperTable Row Outside Table:238 7/02/01 Added the Web Administrator.Table Row Outside Table:

Page 17: AnalysisServerUserGuide - Phoenix Integration · 2017. 5. 16. · AnalysisServerUserGuide ThismanualexplainsthebasicprinciplesandfunctionalityoftheAnalysisServer,asoftwaresystemthatenables

237 7/01/01 Added the promptVar option to the prompt statement in FileWrappers and ExcelWrappers.Table Row Outside Table:

236 6/28/01Removed DNS lookups unless absolutely necessary (when an allow: or deny: statement uses ahostname instead of IP address). Because of the underlying Java implementation of DNS look-ups, this is a needed for scalability.

Table Row Outside Table:

235 6/21/01 Added authentication.234 6/20/01 Added the removeVariable() and addMethod() statements to ScriptWrappers

233 6/5/01 Performance enhancements to stream large "raw" files directly to and from the disk instead ofloading the whole thing into memory

232 5/28/01 Fixed a bug in the removeMissingVariables statement that caused the second of two consecutivemissing variables to not be removed.

231 5/1/01 Added the "file" type to ScriptWrappers230 4/26/01 Fixed a bug where prompting didn't work in ExcelWrapper utility.

229 4/26/01 Fixed a bug which created invalid data using fformat=Fw.d where d>=9 in the FileWrapper util-ity.

228 4/26/01 Fixed a bug that causes invalid license exceptions when using multiple analyses directories.227 4/26/01 Added enumAliases to ExcelWrappers

226 4/24/01 Improved SSL handling. Added SSL options to config file for controlling the server key and cer-tificate file format and password. Also enabled SSL in proxy connections.

225 3/20/01Corrected problem with FileWrapperand having a variable with the same name as a group. Alsoimproved performance of accepting connections, which increased ability to handle large numbersof clients.

224 3/20/01 Added preliminary SSL features.223 3/20/01 Added Naming Services via ".link" files.

222 3/18/01 Enabled parsing of FORTRAN double-precision formatted numbers within FileWrappers, e.g."3.112D005"

221 3/16/01 Extended ExcelWrappers to support user-callable macros and the method value for the visiblecommand.

220 3/16/01 Added support for binary files as RawInputFiles and RawOutputFiles.219 3/16/01 Added the prompt statement to FileWrappers and ExcelWrappers.218 1/5/01 Added the CATIAWrapper facility217 12/4/00 Fixed a bug in the FileWrapperwhen using negative offsets for a field with non-default delimiters

216 10/15/00Added a reference property to the PHXReference and PHXReferenceArray classes.ModelCenter will set this property to the the variable the reference points to in the Model. Thevalue can be used for diagnostic and logging purposes.

215 10/14/00

Updated the runShare FileWrapper setting to support copying directories to and deleteting dir-ectories from the temporary run directory. Also added the "auto" value to the autoDelete option.This setting deletes the temporary run directory unless an error occurs while running the wrapper.The default is now auto.

214 10/12/00 Updated the ScriptWrapper facility to support creating wrapper variables at run-time.

Page 18: AnalysisServerUserGuide - Phoenix Integration · 2017. 5. 16. · AnalysisServerUserGuide ThismanualexplainsthebasicprinciplesandfunctionalityoftheAnalysisServer,asoftwaresystemthatenables

213 10/11/00Fixed a problem that caused wrapper files to remain open after a describe command is issued.This prevented wrapper files from being modified while the component was currently loaded intoModelCenter.

212 9/21/00 Updated the FileWrapper syntax to be case insensitive. Also improved the error reporting for pars-ing errors in FileWrappers: variable and file names are now reported for all parsing errors.

211 9/21/00 Added the licenseFile option to the aserver.conf to specify the location of the license file

210 9/18/00 Added the enableHTTPService option to the aserver.conf file to enable/disable the http services.The default is now disabled.

209 9/13/00Improved the handling of commands executed in FileWrappers on Windows NT computers. Spe-cifically, codes that end up in infinite loops will be terminated properly when a connection to theAnalysis Server is lost.

208 9/7/00 Added support for the occurrence option in the keyVariable statement.

207 9/4/00Added the removeMissingVariablesstatement. This statement allows the Analysis Server toignore variables specified in wrappers that cannot be found in corresponding input and outputfiles.

206 8/31/00Fixed a bug that prevented the Java client API from allowing the set command to be used for val-ues that contain cr/lf characters. This action previously caused the client to throw an exceptionand hang.

205 8/15/00 Fixed a bug that caused a null pointer exception if a template file was not specified for a RawIn-putFile

204 7/19/00 Added the "shell" option for specifying the UNIX shell to use when running programs in aFileWrapper. See the run statement for more information.

203 7/1/00 Introduced the ScriptWrapperfacility. This wrapper type allows scripts written in VBScript,JScript or any other Active Script language to be used as a component.

202 6/14/00 Replaced the internal timeout scheme with FlexLM. A license file is now required to be located inthe license sub-directory.

201 6/14/00 Updated the internal storage of integer types in FileWrappers to use long primitive types.

200 5/23/00 Fixed a bug in FileWrappers for parsing arrays spanning multiple columns. If non-whitespacecharacters were used as delimiters it was possible to parse incorrect fields.

199 5/22/00 Updated FileWrappers to use new capabilities in Java 1.3 to run external programs.

198 5/13/00 Improved support for handling large files in FileWrappers. Files as large as 50 meg can now behandled without the Analysis Server running out of memory.

197 5/4/00Fixed the currency conversion problem for ExcelWrappers. Currency formats are now properlyconverted to a double type rather than a long value. Note that Excel only exports 4 decimal placeprecision for currency formats.

195 3/23/00

Improved performance for fast running codes wrapped using FileWrappers. To reduce CPUusage, the Analysis Server previously checked programs for execution completion at 1 secondintervals. This caused fast running codes (<1sec) to appear to require one second to complete.The algorithm has been updated to handle fast running codes without consuming CPU resources.

194 3/14/00 Updated the runShare option to delete temporary directories immediately after the user's con-

Page 19: AnalysisServerUserGuide - Phoenix Integration · 2017. 5. 16. · AnalysisServerUserGuide ThismanualexplainsthebasicprinciplesandfunctionalityoftheAnalysisServer,asoftwaresystemthatenables

nection to the Analysis Server is closed. They were previously not deleted until the Java GarbageCollector was run.

193 3/14/00

Added the ability to specify path names in quotes in the aserver.conf file. Quotes around pathswere not required, and if used, generated an error. Paths with or without quotes are now sup-ported. For example, the following statements will both work:

analysesPath: analyses;"d:\my folder"analysesPath: analyses;d:\my folder

192 2/27/00 Bug Fix: updated the ExcelWrapper to allow the full path name to be specified for the Excel file(so that it can be located on other drives).

191 2/22/00

Improved the string substitution routines for user variables to recognize brackets. For example, thefollowing can be used to substitute a string:

fileToParse: ${fileName}.inAlso updated syntax error messages for FileWrappers to echo the source line for easier debug-ging.

190 2/18/00 Added the ability to specify the port number to use to connect to the Analysis Server from theJava Analysis Client API.

189 2/7/00 Finalized the API for Driver Components.

188 2/3/00Fixed a bug in the keyVar statement. If a field value was specified that is greater than the numberof fields following the search string, the last field was erroneously returned. An error is now gen-erated.

187 1/21/00

Added some special cases to the setDelimiters statement:

setDelimiters defaultsetDelimiters whitespacesetDelimiters none

186 1/20/00 Updated the fformat option used in FileWrappers to accept lower case formating characters, e.g."I3" or "i3".

185 1/17/00 Fixed a bug that caused extra copies to Excel to sometimes hang around when an ExcelWrapperis used.

184 1/12/00Added a time stamp value to the describe command. This value indicates the last time the com-ponent was modified. For a FileWrapper, ExcelWrapper or other association type, this is the dateof the wrapper file. For a Java Bean, this is the date of the .jar file.

183 1/10/00

Added support for extended lines in the file parsing routines. For example, the following is nowcorrectly recognized in FileWrappers:

variable: w double 2 2 description="weight" \units="inches" \lowerBound=2 \upperBound=20

Page 20: AnalysisServerUserGuide - Phoenix Integration · 2017. 5. 16. · AnalysisServerUserGuide ThismanualexplainsthebasicprinciplesandfunctionalityoftheAnalysisServer,asoftwaresystemthatenables

182 12/20/99 Reverted the PHXInteger class to storing ints instead of longs and introduced the PHXLong classfor storing longs.

181 12/6/99 Rearranged some internal code so that the PerlWrapper utility is compiled as part of the primarybuild.

180 11/15/99 FileWrapper: When a wrapped program fails to execute correctly, its standard error output isincluded in the error message.

179 11/2/99Bug Fix: Corrected a parsing problem in FileWrappers. Integers that appeared as floating pointvalues in files were incorrectly parsed. They are now rounded to integer values. Updated the pre-cision of PHXInteger to store long values instead of ints.

178 11/1/99 Fixed a garbage collection problem that resulted in out of memory errors after prolonged use ofthe Analysis Server. Added the listArrayValues command.

177 10/7/99 Added the IPHXAlwaysWriteable interface. This is a specialized interface that is used to indicatethat a particular Java object is writeable, even if one of it's parent owners is not.

176 10/3/99 Added the initial components for a web interface. You can now use a web browser to connect dir-ectly to the Analysis Server

175 9/21/99 Added support for detection of driver components. The @driver tag was added to associationcomponents. The describe command was also enhanced to report this value.

174 9/20/99 Bug Fix: corrected a problem with the Analysis Client code incorrectly reporting request ids, res-ulting in a null pointer exception.

173 9/14/99 Superceded the analysesDir setting in the aserver.conf file with the analysesPath value. Thisallows the Analysis Server to scan multiple root directories.

172 8/25/99 Changed the default for the failIfNotChanged option to false. See the parse command for moreinformation.

171 8/24/99 Added the reference type for use in FileWrappers.

170 8/15/99

Added support for Driver components in addition to Analysis components. The primary methodfor an Analysis component is the execute() method. The Driver component differs in that it iscalled multiple time by the client to perform it's task - iteratively solving for some solution.Example driver components include optimizers, DOE tools, and Monte Carlo tools. For moreinformation, see Creating Components Using Java.

Improved the process of shutting down connections. As soon as a connection is broken from theAnalysis Server, any processes associated with the connection are immediately terminated.

169 8/9/99 Added the enumAliases option to FileWrapper statements that support enumValues: variable,array, keyVar, and userVar.

168 7/20/99 Changed the error reporting method for parsing ".aserver" files. Previously, errors were silentlyignored. Now error are either reported to the log file, or to stderr if no log file exists.

167 7/15/99Bug Fix: corrected a problem with userVars. You can now use a userVar that fully specifies apath for a file (e.g. fileToParse, fileToGenerate, etc). Previously it only worked for specifying filenames, but not full paths such as "/home/input.dat" or "d:/temp/input.dat".

166 7/15/99 Added UDP server which allows client applications (ModelCenter) to dynamically find machines

Page 21: AnalysisServerUserGuide - Phoenix Integration · 2017. 5. 16. · AnalysisServerUserGuide ThismanualexplainsthebasicprinciplesandfunctionalityoftheAnalysisServer,asoftwaresystemthatenables

that are running Analysis Server.

165 6/18/99

Added the ability to specify names for RunCommands sections in FileWrapper components.These sections are displayed and invoked using the listMethodsand invoke commands. SpecialRunCommands sections, named initialize, execute, and end will be automatically invoked whenthe component is started, executed, and terminated.

164 6/1/99 Added the invoke and listMethods commands. A reinitialize() method was added to FileWrappercomponents to allow them to reload values from initializationFilesand/or templateFiles.

163 5/25/99 Added the getSysInfo command.

162 4/26/99

Updated several features of the ExcelWrapperfacility.l Improved performance by, upon execution of a component, only sending input values to

Excel that have changed.l Changed the implementation of the excelShare option to not create a temporary copy of

the .xls file when the share mode is false. The other modes (true and auto), still create tem-porary copies of the file.

l Changed the default excelShare setting to false.161 4/22/99 Fixed a bug in build 157 that caused RawInputFilesto be stored as read-only variables.

160 4/13/99

Added the keyVariable statement to the FileWrapper utility. These statements identify variables infiles with respect to some key. For example, if your file looks like:

var1: ###var2: ###var3: ###You can now parse the file using the following statements in a RowFieldInputFile orRowFieldOutputFile.

setDelimiters " "keyVar: var1 double "var1:"keyVar: var2 double "var2:"keyVar: var3 double "var3:"

159 4/12/99

Added the regex=true|false option to the markAsBeginning and markAsEnd commands. Thisoption controls whether the search string is a regular expression or just a string that should befound in the file. The value was previously always a regular expression. The new default is not aregular expression.

158 4/12/99

Added security for controlling who connects to the Analysis Server and what categories they areallowed access to. The Analysis Server now uses allow and deny commands specified in theaserver.conf file to determine which clients are allowed to connect, and additionally checks the.aserver security file in the appropriate directory when a user performs any listCategories, listCom-ponents, describe, or start commands to determine if that user has the required privileges.

157 3/16/99 fixed a bug in the FileWrapper Editor that caused the shift key not to work on some UNIXmachines.

156 3/16/99 added the failIfNotChanged option to parse statements. Now, by default a FileWrapper will fail ifit is detected than an output file has not changed before it is parsed.

Page 22: AnalysisServerUserGuide - Phoenix Integration · 2017. 5. 16. · AnalysisServerUserGuide ThismanualexplainsthebasicprinciplesandfunctionalityoftheAnalysisServer,asoftwaresystemthatenables

155 3/16/99 added the userVar statement. Also added the allowPartialRead option to raw files.

154 2/24/99 fixed a bug in autoVars where if the user set it to true without giving a group name it simplyignored the request. Now it puts them at the top level like it used to.

153 2/19/99 fixed a bug that caused empty cells in Excel to cause null pointer exceptions when an ExcelWrap-per is first loaded.

152 1/29/99 changed the autoVarsto default to false for the FileWrapper.

151 1/28/99 fixed 2000 line limitation bug in Data File Window of the FileWrapper Editor. Added drag selectcapability for arrays to the FileWrapperEditor.

150 1/19/99 added a timeout feature. Each Analysis Server release will expire approximately one year afterdownloading it. This was inserted to assure users are keeping up with recent releases.

149 12/22/98 added the autoVarscommand to FileWrapper.148 12/22/98 added a simple GUI for the Analysis Server. Launch by using the -gui command line argument.

147 12/15/98 Values returned from various commands are no longer sorted alphabetically. The order specifiedin wrappers is the same order things will be returned when the Analysis Server is queried.

146 12/15/98 Correct a bug that was displaying tags for associations as "unknown".145 12/9/98 Added the ability on PCs to specify a full path name for files in the aserver.conf file.

144 12/3/98 Added a setGroup statement to the ExcelWrapper. Also added some more error checking forgroup names.

143 11/17/98 Modified the markAsBeginningand markAsEnd commands to be able to specify occurrence andoffset values. Updated the set command to not need spaces before and after the equals sign.

142 11/9/98 Updated the directory to category mapping mechanism to ignore directories named CVS. Thisallows the CVS revision control system to be used to manage libraries of components.

141 11/4/98 Updated the files option for the runShare statement to use "*" in file names and changed thedefault option to not copy any files.

140 10/15/98 Added fformat option for FORTRAN style formatting and fixed some bugs with formatting.139 10/13/98 Added the PHXGeomInfo class for sharing geometry information with ModelCenter.

138 10/8/98 Fixed a bug where if one FileWrapperis waiting on a second one, the first one can possibly seethe results from the first.

137 10/7/98 Added a lastError property to the FileWrapper autoVars option. This value is used when a com-ponent fails while being run in the background.

136 10/5/98 Added ability to make FileWrapper RowFieldOutputFiles parse on the fly as data is requestedfrom them using the allowPartialRead option.

135 10/2/98Added @keyWords & @helpURL keywords to components. Added the runShare option to theFileWrapper mechanism. Also modifies listCategoriescommand to not display directories that startwith "."

134 10/2/98 Added more sub-info to arrays( first, last and for numbers max, min, sum, etc). Also added aglobal namespace where objects can be left running.

133 9/29/98 Added variable length arrays in FileWrapper input files.132 9/15/98 Added "visible" option for ExcelWrappers. Added enumValuesto FileWrapper. Added option

Page 23: AnalysisServerUserGuide - Phoenix Integration · 2017. 5. 16. · AnalysisServerUserGuide ThismanualexplainsthebasicprinciplesandfunctionalityoftheAnalysisServer,asoftwaresystemthatenables

parameters to ExcelWrapper: upperBound, units, etc131 9/11/98 Added format option for arrays.130 9/9/98 Removed listDefaults and loadDefaults commands.129 9/8/98 Internal restructuring of some packages.

128 9/8/98 Added functionality to guess the size of arraysin FileWrappers at startup & fixed an array parsingbug.

127 9/7/98 Added RawInputFileand RawOutputFiletypes to the FileWrapper mechanism.

126 9/4/98 Changed references to "class" to "component" so that documentation can be more consistent. Forexample, "listClasses" is not "listComponents"

125 9/2/98 Some more efficiency improvements

124 9/2/98 Some improved error reporting and the the addition of the autoChangeDir option to the run state-ment in the FileWrapper.

123 9/1/98 Some performance enhancements to the lv command122 8/31/98 Added checks to handle the situation when a log file cannot be created.

121 8/25/98 Added some performance improvements for network communication. Also fixed a few minorbugs.

120 8/24/98 Added first cut of FileWrapper generator. Also fixed a null pointer exception with the lv com-mand

119 8/18/98 general bug fix.

118 8/11/98

Added option to not scan user directories (using /etc/passwd). See the smartUserScan setting.Default is to not to perform the scan. Added capabilities for the same variable to be defined mul-tiple times in input files. This is useful if you want to write the same value to multiple spots in afile. Support for PC full file references in the FileWrapper(e.g. w:myfile). Lastly, added supportfor ignoring errors when running codes (ignoreErrors=true)

117 8/4/98Added a "valueStr" value to PHXInteger, PHXDouble, and PHXBoolean. This is the value thatwas passed to fromString() - useful when you want to see why a value could not be parsed. Alsoadded an option to ignore bad values (ignoreConversionErrors=true)

116 7/28/97 Added the ability to specify sheets in the ExcelWrapper and the ability to specify ranges in addi-tion to just cells. Ranges are mapped to arrays.

115 7/27/98 Added arrays to FileWrapper and shortened error message for exception responses114 7/24/98 Added the listValues command113 7/8/98 Added enumerated values to the PHXType java classes

112 6/29/98

Added -nonetwork option. Added PHXFile type. Added multiple simultaneous connection cap-ability to Excel. Added custom variable types to PHXSimpleSelfManager. Added backgroundprocessing via execute&and a getStatus command. Added support for upperBounds, units, andother PHXType properties to the FileWrapper variable mechanism. Added extraction of @authorand other tags from the association files.

111 6/29/98 Added code to change directories correctly on Windows computers for the run in theFileWrapper.

Page 24: AnalysisServerUserGuide - Phoenix Integration · 2017. 5. 16. · AnalysisServerUserGuide ThismanualexplainsthebasicprinciplesandfunctionalityoftheAnalysisServer,asoftwaresystemthatenables

110 6/18/98 Added PerlWrapper.109 6/11/98 rearranged PHXAnalysisClient code to get around a race condition.

108 bug fix - modified more value setting routines to automatically convert from doubles to othertypes. For example, you can now set a integer value to 10.4 without getting an exception.

107 bug fix - markAsBeginningnow works with input files, exceptions for missing tokens print theassociated variable names, and some basic type-checking for FileWrappers.

106 restructured package names.

105 added the initializationFilevalue to the FileWrapper. Also modified parsing routines to returnDouble.NaN when they can't parse a value rather than throwing an exception.

104 modified the FileWrapper so that it loads initial values for input and output files.

103 added array support for Java Beans, exception logging, the getLastError command, and format-ting and column settings for the FileWrapper.

102 added license information and the getLicense command.

101 added the regular expression search capability to the FileWrapper mechanism: statementsmarkAsBeginning, markAsEnd, and clearMarks.

100Exposed the build number to the outside world so that it displays at start up and via the getVer-sioncommand. Also added the ability to specify the Analysis Server port number in the aserv-er.conffile.

Archiving and Versioning Use CasesCase 1: E-Matrix PDM with Workflow Controls on Code UploadAcme Automotive sets up a centralized Analysis Server and dedicates virtual directories to each of its 8 businessgroups. Each virtual directory is actually an Archiving and Versioning plug-in to the configuration management toolthat the individual business chooses. The safety group has chosen to use the E-Matrix PDM system to controlreleases of their crash simulation codes.

Each of the safety group's engineers is outfitted with a local copy of the Analysis Server where they can develop theirwrappers. Once they are happy with their code, they submit the files to E-Matrix where workflow notifications aregenerated. The workflow sends the files for peer-review and management approval. Once the required signatures areacquired, E-Matrix promotes the code to “released” state and the central Analysis Server now automatically publishesthis code directly from the E-Matrix archive.

Updates to the code go through a similar workflow in the E-Matrix system and become available globally once E-Mat-rix promotes the code to the “released” state.

During a management review of a particular new code, it is decided that the code should be published only forinternal use within the department. The appropriate E-Matrix access control rules are established before promoting thecode to “released”. Once in released mode, only the appropriate people see the new code because Analysis Server ispassing login information to the E-Matrix plug-in.

Page 25: AnalysisServerUserGuide - Phoenix Integration · 2017. 5. 16. · AnalysisServerUserGuide ThismanualexplainsthebasicprinciplesandfunctionalityoftheAnalysisServer,asoftwaresystemthatenables

Case 2: Developer Group Prepares Wrappers for General Con-sumption A small group of developers have been tasked with creating wrappers for general use within the engineering depart-ment. There is a central Analysis Server used throughout the department. The developers will use CVS for con-figuration management of the wrapper files.

The developer group is outfitted with local Analysis Servers for development purposes. The developers simply usethe normal CVS checkout, update, commit process to write and commit new code.

The engineers are automatically able to run the codes via a shared Analysis Server which is configured to pull fromthe CVS archive. Once an engineer finishes with a particular project, all the associated data files and models arearchived in a centralized project directory.

The company is asked to develop a new product. Closer inspection reveals that this product is very similar to onedeveloped over three years ago. The project and model files are pulled from the centralized storage area and loadedup. Since CVS is always non-destructive, ModelCenter is able to pull up the exact same set of codes which wereused three years ago to develop the original product. A feasibility study is quickly run to determine if the newproduct has a reasonable risk factor.

Authentication Use CasesCase 1: Shared Server with public_aserver AccessThe aerospace engineering group of the Freebody Co wants to set up a centralized Analysis Server for everyone touse. Each engineer should be able to publish their own codes in a private area and then optionally expose certaincodes to specific users or groups. Each user should have full control over the access to their own codes. Addi-tionally, there should be a guest account which allows some minimal access without a password.

The central server is fitted with Analysis Server and accounts for each of the users. The Analysis Server is con-figured with the userDir directive to publish the the user’s private codes. Lastly, the Analysis Server is configured topiggy back off of the existing user accounts on the system.

One additional system account, titled ‘aserver’ is added and a group by the same name is added. This account is usedto run the Analysis Server. The Analysis Server needs permissions to write files in the users’ public_aserver dir-ectories, so each user who will be using the AS is added to the aserver group.

The Analysis Server is told to enable a guest account that doesn’t require a password.

Next, each user’s account is fitted with a public_aserver directory which has group write permissions for the ‘aserver’group. This will allow both the user and the Analysis Server to write to the directory. A directory by the name of‘private’ is added to each public_aserver directory and an .aserver file which permits only the specific user is createdthere. This makes it so that users can publish codes for only their use in the private directory or codes to which

Page 26: AnalysisServerUserGuide - Phoenix Integration · 2017. 5. 16. · AnalysisServerUserGuide ThismanualexplainsthebasicprinciplesandfunctionalityoftheAnalysisServer,asoftwaresystemthatenables

everyone has access in the public_aserver directory. If they wish more fine grained control, they can add their ownsub-directories and .aserver files themselves.

Case 2: Publishing an Analysis Server on the Internet Through a Fire-wallAcme Automobiles Inc. has a number of codes integrated and wrapped on their intranet. As an added service to theircustomers they would like to publish certain aspects of their codes to the internet using Analysis Server so that theircustomers could include up-to-date dynamic information to their models. They would like to be able to control andmonitor who is using the codes from the internet, while still providing open access on their intranet.

To do this, the Acme IT department sets up an Analysis Server Name Server on their firewall. They configure it touse flat files for username/password information and set up accounts for their customers. They then set up proxy style.link files for each of the codes they want to expose and use .aserver files to control access based on user logins. Fin-ally, they turn off the default service in favor of the SSL service and set the logging level so that they can monitorusage.

The last step is to configure their firewall to accept connections on the Analysis Server SSL port. Nothing needs tochange on the intranet.

Analysis Server Command-Line ArgumentsUsually the installer program will generate shortcuts and script files to automatically start Analysis Server in the cor-rect way. If you ever need to manually start the Analysis Server or modify the startup scripts, the following inform-ation will be useful. On most platforms, the Analysis Server is started using the following command:

Page 27: AnalysisServerUserGuide - Phoenix Integration · 2017. 5. 16. · AnalysisServerUserGuide ThismanualexplainsthebasicprinciplesandfunctionalityoftheAnalysisServer,asoftwaresystemthatenables

java [Java Options] -jar aserver.jar [AServer Options]On the Windows platform, there is an executable which automatically starts Analysis Server. It is used like this:

aserver.exe [Java Options] [AServer Options]All Java Options must be of the form -X<option> (this is how the program aserver.exe knows when the Java optionsend and the Analysis Server Options start). This executable is also used to install Analysis Server as an NT service onWindows NT, 2000, XP, Vista, and 7 computers. See Running Analysis Server as a Service for more information onthis mode.

Java OptionsDepending on how Java is installed on your machine, you may want to add some Java options to the command. Fora full list of available Java Options, see Sun's Online Documentation at http://java.sun.com/. These are the most com-monly used Java options with Analysis Server.-Xmx256M

By default Java limits the maximum amount of memory that it will ever ask for from the system. Thisoption sets this limit to 256Megabytes.

-native On UNIX platforms this tells java to use "Native" threads for performance. This option must be the firstargument on the command line.

Analysis Server OptionsIn all cases, optional Analysis Server command-line arguments may be specified to alter the behavior of the AnalysisServer.-c <configfile>

Specifies the Analysis Server configuration file to use. If this option is not specified, the Analysis Serverlooks for a file named "aserver.conf" in the current directory.

-non-etwork

Tells the Analysis Server that it is running on a machine that is not on the network. Use this option if youare experiencing timeout (long periods of time where the Analysis Server seems to hang) problems. Notethat when this option is used, security features are turned off.

-gui Causes the Analysis Server to display it's graphical user interface.-debug Causes the Analysis Server to echo commands sent to it to stdout

See also Analysis Server| Installing and Configuring the Analysis Server

Analysis Server Configuration File (aserver.conf)The Analysis Server configuration file (aserver.conf) contains settings that are used by the Analysis Server when it isfirst started. By modifying this file, you can control settings for:

l the port the server runs onl the path to be searched for stored analysis componentsl the path to find user's "public_aserver" directoriesl which hosts are allowed to connect to Analysis Server

The Analysis Server assumes default values for each setting. Users can override these values if desired.

Shown below is a sample configuration file.

Page 28: AnalysisServerUserGuide - Phoenix Integration · 2017. 5. 16. · AnalysisServerUserGuide ThismanualexplainsthebasicprinciplesandfunctionalityoftheAnalysisServer,asoftwaresystemthatenables

## this is the configuration file for the Analysis Server### the port for the server to run on#port: 1835 ## The path where analyses are stored.#analysesPath: analyses# # levels: # # 0 - none # 1 - connections only # 2 - component start and end # 3 - get, set # 4 - all # loggingLevel: 1 ## The user path specifies the directories to search for user# account. The Analysis Server searches for "public_aserver"# directories within user directories. The path is a semicolon# separated list of names##userPath: c:\windows\profiles;c:\users## Allow connection by all hosts.#allow: *The Analysis Server looks for the aserver.conf file in the same directory where the server is started. A different filecan be specified using command-line arguments. If changes are made to the file while the Analysis Server is running,then the server must be restarted for any changes to take effect.

See also the Web Based Administrator for a more convenient way to modify this file.

SettingsSetting Syntax Description

allow allow: user and default: none

Page 29: AnalysisServerUserGuide - Phoenix Integration · 2017. 5. 16. · AnalysisServerUserGuide ThismanualexplainsthebasicprinciplesandfunctionalityoftheAnalysisServer,asoftwaresystemthatenables

hostname filter

New as of build 158. User-based authentication added in v2.01. This com-mand can be used to specify hosts and users which are allowed to connectto analysis server. Hosts can be specified using a wildcard such as*.phoenix-int.com, which will allow all hosts in the phoenix-int.comdomain, or as 134.23.14.*, which will allow all hosts whose ip address areon that subnet. Note, however, that using hostnames instead of IPaddresses (the first format) will force a DNS lookup on all clients that tryto access that directory. Depending on your network, this can have sig-nificant performance and scalability problems.

You can prefix the host specification with a user or group specification byusing the '@' symbol. For example '[email protected].*' will allow the userbill from any computer in the 10.10.10. network range.

Prefix groups with "group.", as in 'group.weights@*', which will allowanyone in the group called weights when connecting from anywhere.

The user or group specifier must either be an exact name or the wildcardcharacter '*', indicating all users or groups.

This command can be used multiple times in the configuration file to spe-cify a list of allowed hosts.

allowDir-ectTransfer

allowDir-ectTransfer: host-name filter

This command can be used to specify hosts which you always want toattempt direct transfers from.

analysesPath analysesPath:dir;dir;...

default: analyses

This is the semicolon-separated path that the Analysis Server maps to theroot category. You may want to override the default value if you have ashared directory for maintaining libraries of components.

Prior to build 173, this parameter was named analysesDir and could con-sist of only one directory

If the librarianFile option is set, this option will be ignored.

associationsDir associationsDir: dirdefault: associations

This directory holds the associations.dat data file and the associated Jarfiles for each association.

authGuestAccount authGuestAccount:username

default: no guest account

Added in v2.01

In order to allow clients from pre-authentication days, you need to set theAuthGuestAccount option. This maps a default user to try and use when

Page 30: AnalysisServerUserGuide - Phoenix Integration · 2017. 5. 16. · AnalysisServerUserGuide ThismanualexplainsthebasicprinciplesandfunctionalityoftheAnalysisServer,asoftwaresystemthatenables

old clients connect. The authentication subsystem must additionally be con-figured to accept this account with no password.

This option will have no effect on newer clients

Without this option, older clients will not be able to connect whenAuthentication is being used.

authOptions authOptions:<options>

default: no default value

Added in v2.01

This command allows you to pass configuration arguments to theAuthentication sub-system. The format of this option is dependent uponthe type of authentication system you are using. Currently, only plain, filebased authentication is supported. The format for this is 2 filenames sep-arated by a comma specifying first the password file and secondly thegroup file.

Example:

authOptions: passwd,group

There is example password and group files delivered with the AnalysisServer in the installation directory. These files set up a basic system withan administrator account, "admin", using the password "admin" and aguest account, "guest", with no password.

authSystem authSystem: <spe-cification>

default: no authentication

Added in v2.01

If this option is used, the Analysis Server will require a username and pass-word login from clients before they can connect. This information can beused in security files to allow or disallow access based on user information.

Currently "file" is the only available option, which specifies that the Ana-lysis Server should use a file based authentication database, much likeUNIX /etc/passwd and /etc/group files.

See Authentication for more help on Analysis Server's Authentication fea-tures.

customTempDir customTempDir:dir

default: NONE

Added in v4.2

When Analysis Server runs a wrapper that uses run sharing, it creates tem-

Page 31: AnalysisServerUserGuide - Phoenix Integration · 2017. 5. 16. · AnalysisServerUserGuide ThismanualexplainsthebasicprinciplesandfunctionalityoftheAnalysisServer,asoftwaresystemthatenables

Note: Not used if runShareInUserDir is set to 'true'

deny deny: hostname fil-ter

default: none

New as of build 158. User-based authentication added in v2.01. This com-mand can be used to specify hosts and users which are not allowed to con-nect to analysis server. Hosts can be specified using a wildcard such as*.phoenix-int.com, which will deny all hosts in the phoenix-int.comdomain, or as 134.23.14.*, which will deny all hosts whose ip address areon that subnet. Note, however, that using hostnames instead of IPaddresses (the first format) will force a DNS lookup on all clients that tryto access that directory. Depending on your network, this can have sig-nificant performance and scalability problems.

You can prefix the host specification with a user or group specification byusing the '@' symbol. For example '[email protected].*' will deny the user billfrom any computer in the 10.10.10. network range.

Prefix groups with "group.", as in 'group.weights@*', which will denyanyone in the group called weights when connecting from anywhere.

The user or group specifier must either be an exact name or the wildcardcharacter '*', indicating all users or groups.

This command can be used multiple times in the configuration file to spe-cify a list of denied hosts.

denyAc-cessByDefault

denyAc-cessByDefault:true|false

default: false

New as of build 158. When set to true this setting causes Analysis Serverto deny all clients access to analyses. Clients may then be selectively givenaccess through the use of the allow command either in the .aserver.conffile or in an .aserver file contained within a specific analysis's directory.

For example:

## this will allow only the local machine andthe user john connecting from# phoenix-int.com to access analyses#denyAccessByDefault: trueallow: 127.0.0.1; [email protected]: See help for the "allow" command for more examples on allowingspecific users.

denyDir- denyDir-

Page 32: AnalysisServerUserGuide - Phoenix Integration · 2017. 5. 16. · AnalysisServerUserGuide ThismanualexplainsthebasicprinciplesandfunctionalityoftheAnalysisServer,asoftwaresystemthatenables

ectTransfer ectTransfer: host-name filter

This command can be used to specify hosts which you do not want toattempt direct file transfers from.

denyDir-ectTrans-ferByDefault

denyDir-ectTrans-ferByDefault:true|false

default: true

Added in v4.2

Does this Analysis Server, by default, allow receiving file variables via dir-ect connections from other Analysis Servers?

dftModule dftModule: mod-uleName

default: NONE

Added in v5.1

The name of a custom class to use for direct file transfer. If this parameteris non-existant or blank, the standard direct file transfer mechanismprovided by Analysis Server is used.

dftConfigFile dftConfigFile:fileName

default: NONE

Added in v5.1

When using a custom class to use for direct file transfer, this setting statesthe configuration file associated with the module.

dir-ectTrans-ferTimeout

dir-ectTrans-ferTimeout: ###

default: 60

Added in v4.2

The connection timeout to use when conducting a direct transfer of a filebefore reporting an error.

enableBasicSer-vices

enableBasicSer-vices: true|false

default: true

Controls whether the basic services are started or not. This is what allowstraditional clients connect and run codes. You may wish to turn this off infavor of the SSL Service in a secure environment.

enableHTTPSer-vices

enableHTTPSer-vices: true|false

default: true

Controls whether the HTTP services are started or not. If enabled, a webbrowser can be used to connect to the Analysis Server to configure andrun components.

enableSSLServices enableSSLSer-vices: true|false

default: false

Controls whether the Secure Socket Layer (SSL) encryption services arestarted or not. If enabled, an encryption enabled client can be used to con-nect to the Analysis Server and run components securely.

executablesFile executablesFile:fileName

default: executables.txt

Added in v4.2

Page 33: AnalysisServerUserGuide - Phoenix Integration · 2017. 5. 16. · AnalysisServerUserGuide ThismanualexplainsthebasicprinciplesandfunctionalityoftheAnalysisServer,asoftwaresystemthatenables

This command determines where the executable location file is stored.This file allows the locations of various executables to be specified at theAnalysis Server level and then be referenced in various wrappers withoutneeding to specify the exact location in each wrapper. This file is in JavaProperties format. An example of the contents of such a file would be:

MSD=C:\\Program Files\\Phoenix Integ-ration\\analyses\\TESTS\\ScriptWrapper\\msd.exe SHELL-L=ShellExecute.exe

fileVarsDir-ectTransfer

fileVarsDir-ectTransfer: true|-false

default: true

Added in v4.2

Specifies whether the Analysis Server supports sending file variables viadirect connections to other Analysis Servers.

HTTPPort HTTPPort: ###

default: 8080

The HTTP port variable controls which port the embedded HTTP serverruns on. You may want to change this setting if you are already running aweb server on the same machine you intend to run the Analysis Server on.

jobSubmission jobSubmission:command

default: NONE (LSF default: "bsub -I")

If this setting is used, the following command will preface all textual runcommands in wrappers. This is used to be able to submit all wrapper com-mands to a load balancing system.

jobIdRegex jobIdRegex: regex

default: NONE (LSF default: "Job <(.*)> is submitted")

When used in conjunction with the load balancing command, jobSub-mission, this setting specifies how to obtain the job id from the standardoutput stream of the load balancing software after job submittal.

jobNodeRegex jobNodeRegex:regex

default: NONE (LSF default: "<<Starting on (.*)>>")

When used in conjunction with the load balancing command, jobSub-mission, this setting specifies how to obtain the job node from the standardoutput stream of the load balancing software after job submittal.

librarianFile librarianFile:fileName

default: NONE

New as of v3.0. Specifies a file which configures the available librariansused to publish codes on the Analysis Server. See Configuring Archivingand Versioning for more information about librarians and how to use them.

NOTE: If this option is set, 'analysesPath', 'userPath', and 'smartUserScan'options will be ignored.

licenseFile licenseFile: default: aserverLicense.lic

Page 34: AnalysisServerUserGuide - Phoenix Integration · 2017. 5. 16. · AnalysisServerUserGuide ThismanualexplainsthebasicprinciplesandfunctionalityoftheAnalysisServer,asoftwaresystemthatenables

fileName New as of build 211. Specifies the location to look for the license file.

loggingLevel loggingLevel: ###

default: 0

This setting controls how much information is logged about each con-nection to the Analysis Server. Logging levels include:

l 0 (none) - No log file for the connection is created l 1 (connections only) - A log file is created for each connection, but

nothing is written to it. l 2 (component start, end, and execute) - Each component that is star-

ted, executed, and ended in the particular session is logged. l 3 (get and set) - level 2 and all get and set requests. l 4 (all) - all commands issued to the server are logged.

logsDir logsDir: dir

default: logs

This is the directory where the Analysis Server will write log files. TheAnalysis Server creates the following log files:

l connections.log - A log of each connection to the Analysis Server l exceptions.log - A log of each error that occurs while the Analysis

Server is running. This may be useful for diagnosing a componentthat is failing

l connection logs - Each connection to the Analysis Server maintainsit's own log file. The contents (or even if the log file is created) iscontrolled by the loggingLevel setting.

port port: ###

default: 1835

The port variable controls which port server runs on. You may want tochange this setting if port 1835 is already in use by another application, orif you want to run multiple copies of the Analysis Server on the samemachine.

publishServices publishServices:[true|false]

default: true

New as of v2.11

If this option is true, Analysis Server will publish itself to the local networkso that clients such as ModelCenter can automatically "know" about serv-ers on the network. You may want to turn this option off if you are in anenvironment where security is important, such as on the internet.

This feature uses multicast sockets to function. If your network does notprovide multicast capability, or if you are not on the same sub-net as theAnalysis Server, it may not function anyhow.

As of v2.11, Analysis Server will no longer publish itself to clients which

Page 35: AnalysisServerUserGuide - Phoenix Integration · 2017. 5. 16. · AnalysisServerUserGuide ThismanualexplainsthebasicprinciplesandfunctionalityoftheAnalysisServer,asoftwaresystemthatenables

are disallowed based on the authentication settings. See the allow and denystatements for more information.

rootDir rootDir: dir

default: . (the directory where the server was started)

The root directory specifies the base directory from which other directoriesare specified. For example, if the root directory is set to "/home/aserver"and the logs directory is set to "logs", then the logs directory is actuallymapped to "/home/aserver/logs". Note that if you fully specify a path forone of the other directories, it will ignore the root directory value.

run-ShareInUserDir

runShareInUserDir:true|false

default: false

Added in v4.2

When Analysis Server runs a wrapper that uses run sharing, it creates tem-porary directories to place the files it's dealing with. By default these dir-ectories are created inside of the directory that contains the wrapper. If thisoption is set, the directories are created in the users' home directoriesinstead of where the wrappers are located. The username that is used isbased on the user that started Analysis Server not who is logged into theAnalysis Server using the Authentication feature. This means that thisoption is probably only useful for when you are using SSH connections tolaunch Analysis Server as a particular user.

NOTE: This option overrides the customTempDir option

smartUserScan smartUserScan:true|false

default: false

This option is used to have the Analysis Server attempt to automaticallyscan for user directories. This setting applies only to UNIX systems. If thevalues is set to true, the Analysis Server will automatically scan the /etc/-passwd file and build a list of directories where users directories are stored.These directories will then be searched for "public_aserver" directories.

If the librarianFile option is set, this option will be ignored.

sslCer-tific-ateExceptionListFile

sslCer-tific-ateExceptionListFile:file.xml

default: $runDir/sslCertificateExceptionListFile.xml

As of v7.0, this option is used to specify location of a file that has a list oftrusted PHX AnalysisLibrary servers. SSL certificate exceptions will beignored servers in the file. This is used to allow Analysis Server to down-load class files for object variables from servers with misconfigured SSLsetup such as self-signed SSL certificate.

SSLKeyFile SSLKeyFile:file.key default: aserver.key

Page 36: AnalysisServerUserGuide - Phoenix Integration · 2017. 5. 16. · AnalysisServerUserGuide ThismanualexplainsthebasicprinciplesandfunctionalityoftheAnalysisServer,asoftwaresystemthatenables

As of v2.1, this is the file which contains both the private key and the pub-lic certificate that the SSL service of the Analysis Server will use ifenabled. This file must either be in Sun's proprietary JKS format, or in thestandard PKCS12 format. The key within the file must have the alias'aserver' assigned to it.

SSLKeyFormat SSLKeyFormat:<pkcs12|jks>

default: pkcs12

As of v2.1, defines what file format the SSLKeyFile is stored in.

SSLKeyPassword SSLKeyPassword:password

default: aria1835

As of v2.1, the password used to encrypt the SSLKeyFile.

SSLPort SSLPort: ###default: 1836

The SSL port variable controls which port the SSL Encryption serviceruns on.

userPath userPath: dir;dir;...

default: the userPath is empty by default

This value specifies the directories that the Analysis Server should searchto look for user directories that have "public_aserver" directories in them.Typical values include "/usr/home" or "/home/people". If you have a "pub-lic_aserver" directory maintained as "/usr/home/woyak/public_aserver",then you want to set the user path to "/usr/home", not "/usr/home/woyak".

The Analysis Server will map a category to each user it finds a "public_aserver" directory stored in their home directory. For example, in theabove example, the Analysis Server would create a category named"~woyak".

If the librarianFile option is set, this option will be ignored.

See also Analysis Server| Installing and Configuring the Analysis Server

Setting up a Naming ServiceA Naming Service provides a central listing of available analysis codes and pointers to where the actual codes reside.You may wish to do this for many reasons.

l You would like to have all of your codes available from a single point, without having to connect to many dif-ferent Analysis Servers.

l You would like to be able to swap out and change computers in your Analysis Server network without break-ing existing ModelCenter Models.

l You would like to have simple, round-robin style load balancing.

Page 37: AnalysisServerUserGuide - Phoenix Integration · 2017. 5. 16. · AnalysisServerUserGuide ThismanualexplainsthebasicprinciplesandfunctionalityoftheAnalysisServer,asoftwaresystemthatenables

l You would like to structure your available codes logically, based on function, regardless of whether the actualcodes run on different platforms and servers.

l You would like to set up a protected proxy through a firewall to codes running on the other side.

Typically in these situations, you would identify a single computer as your Naming Service. This computer would berunning a copy of Analysis Server, but would not have any actual wrappers or codes on it. Instead, it lists the codesthat are available elsewhere using .link files.

When the Analysis Server encounters a file with the '.link' extension in its analyses path or in a public_aserver dir-ectory, it automatically notifies the client of the actual location of the code using the information contained within thisfile. The Analysis Server can then proxy or redirect the client depending on how the link file is configured.

Contents of the link fileA file with the '.link' extension contains the URL or URLs that point to the actual code and optionally an option spe-cifying whether to proxy or to redirect the client. The URL should be of the form:

aserv://hostname[:port]/path/filename

For example, if you wanted to call the default msd component located in the wrappers directory on the computermycomputer.phoenix-int.com, you would specify:

aserv://mycomputer.phoenix-int.com/wrappers/msd

By default, the client is given the option of whether it wants to redirect to the actual location or to proxy through thisserver. You can force a particular behavior by adding a type command to the .link file.

type: [auto|proxy|redirect]

Round Robin Load BalancingIf you use a redirect type .link file, you can list any number of URLs as separate lines in the file. Analysis Server willuse a simple round robin approach to pass out a different line for each incoming request. One way to use this is the fol-lowing:

1. Setup 5 computers each with Analysis Server and some analysis on them.2. Setup a "head" Analysis Server with a .link file that points to the 5 "worker" nodes.

type: redirectaserv://worker1.domain.com/mypath/myanalysisaserv://worker2.domain.com/mypath/myanalysisaserv://worker3.domain.com/mypath/myanalysisaserv://worker4.domain.com/mypath/myanalysisaserv://worker5.domain.com/mypath/myanalysis

3. In ModelCenter build a model that points to the head node.4. In ModelCenter's Tools/Preferences/Trade Studies page select to run locally with 5 copies.

Page 38: AnalysisServerUserGuide - Phoenix Integration · 2017. 5. 16. · AnalysisServerUserGuide ThismanualexplainsthebasicprinciplesandfunctionalityoftheAnalysisServer,asoftwaresystemthatenables

When a trade study is run on this model, it should parallelize to the 5 worker nodes.

See also Analysis Server

Secure ConnectionsAnytime there is network communication involved in a process, there is potential cause for concern about the securityof the data as it's in transit. In a process of using ModelCenter in tandem with Analysis Server, the communicationbetween the two products is the prime place where security is at issue. The ModelCenter/Analysis Server frameworkprovides two potential solutions to the security concern, both equal in strength of security, but differing in peripherybenefits:

SSL Connections

SSL connections to Analysis Server work just like regular connections, except that behind the scenes instead of com-municating through regular sockets to the Analysis Server you use protected, SSL sockets for your communication.By default, the Analysis Server is not configured to allow SSL connections, so the first step is enabling this withinAnalysis Server. This can be done in one of two ways:

Web Administrator

From the Web Administration webpage in Analysis Server, you can enable SSL by selecting the "Services and Ports"option on the left side, then changing the "SSL Services" item to "True" and pressing the "Update Settings" button.You will have to restart Analysis Server after this change.

Editing aserver.conf

You can also enable SSL services by editing the aserver.conf file (located in the Analysis Server installation dir-ectory) and change the line:

enableSSLServices: false

to

enableSSLServices: true

and saving the file.

After enabling Analysis Server to allow connections via SSL, you can now add components to your model from thissecure Analysis Server by adding the Analysis Server using SSL to your Server Browser. You can add servers bypressing the "Add Server..." button in ModelCenter's Server Browser.

Page 39: AnalysisServerUserGuide - Phoenix Integration · 2017. 5. 16. · AnalysisServerUserGuide ThismanualexplainsthebasicprinciplesandfunctionalityoftheAnalysisServer,asoftwaresystemthatenables

In the resultant "Add Server..." dialog you can either select a known available SSL Analysis Server by selecting anitem in the "Available Servers:" section that has the prefix "saserv://" or you can manual add the server by selecting"Encrypted (SSL)" in the "Type of Connection:" dropdown, entering the name of your Analysis Server in the"Server Name:" section, then pressing the "Add" button.

Page 40: AnalysisServerUserGuide - Phoenix Integration · 2017. 5. 16. · AnalysisServerUserGuide ThismanualexplainsthebasicprinciplesandfunctionalityoftheAnalysisServer,asoftwaresystemthatenables

From here on out, all the components you add from that Analysis Server will use SSL, which will be discernible fromthe Analysis View by the component having a lock icon in the lower right corner.

SSH Connections

SSH connections differ from normal connections in that instead of forging a connection to a running server, SSH con-nections attach to a specified computer and launch Analysis Server on that server as the specified user. This yields thefollowing benefits:

l Analysis Server runs with your user permissions on that remote systeml Analysis Server is run on the fly; no need for a persistent Analysis Server process

Running such connections require a couple things to be setup on the server side. The first being that the server needsto be running an SSH server to be able to accept the incoming SSH communications requests. This is fairly standardfor Unix servers to already have running, but is something that may require some configuration on Windows plat-forms. The other concern is that Analysis Server 5.0 or greater must be in the user's path.

After configuring the server to allow connections via SSH, you can now add components to your model from thissecure Analysis Server by adding the Analysis Server using SSH to your Server Browser. You can add servers bypressing the "Add Server..." button in ModelCenter's Server Browser.

In the resultant "Add Server..." dialog, under "Type of Connection" select "External SSH Tool", then specify thedesired server name and the user to connect to said server as.

Page 41: AnalysisServerUserGuide - Phoenix Integration · 2017. 5. 16. · AnalysisServerUserGuide ThismanualexplainsthebasicprinciplesandfunctionalityoftheAnalysisServer,asoftwaresystemthatenables

From here on out, all the components you add from that Analysis Server will use SSH, which will be decernable fromthe Analysis View by the component having a lock icon in the lower right corner.

When first connecting to the server, you will be prompted for a password. To avoid having to input this informationwhen you connect, you may generate some SSH keys which will handle the authentication for you. A completeHowTo on this topic can be found here.

Analysis Server Securitynew as of build 158User-based authentication added in build 238

Analysis Server provides an optional security feature which gives the user or administrator the ability to specify whichanalyses connecting clients are allowed to access.

Page 42: AnalysisServerUserGuide - Phoenix Integration · 2017. 5. 16. · AnalysisServerUserGuide ThismanualexplainsthebasicprinciplesandfunctionalityoftheAnalysisServer,asoftwaresystemthatenables

.aserver filesAccess to analyses is determined by the permissions specified in the .aserver file in that directory. The .aserver filehas only two commands: allow and deny. Each command has a simple syntax which matches the syntax for the samecommands in the aserver.conf settings. The following shows a typical .aserver file:

## example .aserver file## deny access to everyone we don't specify with an allow commanddeny: *# open up my analyses to people connecting from phoenix-int.com andtest.aerospace.com, and# also let me run analyses from homeallow: *.phoenix-int.comallow: *.test.aerospace.comallow: myhomecomputer.myisp.comEach allow or deny command takes a hostname with an optional wildcard. The wildcard is typically used to easilyspecify all the hosts in a particular domain or subnet, but is not limited to this use. For example, the command

deny: *was used to deny access to all hosts, and then the allow commands were used to selectively allow access from thedomains to which we wanted to provide access. Since allow commands take precedence over deny commands, thismethod can effectively be used to prevent strangers from running your analyses.

.aserver files and the directory structureEach directory can have its own .aserver file, and the permissions in each .aserver file form an overlapping hierarchysuch that access denied in a directory is denied in all its subdirectories. If a directory does not contain its own .aserverfile, the access permissions of the parent directory are used. This "inherited" permissisions feature will chain all theway up to the root analyses directory. If the root directory does not contain a .aserver file, the default access settingfrom aserver.conf is used.

The denyAccessByDefault settingThe denyAccessByDefault setting in the aserver.conf file is used to determine the default access for users connectingfrom hosts which are not specified by allow or deny commands in the appropriate .aserver file or files.

l true means that unspecified hosts are denied.l false means unspecified hosts are allowed access to analyses.

Page 43: AnalysisServerUserGuide - Phoenix Integration · 2017. 5. 16. · AnalysisServerUserGuide ThismanualexplainsthebasicprinciplesandfunctionalityoftheAnalysisServer,asoftwaresystemthatenables

Note that this may cause unexpected behavior when denyAccessByDefault is turned on. A directory with no .aserverfile will fall back on the permissions of the parent directory (or system defaults). A directory with an empty .aserverfile will deny access to everyone.

Security when using Archiving and VersioningThese rules only apply to traditional directories and user "public_aserver" directories. If you are publishing files out ofan Archiving and Versioning system, that system will provide its own type of security, if available.

See also Analysis Server

AuthenticationThis document describes the Authentication features for the Analysis Server and ModelCenter products and givesseveral example use cases for how an IT department can deploy these tools to large, geographically disparate groups.It is intended to be accurate in concept but does not discuss the underlying technology or implementation specifics.

The ultimate goal of Authentication in Analysis Server and ModelCenter is to provide fine-grained control over whois given access to view and run codes which are published on the Analysis Server. Combined with the Secure SocketLayer feature and the Proxy Service a fully secure environment is available for security and authentication over dis-parate networks.

Featuresl ModelCenter users should be able to specify username/password which is sent to the Analysis Server for

authenticationl Analysis Server can provide more fine grained control over access based on who is logged inl Analysis Server may provide login information to external tools. For security, only system configured Archive

modules have access to the user password (See information on our upcoming Archive and Version Control fea-tures).

l Optionally a secure (SSL) connection may be required by AS for login to protect the password over the net-work

End User InterfaceThe first time that a user clicks on an Analysis Server in ModelCenter s Server Browser, the user is prompted for ausername and password for that server (assuming that the server requires login). ModelCenter then remembers thepassword in memory for the duration of that ModelCenter session.

.

Page 44: AnalysisServerUserGuide - Phoenix Integration · 2017. 5. 16. · AnalysisServerUserGuide ThismanualexplainsthebasicprinciplesandfunctionalityoftheAnalysisServer,asoftwaresystemthatenables
Page 45: AnalysisServerUserGuide - Phoenix Integration · 2017. 5. 16. · AnalysisServerUserGuide ThismanualexplainsthebasicprinciplesandfunctionalityoftheAnalysisServer,asoftwaresystemthatenables

Figure 1 - Entering username and password

System Administrator / IT ViewThe Analysis Server must first be configured to use a particular type of authentication using the aserver.conf file.

l A pluggable authentication module must be chosen. This interface is designed to enable Analysis Server toaccept any type of authentication backend required. Currently Analysis Server ships with a flat file module andan undocumented LDAP module (See this PKB issue for information on the LDAP module)

l The pluggable authentication module chosen must be configured.l If no-password guest access is desired, this must be enabled.

Access control can then be applied to the codes published with that Analysis Server. This access control is con-figured using .aserver files in the published directories, much like the existing host-based security. These files can spe-cify access control based upon hosts as well as user and group memberships.

Example aserver.conf file:

# Tell AS what sub-system to use for authenticationAuthSystem: file# Auth sub-system specific optionsAuthOptions: passwd,group# If you want to allow password-less guest access, specify# a logical userID here.  This is required to allow# pre-v3.1 MC clients to connect.AuthGuestAccount: guest

Example .aserver file:

# deny access to everyone we don't specify with an allow commanddeny: *# open up my analyses to people connecting from# phoenix-int.com and test.aerospace.com, and# also let me run analyses from home# user and group are keywords.allow: *.phoenix-int.comallow: group.aerospace@*.test.aerospace.comallow: [email protected]

Archiving and VersioningThe Archiving and Versioning features of Analysis Server, added in version 3.0, allow you to publish codes whichreside in arbitrary back-end systems, including databases, PDM systems, and Version Control Software. In a rapidprototyping, distributed process integration tool like Analysis Server and ModelCenter users can quickly develop lotsof data, wrappers, and models. The Archiving and Versioning features are designed to help alleviate problems

Page 46: AnalysisServerUserGuide - Phoenix Integration · 2017. 5. 16. · AnalysisServerUserGuide ThismanualexplainsthebasicprinciplesandfunctionalityoftheAnalysisServer,asoftwaresystemthatenables

associated with this level of productivity with regards to the wrappers and components loaded onto the network withAnalysis Server. This provides a number of advantages to systems administrators, model builders, and model users.

l Traceability - The back-end system can provide historical information about when and how components pub-lished on Analysis Server have changed, including who changed them.

l Usability - A Model Builder or Model User has access to a wide variety of codes and versions of codes withouthaving to manually dig old code out of archiving systems and publish them.

l Repeatability - A Model User can pull up an old file and re-run it easier since archiving tools typically keep cop-ies of all old files.

l Manageability - Management of large Analysis Server codesets can be handled by Version Control Software orPDM systems. Analysis Server becomes an integrated part of a workflow already in place at your company.

l Consistency - A network of Analysis Server computers can all publish the same or similar codesets from a cent-rally managed archive

Virtual Directory Structure and LibrariansThe Analysis Server can be configured to use a particular backend database, CM, or PDM tool. It is expected that anadministrator may wish to pull from several sources on the same Analysis Server. For this reason, archives may be mounted onto logical directories that Analysis Server publishes.

Analysis Server uses pluggable components called "Librarians" that allow Analysis Server to talk to multiple specificbackend systems (such as databases, CMs, or PDM tools) and that manage a directory hierarchy of available com-ponents. In addition, the Librarian API can be used to create a custom Librarian that connects to a defined list of lib-raries.

See Also:

l Librarians - Filesysteml Librarians - User Pathl Librarians - Mounterl Librarians - Combinerl Librarians - CVSl Librarians - Data

Page 47: AnalysisServerUserGuide - Phoenix Integration · 2017. 5. 16. · AnalysisServerUserGuide ThismanualexplainsthebasicprinciplesandfunctionalityoftheAnalysisServer,asoftwaresystemthatenables

l Librarians - Database Naming Servicel Librarian API

Configuring Archiving and VersioningTo turn on Archiving and Versioning in the Analysis Server use the librarianFile option. This will disable the ana-lysesPath , userPath, and smartUserScan options and specify an XML description file which configures your virtualdirectory structure. An example description file is included in the Analysis Server distribution called librarians.xml.

Comments in the librarians file are started with '<!--' and end with '-->'. The file consists of a top level tag '<lib-rarianOptions>' which contains multiple '<librarian>' sections. Each librarian section in turn contains the followingfields:

l <class> - The full classname of a Java class which implements the IPHXLibrarian interface.l <mountPoint> - The location in the 'virtual directory structure' where this librarian's files are found.l <librarianOptions> - This tag contains further XML whose structure is dependent on the type of librarian

described. See the documentation for the particular librarian chosen for a description of the configurable optionsfor that librarian. Note that in the case of Mounter and Combiner librarians, the entire XML structure may berepeated inside of this tag.

You do not need to restart the Analysis Server in order for changes to the librarian file to be noticed. New con-nections to the Analysis Server will automatically see the changes.

See Also:

l Example Archiving and Versioning Use Cases

Modifying Analysis Server Configuration to Use a Librarian XML FileOn Windows 7

1. Locate the Analysis Server configuration file aserver.conf in the directory "C:\Users\your_user-name\AppData\Roaming\Phoenix Integration\AServer7.4". Note: In order to locate this directory, the optionShow Hidden Files and Folders must be turned on.

2. Open the file in any any text editor, such as Notepad.3. Search for the text "librarianFile". By default the librarian file line is commented out; remove the "#" character

from the start of the line to uncomment the line.4. Edit the value of librarianFile to point to the specific librarian.xml file. The file path must be structured rel-

ative to the installation path of Analysis Server (for example: C:\Program Files (x86)\Phoenix Integ-ration\Analysis Server 7.4).

5. Save the file.

On Linux

1. Locate the Analysis Server configuration file aserver.conf in the directory "~/.PhoenixInt/AServer7.4/". Note:If the .PhoenixInt folder is not visible in the Folder View, open Terminal and enter the command "sudo gedit

Page 48: AnalysisServerUserGuide - Phoenix Integration · 2017. 5. 16. · AnalysisServerUserGuide ThismanualexplainsthebasicprinciplesandfunctionalityoftheAnalysisServer,asoftwaresystemthatenables

~/.PhoenixInt/AServer7.4/aserver.conf" to open the file in GEdit.2. Open the file in any text editor such as GEdit or Kate.3. Search for the text "librarianFile." By default the librarian file line is commented out; remove the "#" character

from the start of the line to uncomment the line.4. Edit the value of librarianFile to point to the specific librarian.xml file. The file path must be structured rel-

ative to the installation path of Analysis Server (for example: /home/Desktop/ASERVER).5. Save the file.

Librarian - FilesystemDescriptionThis librarian provides a window into a directory on disk that contains wrapper and component files. This librarianreplaces the old "analysesPath" directive in the Analysis Server configuration.

Configurationlibrarian class: com.phoenix_int.aserver.library.PHXDirectoryLibrarian

The filesystem librarian takes only a single argument of what directory to publish. Unlike the "analysesPath" dir-ective, you can only specify a single directory. If you wish to publish multiple directories, use multiple filesystem lib-rarians, one for each published directory. You may wish to use a combiner librarian to accomplish your needs.

<librarianOptions> <analysesPath>path1/here</analysesPath>

</librarianOptions>

Page 49: AnalysisServerUserGuide - Phoenix Integration · 2017. 5. 16. · AnalysisServerUserGuide ThismanualexplainsthebasicprinciplesandfunctionalityoftheAnalysisServer,asoftwaresystemthatenables

See Also:

l Archiving and Versioningl analysesPath directivel Librarian Combinerl Librarian Mounter

Librarian - User PathDescriptionThis librarian provides virtual "user" directories by looking in a user path or by reading /etc/passwd. It looks for "pub-lic_aserver" directories inside of each users directory and provides a virtual directory by the name "~<username>" if itfinds one much in the same way that web servers publish "public_html" directories.

This provides the same functionality as the "userPath" and "smartUserScan" directives in the Analysis Server con-figuration.

Configurationlibrarian class: com.phoenix_int.aserver.library.PHXUserDirLibrarian

There are 2 options for this class. The first is "userPath", which is a semi-colon separated list of paths to search. Eachpath will be searched for public_aserver directories one level deep from the specified directory. For example, if youspecify "/home", directories "/home/mike/public_aserver" and "/home/jill/public_aserver" will match while"/home/public_aserver" will not match.

The other option is "smartUserScan", which tells this class to try and read the user's home directories from /etc/-passwd when you are on a UNIX platform.

Note, the mere existance of the smartUserScan tag turns the option on.

<librarianOptions><userPath>path1/here;path2</userPath><smartUserScan/>

</librarianOptions>

See Also:

l Archiving and Versioningl userPath directivel smartUserScan directivel Librarian Combinerl Librarian Mounter

Page 50: AnalysisServerUserGuide - Phoenix Integration · 2017. 5. 16. · AnalysisServerUserGuide ThismanualexplainsthebasicprinciplesandfunctionalityoftheAnalysisServer,asoftwaresystemthatenables

Librarian - MounterDescriptionThis class has the functionality of providing a virtual directory tree where different sub-librarians can be placed at spe-cific locations inside the virtual directory structure. For example, you may wish to publish a directory called"/archives" which publishes information out of an archiving system like CVS, and a separate directory called "/test"which publishes information out of a local filesystem.

When a librarian is mounted to a particular location, any components and directories that are available via a librarianmounted higher up in the directory tree are hidden. For example, if you have a filesytem published at the root ("" or"/") and a CVS archive published at "/archive", the CVS archive will hide a directory called "archive" in the filesys-tem.

This class will automatically add empty directories as necessary to ensure that you can "browse" to a mount point. Forexample, if you have not mounted anything to the root ("" or "/"), you can still mount to a subdirectory like "moun-t/here" and this class will create the empty directory "mount". Only one librarian can be mounted in a given location.Use a Librarian Combiner to put multiple librarians in the same place.

Configurationlibrarian class: com.phoenix_int.aserver.library.PHXLibrarianMounter

The XML initialization information for this class is simply a list of <librarian> tags which contain <className>,<mountPoint>, and <librarianOptions> tags inside.

<librarianOptions><librarian><mountPoint>/mountHere</mountPoint><className>com.phoenix_int.aserv-

er.library.PHXDirectoryLibrarian</className><librarianOptions> ... </librarianOptions>

</librarian><librarian>....

</librarian></librarianOptions>

See Also:

l Archiving and Versioningl Librarian Combiner

Page 51: AnalysisServerUserGuide - Phoenix Integration · 2017. 5. 16. · AnalysisServerUserGuide ThismanualexplainsthebasicprinciplesandfunctionalityoftheAnalysisServer,asoftwaresystemthatenables

Librarian - CombinerDescriptionThis class combines several sub-librarians, adding dir lists and component lists together. If there is a conflict in com-ponent or directory name, the first librarian wins out, and no error is given.

Configurationlibrarian class: com.phoenix_int.aserver.library.PHXLibrarianCombiner

The XML initialization information for this class is simply a list of <librarian> tags which contain <librarianClass>and <librarianOptions> tags inside.

<librarianOptions><librarian><librarianClass>com.phoenix_int.aserv-

er.library.PHXDirectoryLibrarian</librarianClass><librarianOptions> ... </librarianOptions>

</librarian><librarian>....

</librarian></librarianOptions>

See Also:

l Archiving and Versioningl Librarian Mounter

Librarian - CVSDescriptionImplementation of IPHXLibrarian which loads files out of GNU's Concurrent Versioning System (CVS). Browsingworks by caching a single copy of the latest version from CVS in a local temporary directory. When a user requests tostart a component, this class generates a temp directory and checks out the entire directory that contains that com-ponent into the temp dir. The temp dir gets deleted when the connection is dropped. In order to have consistent files, itfigures out the commit time for the component requested, and then checks out all the files in the directory from thatsame date.

Page 52: AnalysisServerUserGuide - Phoenix Integration · 2017. 5. 16. · AnalysisServerUserGuide ThismanualexplainsthebasicprinciplesandfunctionalityoftheAnalysisServer,asoftwaresystemthatenables

This class requires passwordless access to cvs and does not currently provide any access control functions (.aserverfiles do not work).

This class functions by calling to the 'cvs' command line program. You must have this program installed correctly andin your path before running the Analysis Server in order to use this feature.

If you are using 'pserver' type authentication you will need to issue a 'cvs login' command for the user running Ana-lysis Server before running Analysis Server.

Configurationlibrarian class: com.phoenix_int.aserver.library.PHXCVSLibrarian

There are 2 options for this class. The CVSROOT which should be set as if you were using the command line toolsand the module in CVS which is the base for all the published components. This starting module cannot be blank.

<librarianOptions><CVSROOT>pathfinder:/shared/cvs</CVSROOT><startModule>analyses</startModule>

</librarianOptions>

Known Issues

l There is currently no way to pass username/password login information from Analysis Server to CVS usingthis class.

l Due to a bug in CVS proper if you try to access a component on a CVS branch, you will receive the wrongfiles.

See Also:

l Archiving and Versioningl Librarian Combinerl Librarian Mounterl GNU's websitel CVS's website

Librarian - DataThe Data Librarian is a Librarian designed to allow usage of specific components located on an instance of Ana-lysisLibrary through Analysis Server.

How to Use the Data Librarian

To use Data Librarian to access AnalysisLibrary:

Page 53: AnalysisServerUserGuide - Phoenix Integration · 2017. 5. 16. · AnalysisServerUserGuide ThismanualexplainsthebasicprinciplesandfunctionalityoftheAnalysisServer,asoftwaresystemthatenables

1. Configure the aserver.conf to use the librarians.xml file located in the Analysis Server installation directory.(See "Modifying Analysis Server Configuration to Use a Librarian XML File" for information about con-figuring aserver.conf with the librarians.xml file.)

2. Open the librarians.xml for editing. (See "Modifying Analysis Server Configuration to Use a Librarian XMLFile" for information on working with the librarians.xml file.)

3. Uncomment and update the values for the following configuration settings:l Mount Point - a unique name or path, different from any other librarian being used by Analysis Serverl Librarian Class - com.phoenix_int.aserver.library.PHXALLibrarianl Librarian Options:

l AL_URL - The URL of the AnalysisLibrary server (for example, https://analysislibrary.phoenix-int.com)

l AL_FOLDER - the virtual directory structure inside AnalysisLibrary where the desired com-ponents are located (for example, Users/tester/Private/ALLibrarianTest)

4. In order to use the Data Librarian, authentication must be enabled (See "Authentication" for information on con-figuring authentication). The username and password used to authenticate with Analysis Server must be thesame as the username and password used to authenticate against the configured directory on AnalysisLibrary.

Component Files Read by the Data Librarian

The Data Librarian can only read files with the .pacz extension. A .pacz file is a zip archive that contains a text filecalled component.pacj and other files related to the component. The component.pacj file contains formatted JSONto hold specific metadata of the component.

Each component.pacj must contain a "ASComponent" key that specifies the executable file name in .pacz that canbe run by Analysis Server. The file name in the "ASComponent" key does not take a file extension; therefore, therecan be no other file within the .pacz archive that contains the same name (case-insensitive) as the "ASComponent"file.

Each component.pacj must also contain a "requires" key that specifies which software is required to execute the com-ponent. For all component.pacj files, the "requires" key must have the value "analysis_server" to specify that itneeds Analysis Server to run.

Metadata can be specified within the component.pacj JSON but is not required. Configurable key values for the com-ponent metadata include:

l version - the version of the componentl author - the author of the componentl description - the description of the componentl helpUrl - specifies the URL to find help with this componentl keywords - specifies keywords to be used with this componentl delayloadsetup - specifies whether to delay the startup of components for performance (default value is true)l icon - specifies the icon to be associated with the component when displayed in ModelCenterl checksum - specifies the checksum of the .pacz

An example of the JSON describing the metadata of an Analysis Server component:

Page 54: AnalysisServerUserGuide - Phoenix Integration · 2017. 5. 16. · AnalysisServerUserGuide ThismanualexplainsthebasicprinciplesandfunctionalityoftheAnalysisServer,asoftwaresystemthatenables

{"version": "1.0","author": "Phoenix Integration","description": "Valid .pacz test component without version.","ASComponent": "Circle","requires": "analysis_server","helpUrl": "http://www.phoenix-int.com","keywords": "test, pacz, component, non-versioned","icon": "test.png"

}

See Also

l Archiving and Versioningl IPHXLibrarianl IPHXVersionedLibrarian

Librarian APIThe librarian architecture of Analysis Server is designed to allow for dynamic addtion of new backend systems.Implementing different backend systems usually takes a few weeks, depending on the system, and can be done byyour own software staff or by Phoenix Integration's global services team. If you are interested in contracting us orsample code, contact your Phoenix Integration representative.

See Also

l Archiving and Versioningl IPHXLibrarianl IPHXVersionedLibrarian

Direct File TransferWhen dealing with large file variables it is common to have a performance penalty associated with moving the filecontents between computers. One common situation (A. below) is having a model in ModelCenter that links file vari-ables between two components that are on different Analysis Servers. In this scenario, the file variable must betransfered from AS1 to ModelCenter, then from ModelCenter to AS2. Ideally you might like to just send the file dir-ectly from AS1 to AS2 without having to send the contents to ModelCenter as well. A second common scenario (B.below) is having two Analysis Server components served off the same Analysis Server with a linked file variable. In

Page 55: AnalysisServerUserGuide - Phoenix Integration · 2017. 5. 16. · AnalysisServerUserGuide ThismanualexplainsthebasicprinciplesandfunctionalityoftheAnalysisServer,asoftwaresystemthatenables

this scenario you would pay the penalty of transporting the file from AS to ModelCenter, then back to AS, whereasyou could have left the file to be accessed locally. This is where direct file transfer can help out.

In order for Direct File Transfer to take effect, the analyses hosting the file variable (AS1 in example A. above) needsto be using runsharing with the share mode set. This is necessary since the file contents will often be requested longafter the component has run, and if runsharing wasn't used it would be possible for someone else to run the com-ponent and taint the file variable contents. In the event that an error occurs while attempting to do Direct File Transferbetween Analysis Servers, Direct File Transfer will be aborted for this attempt and the file will be transferred by nor-mal means. The one caveat to this is that if an error occurs where AS2 cannot contact AS1 before the designatedtimeout period (often caused by firewalling issues), Direct File Transfer will be aborted for all future attempts on thatfile variable until the component's connection is reset, either by reloading the model or by running the Reconnectmethod on the component from ModelCenter.

Web AdministrationWhile Direct File Transfer is a fairly simple, transparent operation, it does have a few configuration options to tweakits behavior. To get to the Direct File Transfer options in the web administrator, simply click the Direct File Transferoption in the left-hand pane, which will load the following page:

Page 56: AnalysisServerUserGuide - Phoenix Integration · 2017. 5. 16. · AnalysisServerUserGuide ThismanualexplainsthebasicprinciplesandfunctionalityoftheAnalysisServer,asoftwaresystemthatenables

Option #1 is whether to allow this Analysis Server to send files to other Analysis Servers directly. This option is onby default, but it might be something one would consider disabling if direct file transfers from this server would fre-quently fail, for example if there was a very restrictive firewall between this Analysis Server and most of the rest ofthe network.

Option #2 is whether to allow this Analysis Server to fetch files directly from other Analysis Servers by default. Sincedirect file transfer currently only occurs via unencrypted channels, this option might be something you'd want to turnoff if you didn't want unecrypted communication taking place between your Analysis Servers. Note: this setting justindicates a default; it can be overriden by Allow statements in #5 or Deny statements in #9.

Option #3 sets the timeout interval (in seconds) to use when attempting initial contact between Analysis Servers doingdirect file transfer. As mentioned above, if this timeout is hit, direct file transfer won't be used for this file variableuntil the component's connection is reset.

After changing Options #1, #2, or #3, you will need to the Submit button (#4) to have those changes take effect.

If you disabled Option #2, but you wish to explicitly allow direct file transfer from a particular server, you may enterit in the Allow text box (#5) and press the associated Add button (#6). You will see this item added to the Allow list(#7). If you later decide that you don't want that particular server allowed, select the item in #7, then press the asso-ciated Remove button (#8). A common use for the explicit Allow is for localhost, so you can deny direct file transfersto other Analysis Servers, but enable them for analyses off the same Analysis Server.

Page 57: AnalysisServerUserGuide - Phoenix Integration · 2017. 5. 16. · AnalysisServerUserGuide ThismanualexplainsthebasicprinciplesandfunctionalityoftheAnalysisServer,asoftwaresystemthatenables

If you have Option #2 enabled, but you wish to explicitly deny direct file transfer from a particular server, you mayenter it in the Deny text box (#9) and press the associated Add button (#10). You will see this item added to the Denylist (#11). If you later decide that you don't want that particular server denied, select the item in #11, then press theassociate Remove button (#12).

aserver.conf ConfigurationIf you'd rather configure Direct File Transfer settings via changing the aserver.conf, then your options would looklike:

# Does this Analysis Server support sending file variables via direct# connections to other Analysis Servers?fileVarsDirectTransfer: true# Does this Analysis Server, by default, deny receiving file variables# via direct connections from other Analysis Servers?denyDirectTransferByDefault: false# The connection timeout to use when conducting a direct transfer before# reporting an error.directTransferTimeout: 60allowDirectTransfer: localhostdenyDirectTransfer: camry.phoenix-int.com

Getting StartedThe common commands and simple example below should provide enough information to understand how to accessand run components on the Analysis Server. In the following descriptions,

<path>=<basecategory>/<subcat1>/.../<subcatN>/<cat>

For example, a component called TorqueCalc is the category smith/common/engines. In order to instance that com-ponent as an object called tc, the user would use the start command:

>start smith/common/engines/TorqueCalc tc

Commands OverviewThese commands provide a brief overview of the most used Analysis Server commands.

help: help, displays the commands available and provides their syntax.

start: start <path>/<component> <instance name>, creates an instance of the specified component.

describe (d): d <path>/<component>, gives a description of the component.

Page 58: AnalysisServerUserGuide - Phoenix Integration · 2017. 5. 16. · AnalysisServerUserGuide ThismanualexplainsthebasicprinciplesandfunctionalityoftheAnalysisServer,asoftwaresystemthatenables

end: end <object>, terminates the object.

lc: lc <path>, lists the components available in the Analysis Server or in a specified path of its category hierarchy.

ls: ls <object>.<property>.<subproperty>... , lists the properties (variables) in the specified object.

quit: quit, closes the connection to the Analysis Server.

set: set <object>.<property> = <value>, lets the user assign a value to an input property.

execute (x): x <object>, runs the analysis.

get: get <object>.<property>, retrieves the value of the property named property.

A Simple ExampleThis example demonstrates how to start and interact with a component called Rectangle, which computes an areabased upon a given length and width. Despite the simplicity of the example, the process is scalable to extremely com-plex analyses.

The user begins an Analysis Server session by telneting to a machine that is running the Analysis Server on port1835. For this example, the machine name is scout. Each user should choose the name (or IP address) of the networkcomputer where the Analysis Server has been installed. Upon connection, a message similar to the one below will bedisplayed followed by a command prompt ">". When the server is ready to receive a command the following promptwill appear. The first three lines are operating system and computer-specific telnet messages, so they may vary fromsystem to system.

>telnet scout 1835Trying...Connected to scout.phoenix-int.com.Escape character is `^]'.Welcome to the Analysis Server.Developed by Phoenix Integration, Inc.www.phoenix-int.comCopyright 1998, All Rights Reserved.Usage subject to license agreement withPhoenix Integration Inc.

The lc command lists the components that are available.>lc2 components found:BlockRectangle

Scout holds two components. To access a component, it must first be started as an object. To see what properties theobject holds, the l command can be used:

>start Rectangle rectObject rect started.>l rect

Page 59: AnalysisServerUserGuide - Phoenix Integration · 2017. 5. 16. · AnalysisServerUserGuide ThismanualexplainsthebasicprinciplesandfunctionalityoftheAnalysisServer,asoftwaresystemthatenables

3 properties found:area (type=double) (access=g)height (type=double) (access=sg)width (type=double) (access=sg)

Properties are variables that can be manipulated through the Analysis Server. The rectangle component has a heightand width that can be changed and an area that is calculated. The access value indicates whether it is settable (s)and/or gettable (g). Input variables can be set and retrieved, while output variables can only be retrieved. There is alsoinformation about the variables' types. This component has an input height property, an input width property, and anoutput area property. These properties are all double precision real numbers.

To calculate the area of this rectangle, the user must first specify the dimensions using the set command. A cor-responding get command will verify that the value is indeed set correctly. Note the dot syntax that identifies the prop-erty of the object.

>set rect.height = 3value set for <rect.height>>get rect.height3.0>set rect.width = 4value set for <rect.width>

>execute rectrect completed.>get rect.area12.0

Each object should be closed using the end command when the user is finished with it. Using this command manuallyensures that the Analysis Server properly terminates the connection to the component. The Analysis Server will auto-matically terminate all of the objects when the telnet session ends, but it is good operating practice to manually per-form this step. The quit command closes the connection to the Analysis Server.

>end rectObject rect ended.>quitConnection closed by foreign host.

In conclusion, the Analysis Server started a connection to a user-specified analysis component, gathered inputs fromthe user, ran the component on the server computer, retrieved output parameters, and terminated the analysis com-ponent. Any other Analysis Server component can be manipulated using the same techniques.

See also Analysis Server

Analysis Server ProtocolThe Analysis Server provides a low-level interface that lets you send commands to it directly. Use of the AnalysisServer Protocol is often automated through a higher level tool such as ModelCenter, but it is also useful when inter-acting directly with the Analysis Server to debug components. Most developers will find one of our client libraries

Page 60: AnalysisServerUserGuide - Phoenix Integration · 2017. 5. 16. · AnalysisServerUserGuide ThismanualexplainsthebasicprinciplesandfunctionalityoftheAnalysisServer,asoftwaresystemthatenables

much more useful than the low-level Protocol. There is a Java API documented in this help file in the package com.-phoenix_int.aserver.client.v2.

The easiest way to access the low-level interface is to telnet to the Analysis Server using a command such as the fol-lowing:

telnet <host> 1835This command will open a telnet session to an Analysis Server running on host. The default port is 1835.

There are two modes that can be used. By default the connection is in Human Mode, which is convenient for testingand debugging but less powerful than Raw Mode.

The following commands are available from the direct interface to the Analysis Server.

Command DescriptionaddProxyClients Adds a host ID to the list of client hosts in the proxy chain between client and server.deleteRunShare Deletes a run share.describe Describes a published componentend Unloads a component instanceexecute Runs a component instanceget Gets the value of a variablegetByUrl Retrieves the value of a property stored at the specified URL.getDimensions Retrieves the dimensions of the specified array property.getDirectTransfer Retrieves if Direct Transfer is enabled on the Analysis Server.getHierarchy Retrieves an xml hierarchy representation of the property.getIcon Gets the icon data for a published componentgetStatus Lists the run status of all component instancesgetSysInfo Retrieves information about Analysis Server and the system it is ongetSystemProperty Returns the value of the specifed system property.getVersion Gets the version and build number for Analysis Serverheartbeat Starts up socket heartbeating in order to keep sockets alive through firewalls with timeoutshelp Help on Analysis Server commandsinvoke Invokes a method on a component instancelistArrayValues Lists all the values of an array variablelistCategories Lists all the sub-categories available in a categorylistComponents Lists all the components available in a categorylistGlobals Lists all component instances in the global namespace

Page 61: AnalysisServerUserGuide - Phoenix Integration · 2017. 5. 16. · AnalysisServerUserGuide ThismanualexplainsthebasicprinciplesandfunctionalityoftheAnalysisServer,asoftwaresystemthatenables

listMethods Lists all methods available on a component instancelistMonitors Lists all available monitorable items on a component instancelistProperties Lists all available variables and their sub-properties on a component instance or sub-variablemonitor Starts a monitor on a raw output file or available monitormoveObject Moves or renames a component instanceps Lists all running processes for a component instance.quit Close the connectionset Sets the value of a variablesetByUrl Sets the value of a property to the value of the object stored at the specified URL.setDictionary This command sets the list of global parameters.setDimensions Sets the dimensions of the specified array property.setHierarchy Sets the value of a property using an xml hierarchy.setRunQueue Sets the run queue for a given object.setServerAuthInfo Sets the username and password AnalysisServer uses to login to the specified server.setMode Sets the connection into Raw Mode or Human Modestart Creates a new component instanceversions Lists the version history of a component

See also Analysis Server

Analysis Server Protocol - Raw ModeThere are two modes that can be used with connections to the Analysis Server. By default the connection is inHuman Mode, which presents server output in a human readable format that is convenient for testing and debugging,but less powerful than Raw Mode. In Raw Mode, all commands and responses are attached to an ID number andpacketized with a command or response length. This allows a single connection to multiplex several concurrent activ-ities at once and allows for improved handling of long values. The raw mode can be entered by using the command:

>setMode rawOnce in Raw Mode, the command prompt ">" will no longer be sent. Commands will be processed one at a time asthey are received unless a command is "backgrounded", in which case it will be launched immediately onto a separatethread even if there are several waiting jobs in the queue. Commands are sent with one or more "header" lines, sep-arated by newlines and finalized by the "cmdLen" header. The possible headers are:

setID <ID> Sets the ID string for this command. All responses to this command, which may be multiple,will contain this string as a way to identify the response to this command

bg <optional> Sets the command in backgrounded mode. The command will be run immediately

Page 62: AnalysisServerUserGuide - Phoenix Integration · 2017. 5. 16. · AnalysisServerUserGuide ThismanualexplainsthebasicprinciplesandfunctionalityoftheAnalysisServer,asoftwaresystemthatenables

on a separate thread, even if there are waiting commands to be processed in the queue. Not allcommands are safe to be run in the background.

cmdLen=<len> Sets the length of the command in bytes. This line marks the end of the header section. Thenext <len> bytes after the newline will be read in, regardless of internal newlines, and used asthe command. Processing starts over after <len> bytes.

Responses contain 3 header lines and then the data. The first line contains the ID of the command to which thisresponse is associated. The second line contains the format of the response. The third line is the length of theresponse in bytes, not including the header. Possible formats are:Format Description

string This is the most common response type, indicating success and a string resulterror Indicates an error was encountered. The text of the error is included as the dataPHXIcon Indicates that binary icon data follows.

The mode can be returned to Human mode by using the command:

>setMode human

An example session might look as follows. Text sent from the client to the server is highlighted in bold.

[nsharp@pathfinder nsharp]$ telnet asServer 1835Trying 10.10.10.126...Connected to asServer.Escape character is '^]'.Welcome to the Analysis Server.Developed by Phoenix Integration, Inc.www.phoenix-int.comversion: 4.0, build: 283Copyright 2000, All Rights Reserved.Usage subject to license agreement withPhoenix Integration Inc.>start TESTS/Types aObject a started.>setMode rawsetID 33cmdLen=23set a.string="onetwo"33format: string

Page 63: AnalysisServerUserGuide - Phoenix Integration · 2017. 5. 16. · AnalysisServerUserGuide ThismanualexplainsthebasicprinciplesandfunctionalityoftheAnalysisServer,asoftwaresystemthatenables

24value set for <a.string>

See also Analysis Server | Analysis Server Commands

Adding Your Components to the ServerSeveral basic utilities exist for creating components in the Analysis Server: FileWrapper, ExcelWrapper, ScriptWrap-per, AnalysisLibraryWrapper, PerlWrapper, and Java Bean authoring. Each section contains the same basic format: abrief overview that states the purpose of the utility, a terminology section that includes utility-specific terms, and a get-ting started section that introduces the user to the utility. If the utility possesses a large set of commands and syntax, acomplete listing of these appears as a final subtopic.

Table 1 below provides an overview of the advantages and limitations of each utility. FileWrapper can be usedwhenever a file-in/file-out program must be wrapped. PerlWrapper can be used whenever a simple component, like adata converter or an algebraic equation, must be created. It can be used when the operating system of the servermachine supports Perl, and Perl is installed. ExcelWrapper is a special tool that allows authors to publish Excel spread-sheets as Analysis Server components. Finally, Java Beans can be used in general situations to create new com-ponents. The essentially unlimited flexibility of Java Beans carries with it the need for programming, so the otherthree utilities require less effort in many cases. However, Java can wrap just about any piece of software if the authoris willing to make the effort. That effort is usually fairly small since the hard work, creating the analysis program, isalready done. Additionally, Java can be used create components of arbitrary complexity from scratch.

Authoring Tool Purpose AuthoringComplexity

FileWrapper Wrapping file-based legacy software and commercial programs Easy to mod-erate

ExcelWrapper A utility for publishing Excel spreadsheets as components Easy

ScriptWrapper A general purpose wrapping tool using any Active Scripting language(such as VBScript or JScript) or the Java language itself

Easy to mod-erate

AnalysisLibraryWrapper A utility for managing PHX AnalysisLibrary content EasyPerlWrapper Authoring simple components Easy

Java Extremely flexible, general purpose wrapping and authoring Moderate todifficult

TagsEach of the wrapping utilities has a few optional tags that enable authors to include descriptive information for thecomponent. Since these tags are applied in essentially the same format for all of the utilities, they are described here.

Page 64: AnalysisServerUserGuide - Phoenix Integration · 2017. 5. 16. · AnalysisServerUserGuide ThismanualexplainsthebasicprinciplesandfunctionalityoftheAnalysisServer,asoftwaresystemthatenables

The wrapping utilities will recognize these tags when placed inside of comment lines and will assign the line of textthat comes after each tag to the appropriate field in the component. These tags are:

l @author: sets the component's author fieldl @version: sets the component's version fieldl @description: gives the component a brief descriptionl @icon: names the location of an icon filel @helpURL: gives the address of a web-based help page for the componentl @keywords: provides a list of key words related to the componentl @driver: indicates whether the component is a driver or notl @delayLoadSetupAllowed: true/false (true if tag is omitted). By default ModelCenter checks if the underlying

wrapper file has been modified when it loads a saved model. If the wrapper file has not been modified, thenModelCenter does not load the component until immediately before it first runs. Setting this to "false" forcesModelCenter (requires ModelCenter version 11) to immediately load the component. This tag would be usedwhen your component requires authentication with PHX AnalysisLibrary. This tag is implicitly set to "false"for AnalysisLibraryWrapper.

The Analysis Server stores these items as simple text strings in all of its components. It does not require standardizedformatting or content in any of these fields. The author is free to format these fields in according to personal pref-erence or corporate standards. Multi line descriptions should be formatted as follows:

#  @description: This description is just too# big to fit on one line.

See also Analysis Server| FileWrapper| ExcelWrapper| ScriptWrapper| PerlWrapper| Java Components

File DefinitionsA fileDefinition is an XML file used to define how data is organized within an input or output file. ModelCentercomes with a variety of fileDefinitions, which can be found in the following directory:

<ModelCenter Directory>\Component Plug-Ins\QuickWrap\FileDefinitions

If this collection of fileDefinitions doesn't work for a particular file type, a new fileDefinition can be created. To cre-ate a fileDefinition, it must adhere to the structure outlined in this guide. All fileDefinition files follow this basic out-line:

<fileDefinition>

<info><description> </description><type> </type>

Page 65: AnalysisServerUserGuide - Phoenix Integration · 2017. 5. 16. · AnalysisServerUserGuide ThismanualexplainsthebasicprinciplesandfunctionalityoftheAnalysisServer,asoftwaresystemthatenables

<extensions> </extensions><defaultDelimiters> </defaultDelimiters> //optional tag

</info> 

<patterns><pattern type="type" category="category">//Contents vary by type specified</pattern>

//Multiple <pattern> tags may exist

</patterns>

</fileDefinition>

Within <fileDefinition>, there are two major tags: <info> and <patterns>. The info tag contains in its hierarchybasic information describing the file. This information is defined by the following tags:

<description> A string briefly explaining the type of file described by the fileDefinition. (e.g. "<descrip-tion>Nastran bulk data file</description>")

<type> A string defining the supported file type as input, output, or both. (e.g. "<type>input</type>" or"<type>both</type>")

<extensions> A list containing one or more comma-separated file extensions. (e.g. "<exten-sions>bdf,dat,nas,blk</extensions>")

<defaultDe-limiters>

This tag is optional, and specifies a base set of delimiters for the file. (e.g. "<defaultDelimiters>\t=</defaultDelimiters")

The hierarchy and contents of the patterns tag can vary depending on the type of pattern being parsed. All of themhave one or more pattern tags. The pattern tag has a type and optionally a category. Currently, there are 4 patterntypes:

l statementl namelistl name-valuel table

All of these types are specified explicitly as the type attribute of the pattern tag (e.g. <pattern type="name-value"> or<pattern type="table" category="Material">). The category attribute is optional. It serves to specify an organ-izational category for this specific pattern's data. Categories are visible within QuickWrap, allowing variables to be

Page 66: AnalysisServerUserGuide - Phoenix Integration · 2017. 5. 16. · AnalysisServerUserGuide ThismanualexplainsthebasicprinciplesandfunctionalityoftheAnalysisServer,asoftwaresystemthatenables

filtered based on this attribute.

The Namelist PatternThe namelist pattern is utilized when data is organized into Fortran namelists. A namelist input file might look likethe following:

$PRIM

 NAME= 'TEST CASE PRIMER-- PT1 '

 CHWT= 0.0069853

 GAMA= 1.25

 TEMP= 2000.0

 FORC= 286950.0

 COV=  0.00108382

The XML hierarchy for the namelist pattern type is organized as follows:

<pattern type="namelist">  

<style> <commentStartChar> </commentStartChar><nameListStartChar> </nameListStartChar><nameListStartCol> </nameListStartCol><firstColumnComments> </firstColumnComments>   <endIndicator> </endIndicator>

</style>

<namelist> </namelist>

 <var name="name" type="type" id="id" fortranFormat="fortranFormat" />

</pattern>

The namelist pattern type is defined by the following tags:

<style>   The root of a sequence of tags indicating the way a namelist is organized. Theentire style hierarchy is optional.

Page 67: AnalysisServerUserGuide - Phoenix Integration · 2017. 5. 16. · AnalysisServerUserGuide ThismanualexplainsthebasicprinciplesandfunctionalityoftheAnalysisServer,asoftwaresystemthatenables

<commentStartChar> A character representing the beginning of a comment (e.g.<commentStartChar>#</commentStartChar>). Defaults to '!'.

<nameListStartChar> A character representing the beginning of a namelist (e.g.<nameListStartChar>$</nameListStartChar>). Defaults to '&'.

<nameListStartCol>An integer representing the column where the name lists are specified (e.g.<nameListStartCol>2</nameListStartCol>). Defaults to -1, accepting any column pos-ition.

<firstColum-nComments>

A boolean, specified by "true" or "false" (e.g. <firstColum-nComments>true</firstColumnComments>). When activated, a character in the firstcolumn serves to comment the entire line. Defaults to "true".

<endIndicator> A string representing the end of a namelist (e.g. <endIndicator>$END</endIndicator>).Defaults to '/'.

<namelist> A string representing the title of the namelist. It may either specify a name or match any name by beingset to "auto" (e.g. <namelist>auto</namelist> or <namelist>metal</namelist> ).

<var A tag containing attributes which define a variable extracted from the namelist.

name=A string which specifies the naming structure of this variable in the namelist. If the strings "{namel-ist}" and "{id}" are present in the name, they will be replaced by the value specified by the namel-ist tag and id attribute, repsectively (e.g. <var ... name="{namelist}.{id}" / > ).

type=A string describing the data type. The string must be one of the following: double, int, string,double[], int[], string[]. Alternatively, a blank string or the word "auto" will cause the parser toautomatically determine the data type (e.g. <var ... type="string[]" ... /> or <var ... type="" ... />).

id= A string which names each variable in the namelist (e.g. <var ... id="HEAT" ... / > ). This may beleft blank or specified as "auto" to accept any name.

fortranFormat= A string specifying the Fortran format to which the numerical value adheres (e.g. <var ... for-tranFormat="E10.3" ... /> ).

/>

Name-ValueThe name-value pattern is used for matching name-value pairs in a file. An example of this might looklike the following:

str = "my string" ! string typestr2='another \"string!\"'just a bunch of data - not a variable

Page 68: AnalysisServerUserGuide - Phoenix Integration · 2017. 5. 16. · AnalysisServerUserGuide ThismanualexplainsthebasicprinciplesandfunctionalityoftheAnalysisServer,asoftwaresystemthatenables

dbl=1.1

The XML hierarchy for the name-value pattern type is organized as follows:

<separators> A character marking the division between a name and a value (e.g. <separators>=</separators>).

<strict> A boolean value which, if activated, will cause the parser to ignore any line containing more thana name and a value (e.g. <strict>true</strict>).

<commentStart> A character which indicates to the parser that the remainder of the line will be ignored (e.g. <com-mentStart>#</commentStart>).

The Statement PatternThe statement pattern type is used for matching statements in a file. An example of this might look like the fol-lowing:

PSHELL 1 100 5.6

PBARL 3,1,,HAT,

3.0,0.01,2.0,0.9

The XML hierarchy for the statement pattern type is organized as follows:

<pattern type="statement">

<search> </search><separator> </separator><statementEnd> </statementEnd><commentStart> </commentStart><separatorAfterSearch> </separatorAfterSearch>

<id name="name" ... /> //other attributes detailed below

<var name="name ... /> //other attributes detailed below

//there may be multiple 'var' tags

Page 69: AnalysisServerUserGuide - Phoenix Integration · 2017. 5. 16. · AnalysisServerUserGuide ThismanualexplainsthebasicprinciplesandfunctionalityoftheAnalysisServer,asoftwaresystemthatenables

</pattern>

The statement pattern type is defined by the following tags:

<search> A string indicating the term for which the parser should search to begin extracting vari-ables. (e.g. <search>PSHELL</search>)

<separator>Either a character which divides tokens in the file (e.g. <separator>,</separator>) or theword "columns" indicating that this file is organized into columns (e.g. <sep-arator>columns</separator>)

<statementEnd> A string marking the end of the current statement. The pattern will cease when this isfound. (e.g. <statementEnd>$END</statementEnd>) Requires a separator.

<commentStart> A string indicating to the parser that the rest of the line will be ignored. (e.g. <com-mentStart>**</commentStart>)

<separatorAfterSearch>A boolean, indicating whether or not data is still divided by the separator once the searchterm is found. (e.g. <separatorAfterSearch>true</separatorAfterSearch>) Requires a sep-arator.

<id A tag containing the location of this search result's ID.

name= A string which will later be used by the parser to insert the ID into the var attribute name (e.g. <id ... name-e="eid" ... /> ).

row= An optional value indicating how many rows down from the search term that the ID occupies (e.g. <id ...row="+1" ... /> ). Requires the separator tag to be set to "columns."

cols=A range of integers indicating the columns in which the ID can be found. This range is specified by '-' or ':'(e.g. <id ... cols="2:5" ... /> or <id ... cols="65-72" ... /> ). Requires the separator tag to be set to"columns."

arg= An integer specifying which argument following the search term contains the ID (e.g. <id ... arg="3" ... />). Requires the separator tag to NOT be set to "columns."

/>

<var A tag describing the location and format of a variable expected to be found after the searchresult.

name=A string indicating the name of this variable. The name attribute of the id tag should be present inthis string between two curly braces, which will allow the parser to insert the ID (e.g. <var ... name-e="name{eid}" ... />).

type= A string indicating the type of data represented. The following values are accepted: double, int,string, double[], int[], or string[] (e.g. <var ... type="string[]" ... /> ).

row= An optional value indicating how many rows down from the search term that the ID occupies (e.g.

Page 70: AnalysisServerUserGuide - Phoenix Integration · 2017. 5. 16. · AnalysisServerUserGuide ThismanualexplainsthebasicprinciplesandfunctionalityoftheAnalysisServer,asoftwaresystemthatenables

<id ... row="+1" ... /> ). Requires the separator tag to be set to "columns."

cols=A range of integers indicating the columns in which the ID can be found. This range is specifiedby '-' or ':' (e.g. <id ... cols="2:5" ... /> or <id ... cols="65-72" ... /> ). Requires the separator tagto be set to "columns."

arg= An integer specifying which argument following the search term contains the ID (e.g. <id ... arg-g="3" ... />). Requires the separator tag to NOT be set to "columns."

fortranFormat= A string specifying the Fortran format to which the numerical value adheres (e.g. <var ... for-tranFormat="E10.3" ... /> ).

optional= A boolean which, if "true" will alert the parser that this variable may not exist after the searchvalue is found (e.g. <var ... optional="true" ... /> ).

lowerBound= A double representing the lower bound of a variable to be automatically imported to QuickWrap(e.g. <var ... lowerBound="0.002" ... > ).

upperBound= A double representing the upper bound of a variable to be automatically imported to QuickWrap(e.g. <var ... upperBound="25.8" ... > ).

/ >

The Table PatternThe table pattern type is for matching table patterns in a file. These patterns occur in LSDYNA input files. Anexample of this might look like the following:

*LOAD_NODE_POINT

$     nid      dof     lcid       sf      cid       m1       m2       m3    37        1        1      37.1

       38        1        1      38.1       39        1        1      39.1       37        2        1      37.2       38        2        1      38.2       39        2        1      39.2

The XML hierarchy of the table pattern type is organized as follows:

<pattern type="table">

<search> </search><separator> </separator><commentStart> </commentStart><tableEnd> </tableEnd>

Page 71: AnalysisServerUserGuide - Phoenix Integration · 2017. 5. 16. · AnalysisServerUserGuide ThismanualexplainsthebasicprinciplesandfunctionalityoftheAnalysisServer,asoftwaresystemthatenables

 <id name="name" ... />

 <var name="name" ... />

</pattern>

The table pattern type can be described by the following tags:

<search> A string indicating the term for which the parser should search to begin extracting variables (e.g.<search>PSHELL</search>).

<separator>Either a character which divides tokens in the file (e.g. <separator>,</separator>) or the word"columns" indicating that this file is organized into columns (e.g. <sep-arator>columns</separator>).

<commentStart> A string indicating to the parser that the rest of the line will be ignored (e.g. <com-mentStart>**</commentStart>).

<tableEnd> A character indicating the end of a table (e.g. <tableEnd>$</tableEnd> ).

<id A tag containing the location of this search result's ID.

name= A string which will later be used by the parser to insert the ID into the var attribute name (e.g. <id ... name-e="eid" ... /> ).

cols=A range of integers indicating the columns in which the ID can be found. This range is specified by '-' or ':'(e.g. <id ... cols="2:5" ... /> or <id ... cols="65-72" ... /> ). Requires the separator tag to be set to"columns."

args= An integer specifying which argument following the search term contains the ID (e.g. <id ... arg="3" ... />). Requires the separator tag to NOT be set to "columns."

key=A string indicating the name of the variable paired with the ID value (e.g. <id ... key="material" ... /> ). It isassumed that an equals sign '=' divides the key and value. Requires the separator tag to NOT be set to"columns."

/>

<var A tag describing the location and format of a variable expected to be found after the searchresult.

name=A string indicating the name of this variable. The name attribute of the id tag should be present inthis string between two curly braces, which will allow the parser to insert the ID (e.g. <var ... name-e="name{eid}" ... />).

type= A string indicating the type of data represented. The following values are accepted: double, int,string, double[], int[], or string[] (e.g. <var ... type="string[]" ... /> ).

Page 72: AnalysisServerUserGuide - Phoenix Integration · 2017. 5. 16. · AnalysisServerUserGuide ThismanualexplainsthebasicprinciplesandfunctionalityoftheAnalysisServer,asoftwaresystemthatenables

row= An optional value indicating how many rows down from the search term that the ID occupies (e.g.<id ... row="+1" ... /> ). Requires the separator tag to be set to "columns."

cols=A range of integers indicating the columns in which the ID can be found. This range is specifiedby '-' or ':' (e.g. <id ... cols="2:5" ... /> or <id ... cols="65-72" ... /> ). Requires the separator tagto be set to "columns."

arg= An integer specifying which argument following the search term contains the ID (e.g. <id ... arg-g="3" ... />). Requires the separator tag to NOT be set to "columns."

fortranFormat= A string specifying the Fortran format to which the numerical value adheres (e.g. <var ... for-tranFormat="E10.3" ... /> ).

/>

The AnalysisLibraryWrapper UtilityThe AnalysisLibraryWrapper utility is an extension to the ScriptWrapper utility that provides additional features tomanage PHX AnalysisLibrary content. Specifically, it can be used to:

l download or upload files or directoriesl create dependencies (links) between filesl create shortcutsl set properties

Since it is a ScriptWrapper, the syntax for the Header section and Variable declaration section is identical to theScriptWrapper syntax. Additionally, the user is free to implement the ScriptWrapper script section as usual. However,the script section is completely optional.

There is currently a limitation in ModelCenter clients (versions less than 11.0) in that reopening a model withan AnalysisLibraryWrapper component does not reauthenticate the component, rendering it useless. Also,reconnecting the component is not possible. To overcome this limitation, after adding the Ana-lysisLibraryWrapper to the model the user should call the "reinitialize" method on the Ana-lysisLibraryWrapper. This can be done through a right-click on the AnalysisLibraryWrapper component,clicking "methods" and then "reinitialize". Then save the model. Subsequent loading of the model will nowproperly authenticate. Calling this method only needs to be done once.

Example AnalysisLibraryWrapperThis example provides an overview of the syntax required in the AnalysisLibraryWrapper. Create a file with theextension .analysisLibrary and place it in a published analyses directory.

## Wrapper file should have the .analysisLibrary extension# Define the AnalysisLibrary server. This cannot be changed while runningthe componentserver: http://localhost# Define variables that can be used later in the wrapper

Page 73: AnalysisServerUserGuide - Phoenix Integration · 2017. 5. 16. · AnalysisServerUserGuide ThismanualexplainsthebasicprinciplesandfunctionalityoftheAnalysisServer,asoftwaresystemthatenables

# for runtime substitutions (using $varName or ${varName})# using the standard ScriptWrapper format. Multiple substitutions# can be combined. However, they cannot be nested.## Define an iterator variable for creating unique file names:variable: iterator integervariable: userPath string default=/Users/fred# The use of quotes is usually optional.# Using groups of variables is the same as within the ScriptWrapper.## Define file variables to download from AnalysisLibrary. These will be# component output file variables.download: excelFile true ${userPath}/beam.xls# Define file variables to upload to AnalysisLibrary. These will be# component input file variables.upload: resultsFile true ${userPath}/${iterator}/results.op2# Define shortcuts in AnalysisLibrary (instead of a full upload).shortcut: "http://google.com/op2result" /Users/fred/results_op2# Define dependency links in AnalysisLibrary.link: ${userPath}/${iterator}/results.op2 ${userPath}/beam.xls requiresdemo# set properties - specific namespacesetProperty: /Users/fred/widget.catpart CadPackageName "Catia V5" falsehttp://vc.phoenix-int.com/schemas/VCollabsetProperty: /Users/fred/widget.catpart company AcmeInc false myNamespace

# set properties - general namespacesetProperty: /Users/fred/widget.catpart someGeneralProperty someRan-domValue false# Download directories (the AnalysisLibrary folder and its contents arecopied locally into the destination folder)downloadDirectory: "C:/Users/fred/downloads" /Users/fred/MyDirToDownload# Upload directories (the local folder and its contents are copied intothe destination folder)uploadDirectory: "C:/Users/fred/study1" /Users/fred/CompletedStudies

CommandsAn AnalysisLibraryWrapper command consists of the command, required arguments and optional arguments. Avail-able commands are as follows.

ServerThis is a required command. Variable substitutions are not allowed.

Page 74: AnalysisServerUserGuide - Phoenix Integration · 2017. 5. 16. · AnalysisServerUserGuide ThismanualexplainsthebasicprinciplesandfunctionalityoftheAnalysisServer,asoftwaresystemthatenables

server: <serverURL>

Name Description

serverURL The AnalysisLibrary web address such as https://analysislibrary.phoenix-int.com. Variable substitutionsfor this value are not allowed.

DownloadDefine a file variable to download from AnalysisLibrary. This will be a component output file variable.

download: <fileVariableName> <isBinary> <alPath>

Name Description

fileVariableName The name to use for the file variable output. setGroup can be used as explained in the ScriptWrap-per help.

isBinary "true" if the file is a binary file otherwise "false"alPath The AnalysisLibrary path to the file.

UploadDefine a file variable to upload to AnalysisLibrary. This will be a component input file variable. The target file will beoverwritten (if it exists). If the target file is under version control then the file will be checked in and automatically ver-sioned if possible.

upload: <fileVariableName> <isBinary> <alPath> [checkInMessage]

Name Description

fileVariableName The name to use for the file variable input. setGroup can be used as explained in the ScriptWrap-per help.

isBinary "true" if the file is a binary file otherwise "false"alPath The AnalysisLibrary path to use for the file upload. Parent directories will be created as needed.

checkInMessage Optional. If the AnalysisLibrary file is version-controlled then this will be the check-in message.Otherwise, there will be no check-in message.

ShortcutCreate a shortcut in AnalysisLibrary.

shortcut: <alPathOrUrl> <alPathOfShortcutToCreate>

Name DescriptionalPathOrUrl Absolute URL or AnalysisLibrary path that is the target of the shortcut.alPathOfShortcutToCreate The AnalysisLibrary path for the new shortcut.

LinkCreate a dependency (link) between two files in AnalysisLibrary

Page 75: AnalysisServerUserGuide - Phoenix Integration · 2017. 5. 16. · AnalysisServerUserGuide ThismanualexplainsthebasicprinciplesandfunctionalityoftheAnalysisServer,asoftwaresystemthatenables

link: <fromLocation> <toLocation> <type> [info]

Name DescriptionfromLocation The AnalysisLibrary path of the source filetoLocation The AnalysisLibrary path of the destination file.type The type of the link. Common types include: "General", "Derived From", "Requires", "See Also".info Optional. Additional information about the dependency.

Set PropertyCreate a property and set its value on an AnalysisLibrary file.

setProperty: <alPath> <propertyName> <propertyValue> <useCurrentCulture>[namespace]

Name DescriptionalPath The AnalysisLibrary path to the filepropertyName The name of the propertypropertyValue The value of the property

useCurrentCulture "true" or "false". This flag specifies whether to use the program's current culture (true) or en-US(false) to parse numeric and date information.

namespace Optional. Group the property under a namespace. If a namespace is not specified, then the "Gen-eral" namespace is used.

Download DirectoryDownload an AnalysisLibrary folder to a local folder (local to the Analysis Server). The AnalysisLibrary folder andall of its contents will be downloaded and placed inside the local folder. Parent folders for the local folder will be cre-ated as needed. Target files will be overwritten.

downloadDirectory: <localFolder> <alFolderToDownload>

Name DescriptionlocalFolder The full path to the local folder (local to the Analysis Server)alFolderToDownload The AnalysisLibrary path to the folder to download.

Upload DirectoryUpload a local folder (local to the Analysis Server) to an AnalysisLibrary folder. The local folder and all of its con-tents will be uploaded and placed inside the AnalysisLibrary folder. Parent folders for the AnalysisLibrary folder willbe created as needed. Target files will be overwritten. If target files are version-controlled, then the command willautomatically check-in files and version them if possible.

uploadDirectory: <localFolderToUpload> <alFolder> [checkInMessage]

Page 76: AnalysisServerUserGuide - Phoenix Integration · 2017. 5. 16. · AnalysisServerUserGuide ThismanualexplainsthebasicprinciplesandfunctionalityoftheAnalysisServer,asoftwaresystemthatenables

Name DescriptionlocalFolderToUpload The full path to the local folder (local to the Analysis Server)alFolder The AnalysisLibrary path to the folder in which to place the uploaded folder.

checkInMessage Optional. If the AnalysisLibrary folder contains version-controlled files, then this will be thecheck-in message. Otherwise, there will be no check-in message.

AnalysisLibrary Client Java APIThe AnalysisLibraryWrapper commands expose only a subset of the functionality available through the Ana-lysisLibrary client Java API. Users can implement the script section of the AnalysisLibraryWrapper if they wish toaccess the AnalysisLibrary client Java API directly. There is a global variable "server" pre-defined which contains thevalue of the server option from above. There is a variable "client" available from the run() method which is a con-nected instance of AnalysisLibraryClient class. The only supported language at this time is Java. Please refer to theAnalysisLibrary client Java API documentation for more information. An example is included below.

## Uploads a local directory to AnalysisLibrary using the AnalysisLibraryclient Java API# @author: Phoenix Integration, Inc.# @version: 1# @description: AnalysisLibraryWrapper with custom script for uploading

#serverserver: https://analysislibrary.phoenix-int.com#dir to uploadvariable: localFolderToUpload string input default="C:/Phoenix/Ana-lysisLibraryWrapper/ToUpload"variable: targetFolder string input default="/Users/tester/Incoming/"script: language="java"void run(){

//uploadResourceIdentifier ri = new ResourceIdentifier(targetFolder.getValue

());ResourceInfo info = client.getFiles().getResourceInfo(ri);

paths = new ArrayList();paths.add(localFolderToUpload.getValue());

LocalFileUploader uploader = new LocalFileUploader(paths, cli-ent.getConnectionInfo(), info);

uploader.doTransfer();}

Page 77: AnalysisServerUserGuide - Phoenix Integration · 2017. 5. 16. · AnalysisServerUserGuide ThismanualexplainsthebasicprinciplesandfunctionalityoftheAnalysisServer,asoftwaresystemthatenables

FileWrapper StatementsSection Statement

generall autoVarsl downloadInputsl userVariable

RunCommands

l generatel parsel promptl runl runSharel userVariable

RowFieldInputFile

l arrayl clearMarksl fileToGeneratel initializationFilel keyVariablel markAsBeginningl markAsEndl removeMissingVariablesl setDelimitersl setDelimiters columnsl setGroupl templateFilel userVariablel variable

RowFieldOutputFile

l arrayl clearMarksl fileToParsel keyVariablel markAsBeginningl markAsEndl removeMissingVariablesl setDelimitersl setDelimiters columnsl setGroupl userVariablel variable

RawInputFile

l fileToGeneratel initializationFilel setGroupl templateFile

Page 78: AnalysisServerUserGuide - Phoenix Integration · 2017. 5. 16. · AnalysisServerUserGuide ThismanualexplainsthebasicprinciplesandfunctionalityoftheAnalysisServer,asoftwaresystemthatenables

l userVariable

RawOutputFilel fileToParsel setGroupl userVariable

See also Analysis Server | FileWrapper

ScriptWrapper VBScript Object APIWrapper Object

The ScriptWrapper defines a global object for all scripts: wrapper. This object supports the followingmethods and properties:

Property/Method Description

addMethod( name, [optional]fullName, [optional]down-loadInputs )addMethod( name )

NOTE: In Analysis Server 3.1 and beyondyou can now specify methods in theheader using the "method:" syntax. This isthe preferred technique.

Registers a method that can be invoked bythe client application (e.g. ModelCenter).The method specified should match amethod defined in the script that takes noarguments.

wrapper.addMethod "rein-itialize"sub reinitialize

x = 0end sub

If the optional fullName argument ispassed, clients may choose to display thattext instead of the method name in theirGUI's.

If the optional downloadInputs argumentis passed, the value is returned to the client

Page 79: AnalysisServerUserGuide - Phoenix Integration · 2017. 5. 16. · AnalysisServerUserGuide ThismanualexplainsthebasicprinciplesandfunctionalityoftheAnalysisServer,asoftwaresystemthatenables

as a hint for whether to re-download com-ponent input values after calling themethod. If you are using ModelCenter orModelRunner as your client, you must beusing v6.1 or greater for this to take effect. The optional downloadInputs argumentwas added in Analysis Server v4.1

variable addVariable( name,type, isInput )

Adds a variable to the script environmentat run time. For example, to add a variablenamed cost to the wrapper, use the fol-lowing code:

dim costset cost = wrap-per.addVariable( "cost","double", false )cost.value = volume*1.3Note that the variable returned from theaddVariable() function must be stored bythe user if it is needed later. Also note thatto access the value of the variable, the.value sub property must explicitly beused.

Valid variable types include:

l doublel double[]l intl int[]l filel stringl string[]l booleanl boolean[]

variable getVariable( name )

Retrieves a variable from the wrapper.This function needs to be used to accessvariables that are in sub-groups. Forexample, to modify the value of a variablenamed outputs.cost, use the followingcode:

Page 80: AnalysisServerUserGuide - Phoenix Integration · 2017. 5. 16. · AnalysisServerUserGuide ThismanualexplainsthebasicprinciplesandfunctionalityoftheAnalysisServer,asoftwaresystemthatenables

dim costset cost = wrap-per.getVariable( "out-puts.cost" )cost.value = 10Note that to access the value fo the vari-able, the .value sub property must expli-citly be used.

removeVariable( name ) Removes a variable from the wrapper

sleep( milliseconds ) Sleeps for a period of time

directory A read-only property containing the dir-ectory that the wrapper is stored in.

Boolean Variable ObjectProperty Type Description

description string A short, one-line description of the variable.value boolean The value of the variable. This is the default property.

Boolean Array ObjectProperty Type Description

array array Gets or sets the entire array at once.

description string A short, one-line description of the vari-able.

length( dim ) integerThe number of elements in the array.

l dim The dimension to read. Optional (defaults to 0)

numDimensions integer Read only attribute which returns thenumber of dimensions in the n-D array

size ( dim ) integer The same as length

value( index1, index2, ... ) boolean

The value of the variable. This is thedefault property.

l index1 The first index in thearray or a string representation ofthe entire multi-dimensional arrayindex of the form "[3,2,4]", or anarray of integers representing all

Page 81: AnalysisServerUserGuide - Phoenix Integration · 2017. 5. 16. · AnalysisServerUserGuide ThismanualexplainsthebasicprinciplesandfunctionalityoftheAnalysisServer,asoftwaresystemthatenables

the dimensions of the array.l index2 If index1 is the first

index, this and further argumentscan optionally be filled in for fur-ther dimensions of the array.

Method Description

getNumDimensions()

Returns the num-ber of dimen-sions of thearray

setDimensions( 1stDimSize, 2ndDimSize, ... ,10thDimSize )

Sets the lengthsof the variousdimensions ofthe array. Thearray will haveas many dimen-sions as it isgiven para-meters in thisfunction (i.e. 1-10).

l 1stDimS-ize - thesize of the1st dimen-sion

l 2ndDimS-ize - thesize of the2nddimen-sion

l ...l 10thDim-Size - thesize of the10thdimen-sion

getArray() Returns the

Page 82: AnalysisServerUserGuide - Phoenix Integration · 2017. 5. 16. · AnalysisServerUserGuide ThismanualexplainsthebasicprinciplesandfunctionalityoftheAnalysisServer,asoftwaresystemthatenables

array

setArray( array )

Sets the con-tents of thearray to equalthat of the givenarray

l array -the arrayto copyfrom

Double Variable ObjectProperty Type Description

description string A short, one-line description of the variable.

enumAlias string

A comma-separated list of user-friendly string values correspondingto each enumerated value. The alias value may be used to set thevalue of the variable instead of the actual enumerated value. If aliasvalues are specified, ModelCenter will display the alias value ratherthan the enumerated value.

enumValues string A comma-separated list of values.

lowerBound double The lower bound for the variable. If not specified, there is nobound.

units string The units value

upperBound double The upper bound for the variable. If not specified, there is nobound.

value double The value of the variable. This is the default property.

Double Array ObjectProperty Type Description

array array Gets or sets the entire array at once.

description string A short, one-line description of the vari-able.

enumAlias string

A comma-separated list of user-friendlystring values corresponding to each enu-merated value. The alias value may beused to set the value of the variableinstead of the actual enumerated value. If

Page 83: AnalysisServerUserGuide - Phoenix Integration · 2017. 5. 16. · AnalysisServerUserGuide ThismanualexplainsthebasicprinciplesandfunctionalityoftheAnalysisServer,asoftwaresystemthatenables

alias values are specified, ModelCenterwill display the alias value rather thanthe enumerated value.

enumValues string A comma-separated list of values.

length( dim ) integerThe number of elements in the array.

l dim The dimension to read. Optional (defaults to 0)

lowerBound double The lower bound for the variable. If notspecified, there is no bound.

size( dim ) integer The same as lengthunits string The units value

upperBound double The upper bound for the variable. If notspecified, there is no bound.

value( index1, index2, ... ) double

The value of the variable. This is thedefault property.

l index1 The first index in the arrayor a string representation of theentire multi-dimensional arrayindex of the form "[3,2,4]", or anarray of integers representing allthe dimensions of the array.

l index2 If index1 is the first index,this and further arguments canoptionally be filled in for furtherdimensions of the array.

Method Description

getNumDimensions()

Returns the num-ber of dimen-sions of thearray

setDimensions( 1stDimSize, 2ndDimSize, ... ,10thDimSize )

Sets the lengthsof the variousdimensions ofthe array. Thearray will haveas many dimen-sions as it isgiven para-

Page 84: AnalysisServerUserGuide - Phoenix Integration · 2017. 5. 16. · AnalysisServerUserGuide ThismanualexplainsthebasicprinciplesandfunctionalityoftheAnalysisServer,asoftwaresystemthatenables

meters in thisfunction (i.e. 1-10).

l 1stDimS-ize - thesize of the1st dimen-sion

l 2ndDimS-ize - thesize of the2nddimen-sion

l ...l 10thDim-Size - thesize of the10thdimen-sion

getArray() Returns thearray

setArray( array )

Sets the con-tents of thearray to equalthat of the givenarray

l array -the arrayto copyfrom

Integer Variable ObjectProperty Type Description

description string A short, one-line description of the variable.

enumAlias string

A comma-separated list of user-friendly string values correspondingto each enumerated value. The alias value may be used to set thevalue of the variable instead of the actual enumerated value. If aliasvalues are specified, ModelCenter will display the alias value rather

Page 85: AnalysisServerUserGuide - Phoenix Integration · 2017. 5. 16. · AnalysisServerUserGuide ThismanualexplainsthebasicprinciplesandfunctionalityoftheAnalysisServer,asoftwaresystemthatenables

than the enumerated value.enumValues string A comma-separated list of values.

lowerBound integer The lower bound for the variable. If not specified, there is nobound.

units string The units value

upperBound integer The upper bound for the variable. If not specified, there is nobound.

value integer The value of the variable. This is the default property.

Integer Array ObjectProperty Type Description

array array Gets or sets the entire array at once.

description string A short, one-line description of the vari-able.

enumAlias string

A comma-separated list of user-friendlystring values corresponding to each enu-merated value. The alias value may beused to set the value of the variableinstead of the actual enumerated value. Ifalias values are specified, ModelCenterwill display the alias value rather thanthe enumerated value.

enumValues string A comma-separated list of values.

length( dim ) integerThe number of elements in the array.

l dim The dimension to read. Optional (defaults to 0)

lowerBound integer The lower bound for the variable. If notspecified, there is no bound.

size( dim ) integer The same as lengthunits string The units value

upperBound integer The upper bound for the variable. If notspecified, there is no bound.

value( index1, index2, ... ) double

The value of the variable. This is thedefault property.

l index1 The first index in the arrayor a string representation of theentire multi-dimensional arrayindex of the form "[3,2,4]", or an

Page 86: AnalysisServerUserGuide - Phoenix Integration · 2017. 5. 16. · AnalysisServerUserGuide ThismanualexplainsthebasicprinciplesandfunctionalityoftheAnalysisServer,asoftwaresystemthatenables

array of integers representing allthe dimensions of the array.

l index2 If index1 is the first index,this and further arguments canoptionally be filled in for furtherdimensions of the array.

Method Description

getNumDimensions()

Returns the num-ber of dimen-sions of thearray

setDimensions( 1stDimSize, 2ndDimSize, ... ,10thDimSize )

Sets the lengthsof the variousdimensions ofthe array. Thearray will haveas many dimen-sions as it isgiven para-meters in thisfunction (i.e. 1-10).

l 1stDimS-ize - thesize of the1st dimen-sion

l 2ndDimS-ize - thesize of the2nddimen-sion

l ...l 10thDim-Size - thesize of the10thdimen-sion

Page 87: AnalysisServerUserGuide - Phoenix Integration · 2017. 5. 16. · AnalysisServerUserGuide ThismanualexplainsthebasicprinciplesandfunctionalityoftheAnalysisServer,asoftwaresystemthatenables

getArray() Returns thearray

setArray( array )

Sets the con-tents of thearray to equalthat of the givenarray

l array -the arrayto copyfrom

File Variable ObjectProperty Type Description

isBinary boolean Specifies the file as binary (true) or ascii (false). Default isfalse.

fileExtension stringThe file extension of a binary file. ModelCenter will open thefile using the program associated with this file extension whenthe file is double-clicked in the Component Tree.

Method DescriptionreadFile( fileName ),fromFile( fileName )

Reads the specified file.l fileName - the name of the file to load.

writeFile( fileName ),toFile( fileName )

Writes to the specified file.l fileName - the name of the file to load.

String Variable ObjectProperty Type Description

description string A short, one-line description of the variable.

enumAlias string

A comma-separated list of user-friendly string values correspondingto each enumerated value. The alias value may be used to set thevalue of the variable instead of the actual enumerated value. If aliasvalues are specified, ModelCenter will display the alias value ratherthan the enumerated value.

enumValues string A comma-separated list of values.value string The value of the variable. This is the default property.

String Array Object

Page 88: AnalysisServerUserGuide - Phoenix Integration · 2017. 5. 16. · AnalysisServerUserGuide ThismanualexplainsthebasicprinciplesandfunctionalityoftheAnalysisServer,asoftwaresystemthatenables

Property Type Descriptionarray array Gets or sets the entire array at once.

description string A short, one-line description of the vari-able.

enumAlias string

A comma-separated list of user-friendlystring values corresponding to each enu-merated value. The alias value may beused to set the value of the variableinstead of the actual enumerated value. Ifalias values are specified, ModelCenterwill display the alias value rather thanthe enumerated value.

enumValues string A comma-separated list of values.

length( dim ) integerThe number of elements in the array.

l dim The dimension to read. Optional (defaults to 0)

size( dim ) integer The same as length

value( index1, index2, ... ) double

The value of the variable. This is thedefault property.

l index1 The first index in the arrayor a string representation of theentire multi-dimensional arrayindex of the form "[3,2,4]", or anarray of integers representing allthe dimensions of the array.

l index2 If index1 is the first index,this and further arguments canoptionally be filled in for furtherdimensions of the array.

Method Description

getNumDimensions()

Returns the num-ber of dimen-sions of thearray

setDimensions( 1stDimSize, 2ndDimSize, ... ,10thDimSize )

Sets the lengthsof the variousdimensions ofthe array. The

Page 89: AnalysisServerUserGuide - Phoenix Integration · 2017. 5. 16. · AnalysisServerUserGuide ThismanualexplainsthebasicprinciplesandfunctionalityoftheAnalysisServer,asoftwaresystemthatenables

array will haveas many dimen-sions as it isgiven para-meters in thisfunction (i.e. 1-10).

l 1stDimS-ize - thesize of the1st dimen-sion

l 2ndDimS-ize - thesize of the2nddimen-sion

l ...l 10thDim-Size - thesize of the10thdimen-sion

getArray() Returns thearray

setArray( array )

Sets the con-tents of thearray to equalthat of the givenarray

l array -the arrayto copyfrom

The PXCWrapper UtilityThe PXCWrapper utility enables users to wrap a ModelCenter model on Analysis Server.

How to Use The PXCWrapper Utility

Page 90: AnalysisServerUserGuide - Phoenix Integration · 2017. 5. 16. · AnalysisServerUserGuide ThismanualexplainsthebasicprinciplesandfunctionalityoftheAnalysisServer,asoftwaresystemthatenables

To create a PXCWrapper component, create a model in ModelCenter and save the model file. Then copy or move themodel file to a directory in the Analysis Server's analyses path. By default, all of the variables will be imported. Creat-ing a PXCWrapper file with a .pxcwrapper extension allows only specified variables to be imported. The name of thisfile can be the same or different than the name of the model file.

In order to run PXCWrapper components, ModelCenter, ModelRunner, or NodeRunner must be installed on the com-puter running Analysis Server.

The Structure of a PXCWrapper FileAny line that begins with the pound (#) character within the PXCWrapper file is treated as a comment line. It is com-mon to start the wrapper with a series of comment lines that describe the wrapper that performs the analysis. This isreferred to as the header section. The remainder of the PXCWrapper file is comprised of commands used to specifythe name of the model file to wrap, the variables to expose, and if all of the variables will be validated.

The Header Section

The header section may contain comments and tags. Comment lines begin with the pound sign (#) and are normallyinserted as documentation of the FileWrapper file itself. Tags begin with @, and provide users with descriptive inform-ation when the describe API command is issued on a component. For more information about API commands, seeAnalysis Server API.

@author Specifies the author of the PXCWrapper file.@version Specifies the version of the PXCWrapper file.@description Specifies a short description of the model being wrapped.

@helpURL Specifies a URL where users may look to find additional information about the PXCWrapper com-ponent.

@keywords Specifies keywords that can be used to help locate and identify the PXCWrapper component.

PXCWrapper Tags

PXCWrapper Commands and SyntaxThe PXCWrapper file must specify the model file that it is wrapping and the variables to expose to Analysis Server.PXCWrapper files support the following commands:

modelFile <Model>variable: <ModelCenterName> <AnalysisServerName>validateAll: <Validation>Where <Model> is the relative path to the pxc file, <ModelCenterName> is the full ModelCenter name of the vari-able, <AnalysisServerName> is the name of the variable as exposed to Analysis Server, and <Validation> is theboolean value for validating all of the components. If unspecified, the validateAll command will default to false.

Example: Wrapping brake.pxc

Page 91: AnalysisServerUserGuide - Phoenix Integration · 2017. 5. 16. · AnalysisServerUserGuide ThismanualexplainsthebasicprinciplesandfunctionalityoftheAnalysisServer,asoftwaresystemthatenables

The following code wraps brake2.pxc, an example model found in the Examples subdirectory of your ModelCenterinstallation directory. To use this example, save this code as a .pxcWrapper file, and place it along with a copy ofbrake2.pxc in a directory on your Analyses Path. The PXCWrapper will allow you to run the .pxc from AnalysisServer while only exposing some of the .pxc's variables.

## brake.pxcwrapper## @author: Phoenix Integration# @description: A PXCWrapper for brake2.pxc# @version: DEMOmodelFile brake2.pxc

variable: brake.caliper.pistonDiam pistonDiamvariable: brake.caliper.pressure pressurevariable: brake.caliper.frictionForce frictionForcevariable: brake.caliper.springForce springForcevariable: brake.caliper.normalForce normalForce

Note:

Reference Arrays referencing other than doubles cannot be wrapped in PXCWrappers at present. They will be hid-den by default.

Creating Components Using JavaThe Analysis Server supports many techniques for wrapping analyses. The FileWrapper, PerlWrapper, andExcelWrapper facilities are the easiest to use. These techniques automate the creation of analysis components for sev-eral common types of analyses. For situations where these facilities do not meet user needs, the Java programming lan-guage can be used to create custom components. This section describes how to create an analysis component usingJava.

This section is merely a good overview and enough for a programmer to get started. Advanced training materials andclasses are available. Please contact Phoenix Integration about additional material if you wish to get started writingJava Beans for Analysis Server.

NOTE: Using the Java language with the ScriptWrapper utility is often a much easier way to implementcustom wrappers. It has almost all the power of a Java Bean, can call to native Java code, and requiresno compiler or manifest files.

All components must extend the IPHXAnalysis interface. This interface is a shell data structure (similar to an abstractbase class in C++) with required functions for writing a Java class that can be published on the Analysis Server.

Page 92: AnalysisServerUserGuide - Phoenix Integration · 2017. 5. 16. · AnalysisServerUserGuide ThismanualexplainsthebasicprinciplesandfunctionalityoftheAnalysisServer,asoftwaresystemthatenables

The reader should be familiar with programming in Java and must have a Java compiler. Access to the Java "jar" util-ity is also required. These tools are available free of charge as part of the Java Development Kit (JDK) from www.-javasoft.com.

TerminologyThe Analysis Server conforms to the Java Beans specification. A Bean is a Java class that is reusable, embeddable,and modular. The Analysis Server can load user-created Java Beans and serve them as analysis components.

A jar file is the distribution mechanism for a Java Bean. One or more class files are archived together into a single jarfile. The Analysis Server scans its analyses directories for jar files and publishes the Bean(s) that it finds as com-ponents.

A property is an attribute or part of a Bean. For example, an airplane has a weight attribute and is composed of manyparts including wings and a fuselage. Weight, wings, and fuselage are all considered properties of an airplane. Theterm property and variable are often interchanged when describing analysis components.

Java Commands and SyntaxUnlike the wrapping utilities, the creation of custom components through Java Bean programming does not have aspecial set of commands. The Java language syntax is the only special syntax used. The user should consult a goodJava language programming manual when creating custom Java components.

Creating a ComponentThere are three steps required to create an analysis component:

l Write and compile the desired Java classes.l Package the classes as a jar file.l Store the jar file in an Analysis Server analyses directory.

Step 1: Write and Compile the Desired Java Classes

The first step in creating an analysis component is to write and compile the Java classes that compose the analysiscomponent. Some of these classes will have to access classes provided by the Analysis Server. To link to these files,add the aserver.zip file to your Classpath. The aserver.zip file is located in the directory where the Analysis Serverwas installed.

Writing an analysis component involves creating code that models some function. For example, a rectangle analysiswould calculate the area of the rectangle provided the width and height. The associated Java class would have meth-ods for accessing width, height, and area variables and for performing the calculation for area.

The primary technique for registering variables for the analysis component is to follow the Java Beans paradigm. Anobject has a readable property x of type Y if it also has a public method named:

public Y getX()

Page 93: AnalysisServerUserGuide - Phoenix Integration · 2017. 5. 16. · AnalysisServerUserGuide ThismanualexplainsthebasicprinciplesandfunctionalityoftheAnalysisServer,asoftwaresystemthatenables

Likewise, it has a writable property x if it has a public method

public void setX( Y value )

In order to include standard Analysis Server descriptive fields, the user must implement specific static methods in theclass that return a string. These methods are:

public static String getAuthor()public static String getDescription()public static String getVersion()public static String getHelpURL()public static String getIconFile()public static String getKeywords()

These methods correspond to the author, description, version, and date fields of the component. For more informationabout these descriptive fields, see the describe command description in the Analysis Server portion of this document.

Step 2: Package the Classes as a Jar File

Once the required classes have successfully been compiled they must be packaged in a jar file. To create a jar file,first create a file named manifest.stub. This file should list information about each class packaged in the jar file,whether the class is a Java Bean or not. Only those classes that are Java Beans will be published as Analysis Servercomponents, but the component author may choose to include supporting items, such as utility classes, in the jar filewith the Beans. The following lines show the contents of the manifest.stub file used to package two classes calledMyClass and HisClass:

Name: MyClass.classJava-Bean: True

Name: HisClass.classJava-Bean: False

Note that a blank line must separate each entry in the manifest.stub file, and the file must begin and end witha blank line.

Once the manifest.stub file is created, the following command packages the classes and Beans into a jar file:

jar -cfm OurJar.jar manifest.stub *.class

This command combines all the class files in the current directory into a jar file named Ourjar.jar. Note that the nameof the jar file is arbitrary.

Step 3: Store the .jar File in an Analysis Server analyses Directory

Page 94: AnalysisServerUserGuide - Phoenix Integration · 2017. 5. 16. · AnalysisServerUserGuide ThismanualexplainsthebasicprinciplesandfunctionalityoftheAnalysisServer,asoftwaresystemthatenables

Once the analysis component has been packaged into a jar file, it is ready to be served by the Analysis Server. The jarfile should be stored in any directory served by the Analysis Server. This directory will be mapped to an AnalysisServer category. Issuing the "lc" command for the specified category should result in a listing of all Beans you havepackaged into the jar file. Starting an analysis component will result in the instantiation of your class.

Getting and setting values causes the appropriate get and set methods to be called. Executing the analysis causes theexecute() method to be called. Ending an analysis or terminating a connection with the Analysis Server causes the end() method to be called.

A Simple Example

This example shows how to use Java to create a component that computes the area of a rectangle given its height andwidth. The width and height are two read-write properties (component inputs), while area is a read-only property(component output). All are of type double. Notice that each input property has a get and set method, while the loneoutput property has a get method only.

In addition to providing access to its properties, analysis components should also create two functions: one for execut-ing the analysis component and one for ending the component. These two functions are both defined by theIPHXAnalysis interface. Each analysis component must implement this interface. The execute and end methods may,and should, throw exceptions when errors occur.

// This Java class computes the area of a rectangle// based upon a width and a height.// Includes Java classes that help implement Analysis// Server components. IPHXAnalysis comes from here.import com.phoenix_int.aserver.*;// This is the main class definition. Note that it// must implement IPHXAnalysis.public class Rectangle implements IPHXAnalysis{   // Private data members of the class.  private double _width;  private double _height;  private double _area;  // Constructor for the class.  public Rectangle()

{  }  //---------------------------------------  // get and set methods for data members.  public double getWidth()

{      return _width;  }

Page 95: AnalysisServerUserGuide - Phoenix Integration · 2017. 5. 16. · AnalysisServerUserGuide ThismanualexplainsthebasicprinciplesandfunctionalityoftheAnalysisServer,asoftwaresystemthatenables

  public void setWidth( double w ){

     _width = w;  }  public double getHeight()

{      return _height;  }  public void setHeight( double v )

{      _height = v;  }  public double getArea()

{      return _area;  }  // All Analysis Server components must have an  // execute method. This one performs a simple  // calculation.  public void execute()

{      _area = _width*_height;  }  // All Analysis Server components must have an  // end method. This one does nothing when the  // component instance is terminated.  public void end()

{  }

}

The rectangle example is a simple Java Bean that computes an area based upon a hardcoded equation. The Java Beanframework also supports the wrapping of analysis codes. Say, for example, that the rectangle's area was actually com-puted by a C program. The author could write Java code that executes the program and parses its outputs to get thearea. The code required to perform these tasks can be found in a good Java language programming manual.

In order to publish this class on the Analysis Server, the author must first create a jar file that holds it. In order to dothis, he should create a manifest stub file that looks like this:

Name: Rectangle.classJava-Bean: True

and create the jar file using the following command:

Page 96: AnalysisServerUserGuide - Phoenix Integration · 2017. 5. 16. · AnalysisServerUserGuide ThismanualexplainsthebasicprinciplesandfunctionalityoftheAnalysisServer,asoftwaresystemthatenables

jar -cfm Rectangle.jar manifest.stub Rectangle.class

Note that this jar file will only hold the Rectangle class. The user can specify any number of classes to include or usea wildcard (*) to place all of the classes in Rectangle's directory.

Once Rectangle.jar has been created the user must store it in one of two places: inside the analyses directory or insidea public_aserver directory.

Hierarchical ObjectsThe Analysis Server also supports more advanced modeling. For example, it is possible to create hierarchies ofobjects. An airplane object may contain a wing object that contains a span variable. This structure would be imple-mented by creating an Airplane and Wing class. The Airplane class would have a get method for accessing the wingobject and the Wing class would have a get method for accessing the span. The process the Analysis Server uses forsetting and getting properties is as follows:

To get the value of a property, the Analysis Server successively calls the appropriate get methods for objects. Forexample, to issue the command "get airplane.wing.span," the Analysis Server would issue the getWing() method forclass Airplane and getSpan() for class Wing.

To set the value of a property, the Analysis Server first retrieves the parent object of the desired property and thencalls the appropriate set method for it. For example, to issue the command "set airplane.wing.span = 20," the AnalysisServer would issue the getWing() method for class Airplane, setSpan() method for class Wing. If either class Airplaneor class Wing do not possess the appropriate set methods, then the property is considered read-only and its value maynot be modified.

Self ManagersSometimes when you are writing a component, you don't know at compile time all of your property names. Forexample, you may wish to read a dynamic configuration file which decides what type of wing you will be rep-resenting. In order to achieve this you need a way to specify at run-time what your properties are. You can accom-plish this by extending PHXSimpleSelfManager2 and using the addVariable() method. Below you will find a shortexample which uses this class.

You may notice that there is a PHXSimpleSelfManager and a PHXSimpleSelfManager2. The difference is that theinternal interfaces of the latter are designed to be more efficient with large quantities of data. If you are writing a newclass, always use PHXSimpleSelfManager2. Unless you override the getValue() or setValue() methods, existingclasses which use PHXSimpleSelfManager may be modified to extend PHXSimpleSelfManager2 without any modi-fications. If you override getValue() and setValue(), you will need to modify your class to use the newer getValue2()and setValue2() methods before you can override the newer interface.

import com.phoenix_int.aserver.*;import com.phoenix_int.aserver.types.*;import com.phoenix_int.aserver.manager.*;

Page 97: AnalysisServerUserGuide - Phoenix Integration · 2017. 5. 16. · AnalysisServerUserGuide ThismanualexplainsthebasicprinciplesandfunctionalityoftheAnalysisServer,asoftwaresystemthatenables

public class Rectangle2 extendsPHXSimpleSelfManager2 implements IPHXAnalysis

{private PHXDouble _width = new PHXDouble();private PHXDouble _height = new PHXDouble();private PHXDouble _area = new PHXDouble();

public Rectangle2() throws PHXInvalidNameException,PHXNameAlreadyInUseException

{// tell the super class about the variables we want to expose to// the Analysis Server://// addVariable( varName, isInput?, varObject )//super.addVariable( "width", true, _width );super.addVariable( "height", true, _height );super.addVariable( "area", false, _area );

}

public void execute(){

_area.setValue( _width.getValue()*_height.getValue() );}

public void end(){}

}

InterfacesThere are a handful of other interfaces that you can implement as a Java Bean which allow you to add other func-tionality to your component. See the associated documentation for these interfaces if you need the functionality.

l IPHXAlwaysWriteable - When you want a sub-group to be writable even if the parent groups are not.l IPHXDriver - If you want to write a driver component, or a component which contains reference variables to

perform feedback loops or optimization algorithms, use this interface.l IPHXHaltableComponent - If you would like to have a handler to clean up correctly when the user requests

that the component halts, implement this interface.l IPHXMonitorable - Used if you would like to provide detailed information about the current status of an

execute request to clients which can handle progress monitoring.IPHXSetupFromFile - Used when you want to make a file association, so that anytime Analysis Server see's a

Page 98: AnalysisServerUserGuide - Phoenix Integration · 2017. 5. 16. · AnalysisServerUserGuide ThismanualexplainsthebasicprinciplesandfunctionalityoftheAnalysisServer,asoftwaresystemthatenables

file with a particular extention, your class is invoked as a component.

nD ArraysAnalysis Server contains special classes to make handling multi-dimensional arrays easier. These classes can all befound in the package com.phoenix_int.aserver.types, just like PHXDouble and PHXString, and are namedPHXDoubleArray,PHXStringArray, etc.

When you use these classes for arrays, Analysis Server automatically allows input arrays to be resized from the cli-ent, both in number of dimensions and size of the dimensions. It is up to the component writer to either lock downthe array sizes with the "lockDimensions" and "lockResize" properties, or to check the input array sizes to make surethey are valid.

You can still use traditional Java Arrays as inputs and outputs of your component. They have limited functionalitycompared to the PHX<type>Array classes, however.

Example nD Array Java Beanl cube - an example of using nD arrays in a Java Bean

See also Analysis Server

Pi Blue DemosAnalysis Server ships with demo versions of both OptWorks and ProbWorks by Pi Blue software.

OptWorks Demo

This reduced functionality demo version of OptWorks includes four optimizers: Genetic Algorithm, Automated Gen-etic Algorithm, Coordinate Pattern Search, and Grid Search. These optimizers are limited to two design variables andone objective functions for this demonstration version only. Also included is a license file and the full version of theOptWorks manual. The manual details all of the optimizers in the full version of OptWorks.

The full version of OptWorks includes the Genetic Algorithm, Automated Genetic Algorithm, Coordinate PatternSearch, Grid Search, Simulated Annealing, Automated Simulated Annealing, Random Walk, and Random Searchoptimizers and allows any number of design variables and objective functions to be specified.

Visit http://www.phoenix-int.com/products/OptWorks.html for more information or to order the full version ofOptWorks.

See Also: The OptWorks Demo Documentation

ProbWorks Demo

Page 99: AnalysisServerUserGuide - Phoenix Integration · 2017. 5. 16. · AnalysisServerUserGuide ThismanualexplainsthebasicprinciplesandfunctionalityoftheAnalysisServer,asoftwaresystemthatenables

This reduced functionality demo version of ProbWorks includes two tools: a Monte Carlo probabilistic assessmenttool and a Response Surface Equation (RSE) generator. These tools are limited to two design variables and one fore-cast or response variable for this demonstration version only. Also included is a license file and the full version of theProbWorks manual. The manual details all of the tools available in the full version of ProbWorks.

The full version of ProbWorks includes the Monte Carlo probabilistic assessment tools, the DPOMD fast MonteCarlo approximation tool, a Response Surface Equation generator, a Pareto sensitivity analysis component, and agraphing utility and allows any number variables to be specified.

Visit http://www.phoenix-int.com/products/ProbWorks.html for more information or to order the full version ofProbWorks.

See Also: The ProbWorks Demo Documentation