Importing Vensim® models into AnyLogic

AnyLogic supports import of Vensim® models. Now you can simply open Vensim® model and it will be converted into AnyLogic model analogous to the original Vensim® model so you can easily continue developing it in AnyLogic.

How-To video: Importing models from Vensim

 To import a Vensim® model into AnyLogic
  1. Choose File > Import >  From Vensim from the main menu.
  2. The Open dialog box will be opened. Choose Vensim® model file (.mdl) you want to import and click OK
  3. You will see the first page of the Import Vensim model wizard opened. Here you can set up the converter options (they are described below). 
  4. When finished, click Next. The next page of the wizard will be opened (already familiar to you since it looks the same as the first page of the New Model wizard). Here you can specify the model name and the folder where it will be saved. Complete the import process by clicking OK.
  5. Finally, you will get the Vensim® model converted into AnyLogic model. Since some rarely used Vensim® features are not supported by AnyLogic, the resulting model may need some minor refactoring. All information about the inconsistency between the original Vensim® model and the resulting AnyLogic model will be listed in the Log view. There you can examine all places that need some modifications to make your model absolutely adequate to the original one. To navigate to a conversion problem, double-click the corresponding entry in the Log view.

Import Vensim model dialog

Import Vensim model dialog enables users to configure some conversion settings:

Variable name conversion - In Vensim® names of variables may be composed from several separate words. However, in AnyLogic there is a restriction: names of elements cannot contain space symbols. Therefore AnyLogic converts compound Vensim names into valid ones by concatenating all separate words into one solid name. AnyLogic provides two ways of making the resulting names easier-to-read. The setting Variable name conversions allows you to choose one of them: 
Use camel-case (Potential adopters -> PotentialAdopters) - Initial letters of all words composing the resulting name will be capitalized.  
Use underscore (Potential adopters -> Potential_adopters) - Underscore symbols will be added between all words composing the resulting name.

Capitalize first letters of subscript names (recommended) -  If this option is selected, the initial letters of subscript names will be capitalized,

Wrap lines in formulas. Line width ... characters - If selected, long formulas will be wrapped into lines of the specified width. You define the number of characters in a line in the edit box located to the right.

Arrange views on model canvas - Vensim® model may contain several views (usually containing logically separated parts of a stock-and-flow diagram). Here you can choose how you want these views to be arranged on the diagram of agent type in the resulting AnyLogic model: Horizontally, Vertically or In the square grid.

Add view navigation buttons - If this option is selected, and the original Vensim® model contains several views, buttons allowing navigation between these views will be added onto the diagram of the resulting AnyLogic model. 

Align elements to grid - If selected, all graphical elements in the resulting AnyLogic model will be aligned to a diagram grid.

Reset default arrow colors for arrows looking like having default Vensim colors - If this option is selected, those dependency arrows that are painted with the color that was later chosen as the default one for dependency arrows in Vensim® will be drawn with the color used as the default one in AnyLogic.