Jump to content

gtwirth

Members
  • Posts

    161
  • Joined

  • Last visited

  • Days Won

    5

Posts posted by gtwirth

  1. On 9/22/2022 at 8:51 PM, Thomas.lewis said:

    Hi - first of all, this add-in is awesome! Thank you!!

    I'm running Simio software version 15.244.28783.0 and just encountered this error:

    image.png.203315f673a8b2965b30201da0983318.png

    Wondering if IModel was updated to require get_ActiveModel(). I haven't tried running this on an older version - will attempt that if I can make the time. Can you point me in a direction? Unfortunately, I won't be able to share the model.

    Make sure SimioAPI.dll, SimioAPI.Extensions.dll and SimioAPI.Graphics.dll are not in the ...\Documents\SimioUserExtensions folder.   If there are older version of these DLL in this folder, you will get this error message.   

     

    It is best practice to not have these DLL in this folder.   If there are not in this folder, Simio will find them in its executable folder.   If you create your own Visual Studio project and compile into this folder, make sure you set the "Copy Local" == False.   

    • Like 1
  2. Attached are the files, code and an example of how to automatically run a schedule by dropping a file into a folder.

     

    See "SetupRunSchedule.docx"

     

    Updated 2017-10-29....Added the ability to add downtimes for Resources in the Event.csv. These will be read into the model prior to running Plan.

    Updated 2017-07-28....When the schedule is run, it now produces a file called "ExportSchedule.xml" that contains data from the resource usage log and target results.

    Updated 2019-05-21....Updated files to make is compatible with Simio 11.
     
    Updated 2019-09-18....Updated files to make is compatible with Simio 11.194.
     
    Updated 2019-11-08....Updated files to make is compatible with Simio 11.197.
     
     

    RunSimioScheduleCode.zip

  3. Here is an add-in that will rename the objects in your model based on values in a table.


    The first time you run the add-in, it will create a table called "Object Name Change".

     

    RenameObject_Table.png.4cb2870741940448c7c4eef635e0ee4a.png

     

    The uses will add the existing object name(s) and the new object name(s). Once done, run the add-in again and the object names will be changed in the model.

     

    RenameObject_Results.thumb.png.f93a00a340529ae0a3cd6f54ee7ddb2e.png

     

    To install, download the "RenameObjectsDLL.zip". Extract the "RenameObject.dll". Right click DLL and select Properties and then Unblock. Then, copy DLL into "C:\Users\\Documents\SimioUserExtensions". You might need to add the SimioUserExtensions folder under MyDocuments (C:\Users\\Documents) if it does not already exist.


    The c# code is also provided in the RenameObjectsCode.zip

    RenameObjectsDLL.zip

    RenameObjectsCode.zip

  4. Attached is an add-in that will append data from a CSV file into a Simio Table. Both the DLL and code are provided.


    To run with the DLL, complete the following steps:


    1. Download AppendTablesDLL.zip and extract AppendTables.dll.

    2. Right click DLL and unblock.

    3. Place DLL into C:\Users\\Documents\SimioUserExtensions

    4. Open Simio and create New Model

    5. Select "Data" tab and run "Add Scheduling List and Tables" button under the Scheduling group....This will create 7 scheduling tables.

    6. Next, select the "Append Tables" button under the Scheduling group...When prompted, select "C:\Users\Public\Documents\Simio\Examples\DiscretePartProductionFiles\Materials.csv".

    AppendTables_AddInButton.thumb.png.8a64e22e2d12469a6147be3c6e1239ec.png

    7. Select Materials table...5 materials should be imported.

    AppendTables_MaterialsTable.png.090e08732e8c64608a20d5204f7a01e1.png

    8. If you run the "AppendTables" again, the data will be updated...The add-in will append the table based on Material Name...It will not clear tables and add rows. The add-in will use the first column name in the file as the key and tries to find a matching column name in the table. If there is a match, the match will be used as the key. If the row already exists in the table, it will be updated.


    NOTE: This add-in also handle multiple files at a time. When prompted to select a file, choose multiple files. The import will assume the file name (excluding the extension) is the same name as the table.

     

    AppendTables_MultipleFileSelect.png.2859bd227e473c9b7aae7f40a0169ea7.png

    AppendTablesDLL.zip

    AppendTablesCode.zip

  5. The Resource Gantt is a good way to test the task sequences.


    I added a resource (with logging turned on) for each task. I then assigned resources to their associated tasks in the task sequence.


    I used the sequence numbers that Glenn suggested.


    With the Gantt, you can verify the task sequence....

     

    TaskSequeceGantt.thumb.png.99e84f710e6fa463ec8ba9f5bc13f394.png

     

    A slight downtime on the Task3 and Task4 resources does not impact the start time of Task5 and Task6, but it does impact the start time of Task7.

     

    TaskSequeceGanttWithSlightDelay.thumb.png.6eade88f1ffe532b7bb240a841189aee.png

     

    Give it a try!!!

    TaskSequence_Answer.spfx

  6. Add-On Process Triggers can be defined using the spreadsheet as well. Just change / add a column in the spreadsheet with the first row referencing the add-on process trigger property name on the object. Then, add the add-on process trigger name to the appropriate row in the spreadsheet.


    In the attached example, I changed the name of "PropertyA" in the Objects1 sheet to "ProcessingAddOnProcess". I then added "Server1_Processing" to the row hat references Server1 (e.g. "Server1_Processing"). Once imported, Server1 has a add-on process trigger to the "Server1_Processing" process.

    ImportObjectsLinksVertices_WithProcess.xlsx

  7. If you are binding a table to SQL Server Express, use the following connection properties


    If using SQL Server Security, you can specify the server name, database name, user id and password in the fields that are provided.

     

    SQLServerSecurity.png.dcf74696f443f96cfc7283a1b2329967.png

     


    If using Windows security, use a custom connection string. In the connection string, specify the server (e.g. Server=.\SQLExpress), database (e.g. Database=MESDB) and Trusted_Connection=True

     

    WindowsSecuirty.png.c7249ee124381370ba4181d9d76934d6.png

  8. Based on a number of issues reported to the Crane library, we are providing this update - (Simio v 6.106 or higher needed)


    The fixes include:


    1 - Added a fix to the push idle bridge logic. There were cases when the idle bridge could be moved where the logic was saying it could not. This fix removed a number of deadlock issues.

    2 - Add re-plan of all cranes within a bay after each crane is unloaded. This change will improve the crane selection logic to reevaluated after each crane has completed a move. Since the selection logic is being reevaluate more often, the cranes should be better utilized.

    3 - Exposed "Initial Number In System" properties on the bridge and crane objects. With is property exposed, it is possibly to disable bridges and cranes by setting this property = 0.

     

    CraneLibraryV6.106.zip

  9. NOTE: Inserting Data into MS Access is very slow...I suggest using MySQL or Microsoft Sql Server


    Your connect string should be: Provider=Microsoft.ACE.OLEDB.12.0;data source=C:\\Users\\dbName.mdb


    The provider should be: OleDb Data Provider


    If you are getting an error stating"Microsoft.ACE.OLEDB.12.0 provider is not registered on the local machine", see the following URLs... Running connectivity to MS Access using 64 bit apps is a well known issue. If this is an issue on your side, either follow the steps in the following URL or run SImio in 32 bit mode.


    http://social.msdn.microsoft.com/Forums/en-US/1d5c04c7-157f-4955-a14b-41d912d50a64/how-to-fix-error-the-microsoftaceoledb120-provider-is-not-registered-on-the-local-machine


    http://www.microsoft.com/en-us/download/details.aspx?id=13255

  10. Here is an example of a custom step that will calculate the number of meters (x and z) between two points based on latitudes and longitudes.


    2014-04-08...This post was updated to read the model origin coordinates and object coordinates from a table ( ObjectLocations ). Also, there is a design time add-in in this doe called "UpdatedLatLongAddIn" that will calculate the X and Z object locations based on the model origin coordinates and object coordinates and move the object to the location in the facility view.


    To setup the step, follow these instructions:


    1) Download the "CalcMetersFromLatLongs_DLL.zip"


    2) Extract "CalcMetersFromLatLongs.dll" from the "CalcMetersFromLatLongs_DLL.zip" into a temp folder (e.g. c:\temp).


    3) Right-click the assembly and select properties. Then choose to "unblock" button and press apply. (only needed for Windows 7 and later).


    4) Copy "CalcMetersFromLatLongs.dll" into "C:\Users\\Documents\SimioUserExtensions". You might need to add the SimioUserExtensions folder under MyDocuments (C:\Users\\Documents) if it does not already exist.


    CalcMetersFromLatLongsModel.spfx uses the Calc Meters From Lat Long step to calculate the number of meters (x and z) between Pittsburgh and Philadelphia. Once the distance is calculated, it moves the entity from the origin (location of Pittsburgh) to the location of Philadelphia.

     

    CalcMetersFromLatLongsModel.thumb.png.9a03000f4e2564f423af2e38a4daae2e.png

     

    The code (CalcMetersFromLatLongs_Code.zip) is not needed to run the example. It is just provided in case anyone want to see now the step was defined.

    CalcMetersFromLatLongs_Code.zip

    CalcMetersFromLatLongsModel.spfx

    CalcMetersFromLatLongs_DLL.zip

  11. 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.

  12. 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.

  13. 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.

  14. I have updated this add-in to support the export and import of vertices.


    If you need to update the vertices on a link in your model, first export them. Then update the text file and the import them again. If the link exists in the file, all vertices on a link will be removed and then re-added based on what is contained in the file.


    See attached code and DLL.


    Added 2014-03-04....The ability to define your own delimiter...Note: Import and Export of Objects does not work well with the comma as the delimiter. The expression properties will not import correctly since expression typically have commas in them as well.


    Added 2016-01-27....Updated project to use Microsoft .NET 4.5 Framework.


    Update 2016-10-24....See first post for latest files.

  15. Hi Mark...Please clarify...Do you mean updating the LogObservation property on a StateStatistic or TallyStatistic elements?


    This can be done with the existing Export Import Model Add in...


    I was able to export the elements from the HositalEmergenyDepartment.spfx. Then, I ran a a search an replace From "LogObservations|False" to "LogObservations|True". Imported the elements file. Once this is done, all StateStatistics and TallyStatistics in the model were being logged.

  16. Attached is V5 of the Crane Library. This version was developed in Simio 6.97.


    The new features in this version are:


    - Cranes now have a home node and an initial node. This enables the crane to be positioned at a different location at the start of the simulation run than the location where it resides when the crane is idle.

    - Cranes now have a home bridge that is different from the associated bridge. The associated bridge is used with the crane is initialized. The home bridge is the bridge where the crane resides when the crane is idle.

    - The Math.EPSILON delay is no longer needed for the first entity arrival.

    - Additional bay symbol. By default, the bay uses a symbol that is opaque (grey). If symbol index 1 is used (e.g. Current Symbol Index = 1 on the bay), the bay is transparent. The transparent bay is helpful if you wish to see schematics placed on the floor of the model.


    Additional, the following Simio V6 features has enhance our ability to model cranes.


    - You are able to turn off the Entity Instances at runtime. This is an option under the “Visibility” tab. With this option turned-off, the entity instances (including transporters) used to configure the model during design time, will not be shown when the model is run.

    - Entities now have a property for “Dynamic Label Text” under the “Animation” property group. This property enables a string expression to be added to any entity that will be shown during runtime. In the example, we are showing the current entity riding on the crane. The expression is “Math.If (Crane.RideStation.Contents.NumberWaiting > 0, Crane.RideStation.Contents.LastItem.ModelEntity.Name, "Nothing")”

     

    CraneLibraryV5.thumb.png.31e367c705fe423734170f37fe583a53.png

    Note the following file is obsolete and has been updated in later posts below. (7/24/14)

×
×
  • Create New...