ContentsIndexHome
PreviousUpNext
Using the SDK

 

The tutorial gave you a basic overview of the tasks you can accomplish using the SDK. However, for real-life applications, there are a lot of aspects you may or may not need to take into consideration to meet the requirements posed by your specific application.

  • To meet performance requirements, you may need to organize your code using constructs that are more geared towards performance than ease-of-use.
  • If the data representation in your application is dense, or if you want to transfer data by referring to ordinal numbers rather than labels, the SDK offers support for this.
  • If you want to access the SDK from multiple threads, you have to adhere to certain rules to make this type of usage thread-safe.
  • The SDK offers several deployment scenarios, which may or may not fit with your application.

This section discusses all of these topics in more detail, and provides elaborate examples of their use. 

The code snippets in this section use the C# programming language, but the C++ and Java versions are very similar.

Name 
Description 
Using the Tuple class allows for fast prototyping, but if positions are used multiple times, the ITuple interface is more efficient.  
Besides the default view on the data of a multidimensional identifier, corresponding to all tuple-value pairs associated with that identifier, you can also define alternative views which represent slices or subset domains of the identifier at hand.  
If the data to be assigned is spanning the whole index domain space, or a filter can be formulated for it, you can use the setValues method of the View to assign these values using a single call. Depending on the source of the data this might also be more convenient.  
Using ordinals instead of labels allows the SDK to skip string comparisons for the labels and thus results in better performance. Using ordinals however, does require you to fully understand the way AIMMS uses these ordinals, in order to avoid certain pitfalls.  
Assigned data is buffered and sent to AIMMS in packets consisting of multiple tuple-value pairs. Although the SDK guarantees data consistency in almost every case, the performance of your application may benefit from an informed use of the IMultiDimData.sync, IDataView.flush and ISession.updateData methods.  
The SDK is not thread-safe. By adhering to a well-described set of rules, you can, however, access the SDK from multiple threads in a thread-safe manner.  
The SDK offers access to a subset of all the concepts and features that are available in AIMMS.  
The IConfig class can be used to alter various settings that influence the transfer speed between AIMMS and your SDK application. Although the default settings should be fine for most scenarios, you might want to experiment with tuning these variables to optimize the performance in your specific situation.  
The character encoding system in Java and C# is UTF-16.
In C++ the default is UTF-8, other encodings are configurable:  
Examples demonstrating the various aspects of the SDK discussed above. 
Some real life use-cases of the SDK being used to communicate data between AIMMS and another application. 
There are several ways to deploy/install your SDK application on a target machine. The way you deploy is largely independent of the way you write your application; the design of your application should however take into account whether it will deployed as a client or standalone.