Jump to content

Search the Community

Showing results for 'output table functions'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Simio Public Forums
    • Welcome and How To Become a Simio Insider
    • Simio News and Announcements
    • Simio Product Details
    • Simio-Related Positions Desired or Positions Available
    • Help Getting Started with Simio
  • Forums for Simio Insiders Only (See Public Forums Welcome topic to sign up)
    • SI General Discussions
    • SI Sprint Releases
    • SI Shared Items
    • SI Ideas and Suggestions
    • SI Known Issues and Workarounds
    • SI Performance Tips
    • SI Non-US Cultures
    • SI Student Competition
    • SI Educational
    • SI Libraries and Objects
    • SI Animation and Visualization
    • SI Distributions, Functions, and Expressions
    • SI Simio Tabs
    • SI Experimentation and Optimization
    • SI Functional Approaches
    • SI Industries / Domains
    • SI Types of Simulation
    • SI Emulation
    • SI API

Categories

  • Files
    • Academic Information
    • Product Information
    • Case Studies

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


About Me


First Name


Last Name


Company/University Name


OCCUPATION


ICQ


WEBSITE


YAHOO


AOL


LOCATION


FACEBOOK


GOOGLEPLUS


SKYPE


TWITTER


YOUTUBE

  1. I finally got around to testing this, and the immediate restriction I see is that you can only use states and not functions. I.e. TimeNow, or custom math statements.
  2. I've created a tool which makes my life a bit easier when trying to code Design Add-Ins for Simio and I thought that I would share it with everyone else. Disclaimer: I'm an engineer that is mostly self-taught when it comes to programming so it may not work (all I know is that it works on my pc ). Also I know that it isn't the prettiest piece of software either. What the tool does is allow you to try c# code directly within Simio and evaluate the results. If you have ever used a dynamic programming language like Matlab or Mathematica then it will be familiar to you. Its like the command window in Matlab where you can enter commands without compiling. Its called a REPL (Read-Eval-Print-Loop). more info here: http://en.wikipedia.org/wiki/Read%E2%80%93eval%E2%80%93print_loop The code uses the Microsoft Roslyn Compiler API. more info here: http://en.wikipedia.org/wiki/Microsoft_Roslyn If you want to play around with the source code then you will probably need to install the Roslyn CTP. Download here: http://msdn.microsoft.com/en-gb/roslyn. I created the solution using Visual Studio 2012 and I believe that the roslyn compiler only works with VS 2012 at the moment. How to install: 1) Copy the SimioREPL folder from the zip file into either: C:\Program Files\Simio\UserExtensions or c:\Program Files (x86)\Simio\UserExtensions 2) The folder structure should be ..\Simio\UserExtensions\SimioREPL How to get started: 1) Create a new model in simio. 2) Select SimioREPL from the Select Add-In drop Menu (Project Home Ribbon) 3) Click "Insert Initializing Code" button. This inserts some code to get the whole thing going. You may need to change the directory of the dlls loaded if you are not using a 64-bit machine (delete the x86 part from the path). 4) Press the Execute button to evaluate the code. 5) You can now start playing with the interactive coding environment The bottom textbox displays the results from each execution loop. If no return values are given then it will display just the execution count. How to use (here is an example of how to use the tool): Enter c# code just like in a normal program, for example: int x = 10; You can find out the current value of a variable by entering its name without the ending semi-colon, for example: x or x*2 + 10 -3 This will display the value in the output text box at the bottom of the window. I've added the ability to use Write() and WriteLine(), just like in a console application. for example: WriteLine(object.ObjectName); If the code is invalid then the Exception message will be displayed in the results text box, and the input code will remain. If the code is valid then the input code is cleared. The context object is already defined. Use context as you normally would. Some example code Walkthrough: Add some objects to the model IIntelligentObjects intelligentObjects = context.ActiveModel.Facility.IntelligentObjects; IFixedObject sourceObject = intelligentObjects.CreateObject("Source", new FacilityLocation(-5, 0, -5)) as IFixedObject; IFixedObject serverObject = intelligentObjects.CreateObject("Server", new FacilityLocation(0, 0, 0)) as IFixedObject; IFixedObject sinkObject = intelligentObjects.CreateObject("Sink", new FacilityLocation(5, 0, 5)) as IFixedObject; ILinkObject path1 = intelligentObjects.CreateLink("Path",sourceObject.Nodes[0],serverObject.Nodes[0],null) as ILinkObject; ILinkObject path2 = intelligentObjects.CreateLink("Path",serverObject.Nodes[1],sinkObject.Nodes[0],null) as ILinkObject; [Execute] Move the source object intelligentObjects["Source1"].Location = new FacilityLocation(-4.5, 0, -2); [Execute] List all the nodes on the server object foreach(var node in serverObject.Nodes) { WriteLine(node); } [Execute] List all the objects in the model foreach(var ob in intelligentObjects) { WriteLine(ob.ObjectName); } [Execute] ---------- Hopefully you find this useful. If you improve the tool using the Source Code given then could you please repost the source code here in this forum topic. I'm sure that there are many things that can be improved by a proper programmer. What it really needs is intellisense . SimioREPL Source.zip SimioREPL UserExtension.zip
  3. I haven't done routing using tables, but I have definitely done server based decisions where each server had a row in the table. And things from server properties to parameters used within the server logic were also in the same row. The search step in conjunction with logic that tells you what the parent object you are in is.... works wonders. It is a staple form of modelling for me now. It is far easier to control parameter values from a table, than via the UI. As to the usage of the API... as you might guess... the API is not advanced enough to create or even edit models. All of the model development is done via the GUI, and a single experiment is created (with relevant properties to drive it), as experiments can't be created via the API either. The API is then solely invoked to change the parameters in the experiment, and run the experiment. The CSVs written out from the experiment are then sucked into the program, and processed and displayed in graphs or available to be spat out into pre-made excel sheets. This reduces the requirement of running a model from needing knowledge of excel + simio (quite a bit of knowledge is required here), to solely needing to run the one custom app and understanding what all the parameters you change do (API can't pull out definition descriptions). The custom app obviously uses the Simio API, but at no time requires the user to open the Simio GUI or touch the model directly. It won't mean much, but attached are a few screenshots of what kind of data we put in and get out using the custom tool. As you can see, you can add multiple scenarios in, and do the same kind of scenario comparison, and even look at what is happening Gannt chart wise.
  4. Hello, I am interested in having routing information read into a model from an Excel spreadsheet. The basic problem is that I have several entity types that must be processed at one of many servers. There are capability restrictions (i.e. EntityA can only be processed at Server1, EntityB can be processed at Servers1, 2, 3, etc). I have a “capability matrix” as input data that is a table in Excel showing where each entity type can be processed. In the Simio model, I am using a transfer node to route each entity to an available (and capable) Server by using the “Select from list” entity destination. My customer is interested in analyzing the impacts of changing capabilities of the servers. Currently, all other inputs to the model are fed in using bound Excel files. However, the routing logic requires lists, which I have to manually create and/or edit. I would like to have these bound to a data table, or somehow reflect the data in the master input Excel file. Thoughts? Thanks, Adam
  5. Yeah, running models from bound Excel files is not seamless. However, even that doesn't do what I'm after (unless I'm missing something). I would need a way to get data from the table (bound to an excel/csv file) into a list. Alternatively, I need a way to get the transfer node (or routing group) to select locations from a table. Would you mind summaraizing your workflow for using the API for input data? Do you build the model in the GUI and create properties for all your input data? What is your typical input data like? Just curious if I could use a similar approach... Thanks! Adam
  6. I have not looked too deeply at this specific problem for a while (there may be some obvious gotchas I have forgotten), however... have you looked at the Write step, and the bind excel sheet to table? You can bind excel sheets to tables, which will solve the feeding problem, and you can write out to csv files and use macros in the main spreadsheet to suck in that data. I have gone off excel sheet DRIVEN models though. The capability within Simio was just not there in making it easier for users. It is painful having to explain to end-users of models that they need to fix the absolute path references to the sheets... and that they must manually import the data into the tables if it caches incorrectly... etc. I only use excel for examining the results now, and for the rest I use experiments via the API and a written custom application.
  7. Simple approach: Take advantage of the fact that each model has an OnRunInitialized process that is called at the start of each run. --Create a table that contains all your initialization data. This might optionally be bound to an external file and automatically read if it changes frequently. --Define the OnRunInitialized process to search that table, create the entity(s), initialize the entity, and transfer it to the correct location. Look at the Simio Example (not SimBit) named RPsixample for an example of this approach applied to a simple scheduling model. More comprehensive approach: Take advantage of the fact that each object has an On Initialized add-in process that is called at the start of each run. --Create a table that contains all your initialization data identified by object instance. This might optionally be bound to an external file and automatically read if it changes frequently. --Define the On Initialized process to search that table for a matching object instance, create the entity(s), initialize the entity, and transfer it to the correct location. This can also set object characteristics as well, such as status, capacity, failure data, learning curve, … While this could be used by simply specifying the add-on process in each object instance, it is even more powerful if you create a custom object that includes a custom object-specific initialization process.
  8. While an If like Dan suggested but with 30 clauses would certainly be tedious to create, I think you could do it once in a Function, perhaps named StringState that returns the string. Then in all of your objects you simply reference StringState. That's a good work around. I had forgotten about functions in this kind of situation.
  9. Update: As of Sprint 65, the software now contains DateTime functions that return a number representing a minute, hour, day, month or year based on a datetime input (such as TimeNow). There are also additional functions that convert a datetime to/from a string and those that let you determine which day of the week, month or year corresponds to a given datetime. See Help for more information on these new functions. Examples of these functions are: DateTime.Month(datetime) - which will return the month component, expressed as an integer between 1 and 12, for the specified datetime value (if you want the month of the current simulation time, put TimeNow in the parenthesis). DateTime.DaysInMonth(month, year) - which will return the number of days in the specified month and year. Specify the month as a number ranging from 1 to 12 and the year as a number ranging from 1 to 9999. DateTime.ToString(datetime) - which will return a formatted datetime string for the specified numeric datetime value. For example, 02/08/2012 00:00:21.
  10. Today I had to do a quick and dirty model in Arena. I just thought I would take this opportunity to do a quick post on my findings. By no means is this a comprehensive analysis of the two tools, but I just felt like sharing my opinion of the two. Being the predecessor to Simio, it is natural to compare the two tools, and even after using Arena for the short amount of time I did... the differences were astounding. I will admit that Simio was my first immersion into the world of using corporate modelling tools. It was a tough journey to get to the stage where I felt comfortable using Simio, but looking back... I wonder how I got by using the archaic tools I did. The learning curve to Simio was extremely steep (in my humble opinion that is), and I still don't believe I am anywhere near utilizing 100% of Simio's capabilities. That being said... Simio is a relatively new tool and is still under active development. After launching Arena for the first time, the first thing that struck me was how bland/simple it was. Putting that to one side, I was impressed with how intuitive it was to use. This may be a side effect of using Simio, but barring my inability to find the Connect button for linking the objects together, I simply dragged objects into the process view and linked them up. The objects all had names that made sense (workstation... server... what were you guys thinking? >_>), and ignoring the fact that most of the symbols looked like they were drawn by pre-schoolers... the process of getting a simple model running was child's play. Within 5minutes I had my first working model. (I can tell you that it took a lot longer than that for my first Simio experience) One of the features I would love to see the most in Simio... AVI export. It was right there, and it was easy. Come on Simio! After placing multiples of an object, there was a table at the bottom of the screen with every other object of the same type, allowing you to quickly locate and edit properties of said objects... Simio... adding something like this would immeasurably improve productivity (mine atleast) and increase my levels of sanity after working with large models. Another point to note was that Arena felt very responsive, and while this normally would not be an achievement for a piece of software... Arena did not crash or give cryptic errors. (Simio crashed multiple times during my first 30minute experience with it... and I didn't even know how to do anything more advanced with it at that stage). The last point to make in this section of the post, is how human readable the reports were. My eyes were not assaulted with a million numbers. You could argue this is a bad thing or a good thing, but at the end of the day, some of these reports matched what I typically look for in Simio, and have to waste time trying to get. They were also laid out clearly and concisely. I am sure Arena has a fairly similar learning curve to Simio once you get to the more advanced stuff, but I have got to say that Arena definitly has the edge of many years of polish and tweaking. I am not here though to plug Arena. Let's get to the meat of this post now. The things I saw in my short time using Arena in comparison to Simio, that Simio did better. Even though I feel Simio has a lot more work to do on getting their product to the kind of a level Arena sits at (polish and usability) in terms of: aesthetics, power, time-savings (gained from re-usability of objects in Simio, instead of hard coded processes in Arena), feature base, and on-going development... Simio wins hands down. The benefits of object based models in comparison to process based models are imeasureable, and while some of the more basic features you would expect (or take for granted) in a modelling tool are lacking or missing in Simio, a lot of thought and has gone into the development of this tool. You can really see how Simio is the next generation of tool. I guess the point I am really trying to convey is, Simio rocks. It may be buggy as hell, it may not have every bell and whistle to satisfy my unreasonable demands, and it may not be as smooth or intuitive as Arena, but it is actively developed and a lot of love and care went into its development. I dare say that given time and a bigger/more active community, Simio will truly come into its own. The Arena community may be larger, but it does not appear as if Arena itself is evolving to meet the ever changing demands of the market. I guess it won't be long until the remaining Arena modellers move on and embrace newer technologies like Simio. Sorry for the long post. TLDR: Keep up the good work guys!
  11. Good advice Steve, One minor correction: Simio returns a date with a 4 digit year, so you would actually have to use: String.Substring(String.FromDateTime( TimeNow ),1,10) to get the date in a MM/DD/YYYY format To get months of the year would be (color added to highlight components): String.ToReal(String.Substring(String.FromDateTime( TimeNow ),1,2)) Of course if you wanted something simple like hour of day, you could take advantage of TimeNow being in hours and use a numeric expression like: Math.Remainder (TimeNow, 24) If you want to limit the precision add use of the Math.Floor or Math.Round functions like: Math.Floor(Math.Remainder (TimeNow, 24 )) to display integer hour or Math.Round(Math.Remainder (TimeNow, 24 )*100)/100 to display hundredths of hours. Note that all of these can be used in Status Labels and Floor Labels as in the attached example.IllustrationOfTimeFormats.spfx You can see more examples if you look at the Floor Labels in the Simio Example named HospitalEmergencyDepartment.
  12. Hi, In order to extract date time infortmation from TimeNow, I combine the use of the FromDateTime and Substring functions. For example: To get the date in a MM/DD/YY format, I use : String.Substring(String.FromDateTime( TimeNow ),1, To get tim information in HH:MM:SS, I use : String.Substring(String.FromDateTime( TimeNow ),12, Happy Modeling,
×
×
  • Create New...