ContentsIndexHome
PreviousUpNext
AIMMS.openSession Method (string, string)

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

C#
public static ISession openSession(string aimmsLocation, 
                                           string projectLocation);
Parameters 
Description 
string aimmsLocation 
The location URI of where to start or connect to AIMMS.  
string projectLocation 
The AIMMS project file (.prj) to open.  

The created ISession

 

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.