Jump to content

Search the Community

Showing results for 'write to excel'.

  • 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

Found 15 results

  1. Hi, Sometimes when a long question is asked, no one answers. Here is a short question: how can I enable the Write add-on step to report all replications into one excel file rather than reporting replications into multiple excel files, one for each replication? Thank you,
  2. I've been having issues with binding Excel files (XLSX and CSV format) into SIMIO. Every time I try to bind a file with SIMIO I get the same message of "Data has not been imported or is of an unknown age." Even when I create a table in SIMIO, save to CSV, and then try to reimport the exact same table by creating a CSV binding I get the same error. For further context I am using the Academic RPS version of SIMIO. All online tutorials I can find are using older/ different versions of SIMIO that don't have the same options as I do. Does anyone else have experience with this issue or is able to share some advice to help me get pass this error? Thank you
  3. Hi All,

    I have a server and I have to write out in a csv whenever the resource state of the server changes like from processing to blocked  or from blocked to processing and so on, I do not have a RPS version. any suggestions to this will be really helpful. Thanks

    Unmesh

    1. gocken

      gocken

      Hi Chandak, 
      from definitions tab add a monitor element (i.e., monitor1) in your model and set its state variable name property to i.e., Server1.ResourceState. Also, from definitions tab include an excelconnect element which is a user defined element. set its excel workbook property as i.e., resource_state.xlsx (create a resource_state.xlsx file in the same folder where your .spfx file will run). In processes tab create a new process i.e., Process 1 and in there place an assign step and an excel write step (from user defined steps). Define a state variable i.e., row_index. in assign step set state variable name property as row_index and set new value property as row_index+1. In excel write step set excelconnect property as ExcelConnect1, set worksheet as "sheet 1" (resource_state.xlsx excel file's sheet name), set row as row_index, leave starting column property as default, and add two items such as "ResourceState" and "Run.TimeNow". at last, select process1 and set triggering event name as Monitor1.Event. 
      also, in order to get different resource states in your excel file you can define a work schedule or a failure mechanism on your server object. Hope it works?  

    2. Unmesh.Chandak

      Unmesh.Chandak

      Dear Gocken,

      Thank you so much for your response. That is really helpful. Appreciate it.

      Regards,

      Unmesh

  4. Today, I found this topic talks about updating data in real-time when simulation is running. I thought it could be useful for me in the future so I decided to try it myself. But, when I used the Read/ExcelRead Step, I found it only "read" the external file at the first time: It seems the Read Step creates a copy of the external file at the first read and then it will use the copy for the future reads within the simulation. For example, at the start of my simulation, I used a button to call ExcelRead Step to read a excel file. Then, I manually changed some values in the excel file and I called the ExcelRead Step again. However, the second ExcelRead Step didn't read the changed values.If I want to use the changed values, I need to restart the simulation. For the Write/ExcelWrite Step, only when I stop the simulation, the external file will be updated. If I don't stop the simulation, no matter how many times I call Write/ExcelWrite Step, the external file is not changed. Are these kinds of behavior bugs? Because from the above topic, I think the Read and Write step can update the external file within the simulation. My Simio version is 12.207.20659. Thanks to everyone in advance!
  5. Hi All, I am using the write step in my logic but i am unable to write a string in csv, how can i do that? it is unable to convert element reference to string below is the error. Thank you.
  6. Hello, when i use an Excelwrite step to write something into an Excel Sheet (xlsx) all works fine . However, when i convert the Excel sheet into an Excel Sheet with Macros (xlsm) the data is corrupted after the simio run. Can someone tell me how to write into an Excel.xlsm Sheet with the given ExelWrite Step ? Best regards, Benjamin
  7. Is it possible to use local Simio software to read external Excel file from other server? Thanks
  8. NOTE....Code has been removed from this post. Please use the Excel Read and Excel Write steps that are provided when Simio is installed. There is a ExcelReadWrite simbit. The code is provided in C:\Users\Public\Documents\Simio\Examples\UserExtensions\ExcelReadWrite ExcelReadWrite.zip
  9. Hi all, I'm setting up a presentation to get accross the benefits of using Simio over Excel. They are pretty stubborn, as they've been using Excel for years now for project predictions. I just wanted to know has anyone here been in a similar predicament? If so, what tools (examples, interective games, slides, etc) did you use to get your point accross? I've set up a presentation, using old project examples as well as the benefits of the analytical vs simulation approaches, just wondered if there's anything else that I'm missing. Thanks!
  10. This script will combine output files from Experiments that use the Write Step. It will average the cells across all selected sheets, and is designed to work with .CSVs that are the same shape. In R Studio, the code needs to be ran as "source" y = 1 x = 1 fileIterate = 1 readline(prompt="Press Enter To Select Files: ") fileSave <- choose.files(default = "", caption = "Select files", multi = TRUE, filters = Filters, index = nrow(Filters)) readline(prompt="Press Enter To Select Output Folder: ") outputFolder <- choose.dir(default = "", caption = "Select folder") fileName <- readline(prompt="Enter Output File Name: ") buildFile <- read.csv(fileSave[fileIterate], header = TRUE, sep = ",") fileIterate = fileIterate + 1 while(fileIterate <= length(fileSave)) { holderFile <- read.csv(fileSave[fileIterate], header = TRUE, sep = ",") while( y <= ncol(buildFile)){ while(x <= nrow(buildFile)){ buildFile[x,y] <- mean(holderFile[x,y],buildFile[x,y]) x = x + 1; } y = y +1; x = 1; } x = 1 y = 1 fileIterate = fileIterate + 1 } fileName <- paste(fileName, ".csv") outputTheFile <- paste(outputFolder, fileName,sep = "\\") write.csv(buildFile, file = outputTheFile)
  11. Hi guys, I am trying to read origins and destinations out of an Excel file. To do this, I defined a process, in which I read the Excel file using "Excel Read", in which I read the origins and destinations and write them in the Node Reference State Variables ExcelOrigin and ExcelDestination respectively. After this, I created an entity, for which I assigned the Node Reference State Variables "ModelEntity.Origin" and "ModelEntity.Destination" to the previously defined "ExcelOrigin" and "ExcelDestination". Then I want to transfer the entity from Free Space to ModelEntity.Origin and set the destination using SetNode to ModelEntity.Destination. However, upon running the model, it states that "The value 'ModelEntity.Origin' for property 'Transfer.NodeName' is a null or undefined reference". It seems that it does not read the nodes properly from the Excel file, but if I change the input in the Excel file to a random number instead of one of the nodes, it presents the error of a data error mismatch; this makes me think that it does read the Excel file and sees whether or not the input are nodes. Is reading Nodes into a Node Reference State Variable from Excel even possible? Anyone who came across the same problem or has a solution? I have included my example in the attachment. Excel Read Node Reference State variable.spfx Input.xlsx
  12. This fixed the outstanding bug where writing in an experiment would dump all csv files in the simulation root directory, ignoring the relative directories you specify in the file path in the file element. The fix was trivial, and I am sure I have raised it several times both on this forum. I made the fix a few months ago, and have kept meaning to post it here (if indeed I have not already). The problem with unofficial fixes is that it is another moving part to update, keep track of, and adds to installation complexity. I have lost previous fixes twice (due to fresh re-installs). Essentially "fileNameWithoutExtension = System.IO.Path.GetFileNameWithoutExtension(fileName);" was the culprit. I changed the "_writerFileName" directive from using the above variable to: _writerFileName = "fileName + "_" + simioScenarioName + "_Rep" + simioReplicationNumber + fileExtension;" I could do something neater (as the current output will have a ".csv" in the middle of the name), but did not spend any time on this. It would be appreciated if this was fixed and applied to the official write block (even if as a toggleable option), as due to the over-zealous licensing terms, the DLL will not load on an unlicensed client... meaning I have to choose between having the bug fixed and not dumping hundreds of thousands of CSV files in my simulation root... or causing clients considerable inconvenience by writing hundreds of thousands of CSV files into their simulation root. Here is the relevant code extract in the file element: if (String.IsNullOrEmpty(fileName) == false) { string fileRoot = null; string fileDirectoryName = null; string fileNameWithoutExtension = null; string fileExtension = null; try { fileRoot = System.IO.Path.GetPathRoot(fileName); fileDirectoryName = System.IO.Path.GetDirectoryName(fileName); fileNameWithoutExtension = System.IO.Path.GetFileNameWithoutExtension(fileName); fileExtension = System.IO.Path.GetExtension(fileName); } catch (ArgumentException e) { data.ExecutionContext.ExecutionInformation.ReportError(String.Format("Failed to create runtime file element. Message: {0}", e.Message)); } string simioProjectFolder = _data.ExecutionContext.ExecutionInformation.ProjectFolder; string simioExperimentName = _data.ExecutionContext.ExecutionInformation.ExperimentName; string simioScenarioName = _data.ExecutionContext.ExecutionInformation.ScenarioName; string simioReplicationNumber = _data.ExecutionContext.ExecutionInformation.ReplicationNumber.ToString(); if (String.IsNullOrEmpty(fileDirectoryName) || String.IsNullOrEmpty(fileRoot)) { fileDirectoryName = simioProjectFolder; fileName = fileDirectoryName + "\\" + fileName; } _readerFileName = fileName; if (String.IsNullOrEmpty(simioExperimentName)) _writerFileName = fileName; else _writerFileName = fileName + "_" + simioScenarioName + "_Rep" + simioReplicationNumber + fileExtension; } Using relative file paths worked at one stage, and was later broken. Below are two threads with work around un-offical dlls that probably implement the fix nicer. 10/07/2012 - http://www.simio.com/forums/viewtopic.php?f=19&t=829 07/12/2012 - http://www.simio.com/forums/viewtopic.php?f=20&t=987 TextFileReadWrite_compiled.zip TextFileReadWrite_source.zip
  13. NOTE....Code has been removed from this post. Please use the DB Read and DB Write steps that are provided when Simio is installed. There is a DBReadWrite simbit. The code is provided in C:\Users\Public\Documents\Simio\Examples\UserExtensions\DbReadWrite
  14. Okay guys, I need some help. I am completely new to Simio and I migrated from Visio. I have just started playing around with Simio. But, I am building relatively large models and it takes some time to finish. Now, what I need to know is if there is a way to automatically generate a model in simio by linking it to an excel database? I am building production flow models to look at bottlenecks and so forth. So, I constantly update my database in excel. Also, if there is, can you tell me how I can do it? Would I need to code it in the Simio API? I installed Visual studio 2013 but I don't know how to connect it to Simio. I am completely new to this and any help would be greatly appreciated. Thanks
×
×
  • Create New...