You are here

Finding differences between two models

While developing a model it is good practice to save versions of the model as you go along. Sometimes, one looses track of the different versions and later want to know exactly the difference between two models.

I have found the equation listing to be very useful for this, combined with general purpose text file difference software, e.g. WinMerge (http://winmerge.sourceforge.net/).

Foreach model:
* open it in Simile
* choose List equations from the Model menu.
* create a new text file in an editor (e.g. Notepad)
* select the Equation listing window and press Crtl-A to select all the text and then Ctrl-C to copy the text
* paste text into the new text file
* save the text file.

One can then use the difference finding software to find the difference between the two equation listings.

This technique works best when the structure of the models is quite similar. Text file difference finding software more or less checks line by line and doesn't cope well with blocks of lines being moved.

The planned move to representing models in an XML based language will allow XML difference software to be used which should cope well with structural differences.

Jonathan.

Forums: 

The text editor TextPad has a pretty good comparison function. It finds things that were moved by adding additional text in between, though it wouldn't be able to cope with rearranging a file. It is very customizable too; for insance you can make it color code a file to mimic a devlopment environment.

OT, I work on industrial models, most often discrete event models but occasionally SD or other flow-based paradigms. I see no reason that Simile wouldn't work for at least some of these, especially high level models for tranportation; eg strategic supply chain, intermodal port operations, etc.

The instructions to produce a text file of the equation listing in the earlier post is now out of date. With recent subversions of version 4 (e.g. 4.4) all one has to is to choose Save from the File menu of the equation listing menu.

As before, once you have the files, you can compare the text files of equation listings using general purpose text file difference finding software.

jonathanm