Jump to content

jingalls

Members
  • Posts

    5
  • Joined

  • Last visited

  • Days Won

    1

jingalls last won the day on July 4 2018

jingalls had the most liked content!

About jingalls

Converted

  • OCCUPATION
    Industrial Engineer
    Fedex Ground

jingalls's Achievements

Newbie

Newbie (1/14)

1

Reputation

  1. 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)
  2. After some experimentation I have figured out how to get entities to interact directly with other entities, without having to add any code on the model level. By using the call: (first entity).location.parent.model.(second entity) inside a search or other process block inside the first entity I can access and manipulate the second entity. Example Model 1 - Ball Toss With Arch Simple Model to show different entities throwing a "ball" back and forth Example Model 2 - RvB Model to show entities "fighting" each other. In this model the entities interact with each other by reducing HP and destroying other entities Ball Toss with Arch.spfx RvBv4.spfx
×
×
  • Create New...