ContentsIndexHome
PreviousUpNext
aimms::openSession Function

Creates an ISession object that represents the specified AIMMS model, using the default configuration. 

 

C++
inline ISession* openSession(const char* szAimmsLocation, 
                                     const char* szProjectLocation);
Parameters 
Description 
const char* szAimmsLocation 
The location URI of where to start or connect to AIMMS.  
const char* szProjectLocation 
The AIMMS project file (.prj) to open.  

The created ISession object. 

 

The specified AIMMS model runs in a separate process. 

For the format of the location URI you can either specify the local folder name (see examples) where AIMMS is installed, or use a URI as discussed in Running a remote session to start a remote AIMMS session. 

As second argument, you need an AIMMS project file (*.prj), if you have an AIMMS pack (*.aimmspack), unpack it first. 

 

When the session cannot be created, an exception is thrown, describing what went wrong. Common causes are:

  • Incorrect path for AIMMS installation specified;
  • Project filename cannot be opened (especially when running remotely);
  • The remote server is configured incorrectly or not started.

 

Open session may timeout for different reasons:

  • The ConnectTimeout determines the time it may take to setup the connection.
  • The normal timeout determines the time further initialization steps may take, especially starting the AimmsModel may take some time.