Jump to content

How does Simio resolve model library paths?


Recommended Posts

I have a strange behavior of one of my models. I have shared this model with my customer (for the second or third time). But the model behaved not the same way as on my machine. The changes I had made last to the model were not shown on the machine of my customer. Only when the customer renamed the model, he could see the model correctly.


I don't know what happened. And I can't imagine why the issue disappeared by renaming the model. The only thing I could think about is that it has something to do with the way Simio resolves the pathes of model libraries, which are loaded and used in a model. Perhaps I don't share the model in the correct way. But what are the requisites to do this?


I have two libraries and a model which is depending on both of this libraries A and B. The library B consists of subclassed models of library A. All the 3 files are saved in the same project folder "D:\Simulation\MyModel\".


Now, when I share this 3 files with my customer, the files are localized in a different folder, as the folder "D:\Simulation\MyModel\" doesn't exist on this machine.


1) My question is know how would Simio know that the pathes of the libraries "A" and "B" have changed?

2) How would Simio search for the libraries?

3) What would happen if Simio doesn't find the libraries? Would the main model remain the way it was saved on my machine, using the internal copies, but the model wouldn't any more update the definitions if I would change something in the library "A" or "B".

4) Has Simio some internal cache where it saves the model files lastly used?

5) When would Simio search for the libraries? For example if the model is opened after it was renamed?

5) Or what could be happened?


I hope that I could explain my case with my bad English.

Thanks for any help.


Adrian.

Link to comment
Share on other sites

Adrian.


If the library cannot be found, it just uses an internal cache. I would recommend the following:


I would first recommend setting the path of your library using the File...Settings options... Then, restart Simio. Once this is done, Simio will look for your library in this location on your customer's computer.

 

AddAdditionalLibrariesToSettings.png.54079631396fb396a397eb8036264636.png

 

If the version of the object in your customer model get out of sync with the object in your library, I would recommend resetting the versions of the objects in the model. This is done by holding down your "Shift" key and then right clicking on the model in the navigation window and selecting "Object References". If the "Shift" key was held down when this window is opened, the version field should be editable.

 

ManuallySetObjectVersionsInModel.png.18817d9b0dc354f5ff1e4b1e51cf45e2.png

 

From this window, set the version number for your objects back to "1" and press OK. Then, press the "Check For Updates" button on the "Project Home" tab. If you choose to update the object, the object in your model will be refreshed from what is in the model. The object version number will be also updated to the values in the model.


Give these a try.


Thanks.

Link to comment
Share on other sites

Glen.


Thank you very much for the quick and useful answer.


I think what we will do first is to think about a folder structure, how we have to organize our libaries and models. The libary path will then always be the same on each machine, and Simio always will find the libaries on the file system and not use the Simio cache, which is a nice feature but can lead to not reproduzable results.


If my understanding is right, then another approach to solve the problem would also have been the following:

- unload the libaries in the model of the customer

- load the libaries once again into the model, to change the library pathes


I would like to suggest another feature request for Simio. If Simio doesn't find a libary, Simio should alert the user that the libary was not found on the file system. The user should then have the choice between using the Simio cache or to search manually for the libary path on the filesystem by opening a "FileOpen-Dialog".

Link to comment
Share on other sites

Adrian,


I discussed this today with our developers. They suggested that you always place your library next to your model in your situation. Simio will look for the library in the same folder as the model. This will get around the need to define the same directory path or setting up the additional library property in settings.


Simio was designed to not require the library to be available when it is distributed. A developer might want to create a library and use it in a model. The library will be available if another user want to extend the model, but not be able to see what is inside the library. Each object in the library can be protected so it cannot be subclassed or viewed unless the user knows the password.

Link to comment
Share on other sites

Glen,


thanks for the explanations. It's interesting because I had distributed the model in the same path as the libraries with the known result.


My question is now what would happen in the following case. I would distribute the model and the libraries in the same folder. The user then would move the model file to another path of his choice, whithout the libraries. Some time later I would change something in the library and distribute the model and the libraries once again to the user. And he would move the model and only the model to the other path. Would Simio then use the old cached version of the library because the model would not be in the same folder and because the library is not in the folder path I have developed the model and the libraries? And where would be this cached version of the library?

Link to comment
Share on other sites

Each time a project is opened and the library is found, the location of the library is stored in the project when the project is saved.


When the project is opened, Simio chooses which library to use based on the following sequence:


1) Location Defined in File...Settings...Additional Libraries To Load

2) Library in same location as project.

3) Location defined in project when it was last saved.


When the library is found, it uses that library and stops searching the sequence.


If an object in the project is newer or is the same version than what is in the library, the object in the project is not updated by the library. It is only when the object in the library is newer than the object in the project that the object in the project is updated. This includes both objects that have been placed in a models and objects in the cached library of the project. So, if the user add new object from the cached library into a model, the most newer version will be used.


In your situation, even-though the old library still exists on the users computer, the new object will be used if you distribute a new model. When the old library is found, the object will not be updated in the cache library or the objects in the model.

Link to comment
Share on other sites

×
×
  • Create New...