dadom09 Posted March 16, 2014 Share Posted March 16, 2014 Dear Insiders, As I am becoming already completely confused I've decided to ask you for help here. I am writing my final project and I am having troubles with modeling my system. The general description is as follows: I have N machines, where each of them has assigned an additional batching machine. The raw material is mounted into machine and by each hit of machine a product is coming out. The first question is here: I have around 500 different product types. It wouldn't make a sense to create approx 500 different entity types. Can I assign them a property/state from a data table with a "productNumber"? How can I approach this issue? This N machines are of the same type, the difference is in a tool they use (resource), I've got around 200 different tools. How can I assign its number according to data table like in the product number case described above? Why by using a separator and setting a "Copy Quantity" property to be taken from the data table ex. ArrivalTable.Volume doesnt it take a row from that column corresponding to order generated by the source? I feel helpless, does anybody has a comment on any of this issues? Link to comment Share on other sites More sharing options...
dadom09 Posted March 18, 2014 Author Share Posted March 18, 2014 Is there anyone which can explain me one of the above, or the problem of How can I make simio to process entities based on numbers taken from data table. I have successfully created a reference to a table by Table1.Volume but everytime the entity is being processed it creates amount taken from Table1.Volume but first ROW...i want it to go subseqently ROW2, ROW3 etc... Link to comment Share on other sites More sharing options...
gocken Posted March 18, 2014 Share Posted March 18, 2014 define an TableRowIndex statevariable for ModelEntity. and use Table1[TableRowIndex].volume. be sure before returning a value from Table1[TableRowIndex].volume, TableRowIndex's value must be set to right row number. for example, in an "appropriate process" you should assign: ModelEntity.TableRowIndex= "which row you want". Note: I think you want to increment row number sequentially. If it is true you should use ModelEntity.TableRowIndex=ModelEntity.TableRowIndex+1 each time you want to use it. but by this way you can cross the max row number. So, before this assignment you should check whether you cross the max nuımber of rows. for example, you can check whether ModelEntity.TableRowIndex it will work... Link to comment Share on other sites More sharing options...
dadom09 Posted March 19, 2014 Author Share Posted March 19, 2014 Thank you for your help. I find it very helpful! I've read somewhere on the forum about auto row setting property of a table but I couldnt find it. Would that work out if anything like that exists? If yes, where can I find it? Another question - if I have around 500 different product types - what will be the best solution to have the system recording a specific product name(string) taken from a table so I can keep a track on the amount of specific products manufactured? I want to avoid creating approx. 500 different entities.... Link to comment Share on other sites More sharing options...
gocken Posted March 19, 2014 Share Posted March 19, 2014 First of all you should know you can populate tables from excel. I think this property will simplify your job. If I were you I populate the table with 500 products via excel (simply populate the table in excel and copy paste it into the table, but be sure to match the dimensions of the tables) and when you assign the row number as in the previous post you can even specify by additional assignments which product you assigned (even if its type is in string format). Then you can easily collect statistics related with it. For example: look at the table above; TableAnimals. For examle, the modelentitys are created accoding to the percentages "Percent Type". In source object (you should only drag and drop one model entity in the facility window and assign entity type property of source object (for your problem this means product type assignment) as YourTableName.ProductTypeColumn) you can assign either modelentity.type=TableAnimals.Type (integer type) or modelentity.type=TableAnimals.Type (string type), it is up to you. If you assign product type string type simio will automatically tallies flowtime and total number produced at the end of the simulation, in results... Meanwhile, I do not know about auto row setting property. Perhaps you imply auto create property. It serves for a bit different purpose. Use the same method as in the previous post. Be sure to check whether "Table1.AvailableRowCount=='your table's max row number' ". If so, then assign ModelEntity.TableRowIndex=1. Link to comment Share on other sites More sharing options...
dadom09 Posted March 20, 2014 Author Share Posted March 20, 2014 (edited) Once again thank you for your replay. It's a very helpful input. However I dont understand couple of things. I am already using tables for my model. Please look at the example: So I want my system to do the following. OrderSource create an Order Entity(ArrivalTable.PO) based on ArrivalTable.StartDate, as soon as it gets to the sink it fires the RealseOrder event. Triggered by this event MaterialSource will create a coresponding material entity(MaterialTable.MatType), which will be transported to the Server(ArrivalTable.WorkStation). Server will create entities(add-on process with create step) in a quantity corresponding to ArrivalTable.Volume and ModelEntityType corresponding to ArrivalTable.ProductType(string). Each processed unit will arrive to a server which will batch units to specified quantity. Batched units will be waiting for an operator to pack them and place into container(server?). When container is full it's picked up by a vehicle and transported to inventory. I have most of it already modeled. However I am having problems with assigning correct rows. I've added RowNumber real state for ModelEntity and I've tried to assign it on MaterialSource on the StateAssignment Source property but something still doesnt work. What am I doing wrong? Edit: I have solved the problem with a RowNumber assignment. Thanks a lot for help, finally it creates a volume corresponding to correct row in a table. Now I am struggling with entity.type(i created new string state variable) problem. When I am trying to do as you have explained Im getting en error saying "Error assigning state variable ModelEntity.Type . Data type mismatch, state is string type but the new value to be assigned is of type NUMBER" I used assign step ModelEntity.Type to be changed to Model.Entity.Type == MyTable.ProductType and i get that error even though ProductType column is a string property... Edited March 20, 2014 by Guest Link to comment Share on other sites More sharing options...
dadom09 Posted March 20, 2014 Author Share Posted March 20, 2014 mistaken doublepost. Sorry about that Link to comment Share on other sites More sharing options...
gocken Posted March 20, 2014 Share Posted March 20, 2014 Yes, I had better see your model but still my best guesses are : The problem you reported is related to software ability to transform numbers to string types automatically (perhaps simio should recognize and transform product type numbers you entered automatically to string type as they are placed in a string type column property. . If I were you I prefer to use string type labels for product types (productA, productB). If you have to use numbers, at best I suggest use your numbers between quotes "12345" (you can transform these in excel easily). or add only p at the beginning of the numbers (P12345). I am not sure but perhaps it Works. A second solution should be define product types as integer type. It seems it does not matter whether they are string or integer in your problem? But, still I do not know your aim... Link to comment Share on other sites More sharing options...
dadom09 Posted March 20, 2014 Author Share Posted March 20, 2014 Tried both ways as suggested. Adding neither P nor "" between numbers helped... I've got similar error even though both STATE and column property are string type and there is a letter standing infront of the numbers chain. Any ideas? Link to comment Share on other sites More sharing options...
ASagan Posted March 21, 2014 Share Posted March 21, 2014 Try Model.Entity.Type == String.FromReal(MyTable.ProductType). Total alternative to the current approach -- use an excel table to create 500 different entity types as you originally said was unfeasible. Becomes easy. Look in the 'shared forum' to see the utilities on how to create models straight from excel. Link to comment Share on other sites More sharing options...
dadom09 Posted March 21, 2014 Author Share Posted March 21, 2014 ASagan, thank you so much for help. Simio gets unresponsive while transforming strig from real... However I'll try to use the tool you mentioned about. Hope it will work and will simplify my job. Thanks a lot once Again! Link to comment Share on other sites More sharing options...
gocken Posted March 21, 2014 Share Posted March 21, 2014 O.K., Asagan's suggestion should work. If not, nothing more to say, I have to see the model... Link to comment Share on other sites More sharing options...
dadom09 Posted March 22, 2014 Author Share Posted March 22, 2014 The tool worked flawlessly. Thanks a lot, it solved my issues Link to comment Share on other sites More sharing options...
dadom09 Posted March 22, 2014 Author Share Posted March 22, 2014 Of course I encountered another problem... I am trying to use reference group properties and I am already about to lose my mind because of it. Could anybody please take a look at my model(attached) and tell me how can I create MACHINE+Stacker as a seperate model, which will be using data table from the main model and will be placed within the main model. Edit: I've solved that problem. Link to comment Share on other sites More sharing options...
Recommended Posts