/// <summary> /// Method called when the add-in is run. /// </summary> public void Execute(IDesignContext context) { // This example code places some new objects from the Standard Library into the active model of the project. if (context.ActiveModel != null) { // Example of how to place some new fixed objects into the active model. // This example code places three new fixed objects: a Source, a Server, and a Sink. IIntelligentObjects intelligentObjects = context.ActiveModel.Facility.IntelligentObjects; IFixedObject sourceObject = intelligentObjects.CreateObject("Source", new FacilityLocation(-10, 0, -10)) as IFixedObject; IFixedObject serverObject = intelligentObjects.CreateObject("Server", new FacilityLocation(0, 0, 0)) as IFixedObject; IFixedObject sinkObject = intelligentObjects.CreateObject("Sink", new FacilityLocation(10, 0, 10)) as IFixedObject; // Example of how to place some new link objects into the active model (to add network paths between nodes). // This example code places two new link objects: a Path connecting the Source 'output' node to the Server 'input' node, // and a Path connecting the Server 'output' node to the Sink 'input' node. INodeObject sourceOutputNode = sourceObject.Nodes[0]; INodeObject serverInputNode = serverObject.Nodes[0]; INodeObject serverOutputNode = serverObject.Nodes[1]; INodeObject sinkInputNode = sinkObject.Nodes[0]; ILinkObject pathObject1 = intelligentObjects.CreateLink("Path", sourceOutputNode, serverInputNode, null) as ILinkObject; ILinkObject pathObject2 = intelligentObjects.CreateLink("Path", serverOutputNode, sinkInputNode, null) as ILinkObject; // Example of how to edit the property of an object. // This example code edits the 'ProcessingTime' property of the added Server object. serverObject.Properties["ProcessingTime"].Value = "100"; } }
public void CreateServer( IIntelligentObjects intelligentObjects, int x, int y, string probabilidad, string processingTime, string initialCapacity, string tiempo, string distancia, string nombre, INodeObject deEntrega, INodeObject aSink ) { Server server = new Server(intelligentObjects, x, y); server.UpdateProcessingTime(processingTime); server.UpdateInitialCapacity(initialCapacity); server.UpdateInputBufferDecisionType("Probabilistic"); server.UpdateInputBufferBalkConditionOrProbability("0.08"); server.UpdateInputBufferBalkNodeName("IrSalida"); server.UpdateName(nombre); if (tiempo != null) { TimePath path = new TimePath(intelligentObjects, deEntrega, server.GetInput()); path.UpdateSelectionWeight(probabilidad); path.UpdateTravelTime(tiempo); } else { Path path = new Path(intelligentObjects, deEntrega, server.GetInput()); path.UpdateSelectionWeight(probabilidad); path.UpdateDrawToScale("False"); path.UpdateLogicalLength(distancia); } TimePath timePath = new TimePath(intelligentObjects, server.GetOutput(), aSink); timePath.UpdateTravelTime("18/60"); }
/// <summary> /// Method called when the add-in is run. /// </summary> public void Execute(IDesignContext context) { // This example code places some new objects from the Standard Library into the active model of the project. if (context.ActiveModel != null) { var table = context.ActiveModel.Tables["Resources"]; var table2 = context.ActiveModel.Tables["LinkTable"]; context.ActiveModel.BulkUpdate(model => { foreach (IRow row in table.Rows) { var io = context.ActiveModel.Facility.IntelligentObjects[row.Properties["ResourceName"].Value]; io = context.ActiveModel.Facility.IntelligentObjects.CreateObject(row.Properties["ResourceType"].Value, new FacilityLocation(Double.Parse(row.Properties["XLocation"].Value), 0, Double.Parse(row.Properties["ZLocation"].Value))); io.ObjectName = row.Properties["ResourceName"].Value; } foreach (IRow row in table2.Rows) { INodeObject j = context.ActiveModel.Facility.IntelligentObjects[row.Properties["Node1"].Value] as INodeObject; INodeObject j2 = context.ActiveModel.Facility.IntelligentObjects[row.Properties["Node2"].Value] as INodeObject; var j4 = context.ActiveModel.Facility.IntelligentObjects.CreateLink("Path", j, j2, null) as ILinkObject; } }); } }
public void SetDestinationStation(IIntelligentObjects intelligentObjects, INodeObject destinationstation, string distance, string probability) { Path path = new Path(intelligentObjects, station.GetOutput(), destinationstation); path.UpdateDrawToScale("False"); path.UpdateLogicalLength(distance); path.UpdateSelectionWeight(probability); }
private void createBase(INodeObject airplaneOutput, INodeObject personOutput) { IIntelligentObject airplane = simio.createSource("airplane", 0, 0, 0); IIntelligentObject person = simio.createSource("person", 2, 0, 0); airplaneOutput = simio.getNodeOutput(airplane); personOutput = simio.getNodeOutput(person); simio.createSink("salida", 1, 1, 1); }
private void createAirPort(String[] line, INodeObject airplane, INodeObject person) { IIntelligentObject _object = simio.createCombiner(line[1], Int16.Parse(line[2]), Int16.Parse(line[3]), Int16.Parse(line[4])); this.ariport.Add(Int16.Parse(line[0]), _object); INodeObject parent = this.simio.getParentIpunt(_object); INodeObject member = this.simio.getMemberIpunt(_object); simio.addConnector(airplane, parent, null); simio.addConnector(person, member, null); simio.addFailure(_object, line[5]); }
public void Enlazar(INodeObject nodoInicio, INodeObject nodoFin, bool validarNombre = true) { if (validarNombre) { model.Facility.IntelligentObjects.CreateLink("Path", nodoInicio, nodoFin, null); model.Facility.IntelligentObjects["Path1"].ObjectName = "ph" + idpath.ToString(); } else { model.Facility.IntelligentObjects.CreateLink("Path", nodoInicio, nodoFin, null).Size = new FacilitySize(2, 0.3, 0); } }
private void crear() { IIntelligentObjects _objetos = _modelo.Facility.IntelligentObjects; int x = 0; int z = 0; int y = 1; IIntelligentObject combiner = _objetos.CreateObject("Combiner", new FacilityLocation(x, z, y)); combiner.ObjectName = "fabi"; INodeObject input = seekForName("MemberInput@" + combiner.ObjectName) as INodeObject; INodeObject output = seekForName("ParentInput@" + combiner.ObjectName) as INodeObject; List <FacilityLocation> listpoints = new List <FacilityLocation>(); FacilityLocation fl = new FacilityLocation(35, 36, 86); listpoints.Add(fl); IIntelligentObject connect1 = _objetos.CreateLink("Connector", input, output, listpoints); }
public void crearModelo() { ReadExcel objExcel; INodeObject nodoInicio = null; INodeObject nodoFin = null; INodeObject nodoInicioMapa = null; Path objPath = new Path(); int distanciaIni = 0; int distanciaNodoAnterior = 0; objExcel = new ReadExcel(); var listPuntos = objExcel.readCSV("coordenadasmapalite.csv", true); foreach (var item in listPuntos) { TransferNode tn = new TransferNode(item.id, item.ejeX, item.ejeY); nodoFin = tn.getTransferNode(); if (nodoInicioMapa == null) { nodoInicioMapa = nodoFin; distanciaIni = item.distancia; } if (nodoInicio != null) { objPath.idpath = item.id; objPath.Enlazar(nodoInicio, nodoFin); objPath.setDistancia(distanciaNodoAnterior); } nodoInicio = nodoFin; distanciaNodoAnterior = item.distancia; } objPath.idpath = 1; objPath.Enlazar(nodoFin, nodoInicioMapa); objPath.setDistancia(distanciaNodoAnterior); }
internal void start(string filePath) { INodeObject airplaneOutput = null; INodeObject personOutput = null; simio = new SimioFile(); read = new ReadCsv(filePath, ','); string[] line = read.getline(); line = read.getline(); IIntelligentObject airplane = simio.createSource("airplane", 0, 0, 0); IIntelligentObject person = simio.createSource("person", 2, 0, 0); airplaneOutput = simio.getNodeOutput(airplane); personOutput = simio.getNodeOutput(person); simio.createSink("salida", 1, 1, 1); while (line != null) { createAirPort(line, airplaneOutput, personOutput); line = read.getline(); } simio.saveFile(); }
internal IIntelligentObject addConnector(INodeObject airplane, INodeObject parent, object p) { return(this.getObjectList().CreateLink("Connector", airplane, parent, null)); }
public void crearLink(String type, INodeObject nodo1, INodeObject nodo2) { intelligentObjects.CreateLink(type, nodo1, nodo2, null); }
public void crearPath(INodeObject nodo1, INodeObject nodo2) { crearLink("Conveyor", nodo1, nodo2); }
public void EnlazarSourceTN(String idSource, INodeObject nodoInicio, INodeObject nodoFin) { model.Facility.IntelligentObjects.CreateLink("Path", nodoInicio, nodoFin, null); model.Facility.IntelligentObjects["Path1"].ObjectName = "ph" + idSource; }
public void createConveyor(INodeObject nodo1, INodeObject nodo2) { this.createLink("Conveyor", nodo1, nodo2); }
public void createTimePath(INodeObject nodo1, INodeObject nodo2) { this.createLink("TimePath", nodo1, nodo2); }
public Link(IIntelligentObjects intelligentObjects, INodeObject node1, INodeObject node2, string type) { @object = intelligentObjects.CreateLink(type, node1, node2, null); }
public void createLink(String type, INodeObject nodo1, INodeObject nodo2) { model.Facility.IntelligentObjects.CreateLink(type, nodo1, nodo2, null); }
//--------------------------------------- Crear Enlace -----------------------------------// public void createPath(INodeObject nodo1, INodeObject nodo2) { this.createLink("Path", nodo1, nodo2); Console.WriteLine("path creado..."); }
public TimePath(IIntelligentObjects intelligentObjects, INodeObject node1, INodeObject node2) : base(intelligentObjects, node1, node2, "TimePath") { }
/// <summary> /// Method called when the add-in is run. /// </summary> public void Execute(IDesignContext context) { var warnings = new List <String>(); // This example code places some new objects from the Standard Library into the active model of the project. if (context.ActiveModel != null) { IIntelligentObjects intelligentObjects = context.ActiveModel.Facility.IntelligentObjects; IFixedObject bed = intelligentObjects.CreateObject("Bed", new FacilityLocation(0, 0, 0)) as IFixedObject; IFixedObject sourceObject = intelligentObjects.CreateObject("Source", new FacilityLocation(-10, 0, -10)) as IFixedObject; IFixedObject serverObject = intelligentObjects.CreateObject("Server", new FacilityLocation(0, 0, 0)) as IFixedObject; IFixedObject sinkObject = intelligentObjects.CreateObject("Sink", new FacilityLocation(10, 0, 10)) as IFixedObject; IEntityInstanceReferencePropertyDefinition modelentitiy = intelligentObjects.CreateObject("Patient", new FacilityLocation(-20, 0, -10)) as IEntityInstanceReferencePropertyDefinition; ITransporterInstanceReferencePropertyDefinition regnurse = intelligentObjects.CreateObject("Worker", new FacilityLocation(-30, 0, -30)) as ITransporterInstanceReferencePropertyDefinition; //var RNurseName = context.ActiveModel.Facility.IntelligentObjects["Worker1"]; //RNurseName.Properties["Name"].Value = "RegularNurse"; //var modelentitiy = context.ActiveModel.Facility.IntelligentObjects["Patient"]; // Example of how to place some new link objects into the active model (to add network paths between nodes). // This example code places two new link objects: a Path connecting the Source 'output' node to the Server 'input' node, // and a Path connecting the Server 'output' node to the Sink 'input' node. INodeObject sourceOutputNode = sourceObject.Nodes[0]; INodeObject serverInputNode = serverObject.Nodes[0]; INodeObject serverOutputNode = serverObject.Nodes[1]; INodeObject sinkInputNode = sinkObject.Nodes[0]; INodeObject bedinputnode = bed.Nodes[0]; INodeObject bedoutputnode = bed.Nodes[1]; ILinkObject pathObject1 = intelligentObjects.CreateLink("Path", sourceOutputNode, serverInputNode, null) as ILinkObject; ILinkObject pathObject2 = intelligentObjects.CreateLink("Path", serverOutputNode, bedinputnode, null) as ILinkObject; ILinkObject pathObject3 = intelligentObjects.CreateLink("Path", bedoutputnode, sinkInputNode, null) as ILinkObject; // Example of how to edit the property of an object. // This example code edits the 'ProcessingTime' property of the added Server object. serverObject.Properties["ProcessingTime"].Value = "0"; sourceObject.Properties["EntityType"].Value = "Patient1"; var defaultEntity = context.ActiveModel.Facility.IntelligentObjects["Patient1"]; defaultEntity.Properties["RegNurseCheckTime"].Value = "HospitalData.RNRounding"; defaultEntity.Properties["TherapistCheckTime"].Value = "HospitalData.TherapistRounding"; defaultEntity.Properties["AssistantNurseCheckTime"].Value = "HospitalData.ANRounding"; defaultEntity.Properties["BedStayTime"].Value = "HospitalData.BedStayTime"; defaultEntity.Properties["TherapistVisitTime"].Value = "HospitalData.TherapistVisitTime"; defaultEntity.Properties["RegNurseVisitTime"].Value = "HospitalData.RegNurseVisitTime"; defaultEntity.Properties["AssistantNurseNextVisit"].Value = "HospitalData.AssistantNurseNextVisit"; ITable entitydatatable = context.ActiveModel.Tables.Create("HospitalData"); var i = entitydatatable.Columns.AddEntityReferenceColumn("PatientTypes"); var mix = entitydatatable.Columns.AddRealColumn("Mix", 0.0); var admisiontime = entitydatatable.Columns.AddExpressionColumn("AdmissionTime", "0.0"); (admisiontime as IUnitizedTableColumn).UnitType = SimioUnitType.Time; var rnrounding = entitydatatable.Columns.AddExpressionColumn("RNRounding", "0.0"); var nurserounding = entitydatatable.Columns.AddExpressionColumn("ANRounding", "0.0"); var therapistrounding = entitydatatable.Columns.AddExpressionColumn("TherapistRounding", "0.0"); var bedtime = entitydatatable.Columns.AddExpressionColumn("BedStayTime", "0.0"); var RVisitTime = entitydatatable.Columns.AddExpressionColumn("RegNurseVisitTime", "0.0"); var TVisitTime = entitydatatable.Columns.AddExpressionColumn("TherapistVisitTime", "0.0"); var AVisitTime = entitydatatable.Columns.AddExpressionColumn("AssistantNurseNextVisit", "0.0"); //Add Resource Type List var resourceType = context.ActiveModel.NamedLists["ResourceType"]; if (resourceType != null) { warnings.Add(string.Format(FormatListMessage(resourceType.Name))); } else { resourceType = context.ActiveModel.NamedLists.AddObjectList("ResourceType"); var firstRow = resourceType.Rows.Create(); firstRow.Properties[0].Value = "Source"; var secondRow = resourceType.Rows.Create(); secondRow.Properties[0].Value = "Server"; var thirdRow = resourceType.Rows.Create(); thirdRow.Properties[0].Value = "Patient"; var fourthRow = resourceType.Rows.Create(); fourthRow.Properties[0].Value = "RegNurse"; var fifthRow = resourceType.Rows.Create(); fifthRow.Properties[0].Value = "Therapist"; var sixthrow = resourceType.Rows.Create(); sixthrow.Properties[0].Value = "Ass.Nurse"; var seventhRow = resourceType.Rows.Create(); seventhRow.Properties[0].Value = "Sink"; var eigthRow = resourceType.Rows.Create(); eigthRow.Properties[0].Value = "Bed"; var ninthRow = resourceType.Rows.Create(); ninthRow.Properties[0].Value = "Worker"; } //Adding Resource Table ITable resourceTable = context.ActiveModel.Tables["Resources"]; if (resourceTable != null) { warnings.Add(string.Format(FormatListMessage(resourceTable.Name))); } else { resourceTable = context.ActiveModel.Tables.Create("Resources"); var j = resourceTable.Columns.AddObjectReferenceColumn("ResourceName"); j.FilterToResources = false; j.IsKey = true; var resourceTypes = resourceTable.Columns.AddListReferenceColumn("ResourceType"); resourceTypes.ListName = ("ResourceType"); resourceTypes.DefaultString = ("Bed"); } ITable link = context.ActiveModel.Tables["LinkBetweenResources"]; if (link != null) { warnings.Add(string.Format(FormatLinkMessage(link.Name))); } else { } //var modelentity1 = context.ActiveModel.Facility.IntelligentObjects["Patient"]; //modelentity1.Properties["BedStayTime"].Value = "5"; } #endregion }
private void CalcularButton_Click(object sender, EventArgs e) { SimioProjectFactory.SetExtensionsPath(System.AppDomain.CurrentDomain.BaseDirectory); string[] warnings; try { string path = "Modelo1_G1.spfx"; if (File.Exists(path) == false) { throw new ApplicationException($"Proyecto no encontrado:{path}"); } ISimioProject _simioProject = SimioAPI.SimioProjectFactory.LoadProject(path, out warnings); IModel model = _simioProject.Models[1]; //var jsonObj = JsonConvert.DeserializeObject<List<aeropuerto>>(sb.ToString()); //foreach (var obj in jsonObj) //{ // model.Facility.IntelligentObjects.CreateObject("Combiner", new FacilityLocation(obj.posicion_x, obj.posicion_z, obj.posicion_y)); //} model.Facility.IntelligentObjects.CreateObject("Source", new FacilityLocation(0, 0, 0)); var objetoA = model.Facility.IntelligentObjects["Source1"]; objetoA.ObjectName = "Personas"; objetoA.Properties["EntityType"].Value = "ModelEntity1"; objetoA.Properties["InterarrivalTime"].Value = "Random.Poisson(5)"; INodeObject nodo = ((IFixedObject)model.Facility.IntelligentObjects["Personas"]).Nodes[0]; var nombreNodo = nodo.Properties["OutboundLinkRule"]; nombreNodo.Value = "By Link Weight"; //[64] = {EnteredAddOnProcess: } var exitedProcess = nodo.Properties["EnteredAddOnProcess"]; exitedProcess.Value = "Process1"; model.Facility.IntelligentObjects.CreateObject("Source", new FacilityLocation(-20, 0, 0)); var objetoB = model.Facility.IntelligentObjects["Source1"]; objetoB.ObjectName = "Aviones"; objetoB.Properties["EntityType"].Value = "ModelEntity2"; objetoB.Properties["InterarrivalTime"].Value = "Random.Poisson(0.1)"; foreach (DataRow fila in dt.Rows) { //model.Facility.IntelligentObjects.CreateObject("Combiner", new FacilityLocation(Convert.ToDouble(fila[2]), Convert.ToDouble(fila[3]), Convert.ToDouble(fila[4]))); model.Facility.IntelligentObjects.CreateObject("Combiner", new FacilityLocation(Convert.ToDouble(fila[2]), Convert.ToDouble(fila[4]), Convert.ToDouble(fila[3]))); var objeto = model.Facility.IntelligentObjects["Combiner1"]; objeto.ObjectName = "aeropuerto_" + Convert.ToString(fila[0]); model.Facility.IntelligentObjects.CreateObject("Sink", new FacilityLocation((Convert.ToDouble(fila[2]) - 5), Convert.ToDouble(fila[4]), Convert.ToDouble(fila[3]))); var entradaAeropuerto = model.Facility.IntelligentObjects["Sink1"]; entradaAeropuerto.ObjectName = "AuxAeropuerto_" + Convert.ToString(fila[0]); String vari = "aeropuerto_" + Convert.ToString(fila[0]); INodeObject nodo2 = ((IFixedObject)model.Facility.IntelligentObjects[vari]).Nodes[1]; var exitedProcess2 = nodo2.Properties["EnteredAddOnProcess"]; exitedProcess2.Value = "Write_Bitacora"; //FailureType = 61 objeto.Properties[61].Value = Convert.ToString(fila[5]); //CountBetweenFailures = 63 objeto.Properties[63].Value = Convert.ToString(fila[6]); //TimeToRepair = 65 objeto.Properties[65].Value = Convert.ToString((Convert.ToDouble(fila[7]) / 60)); //InitialCapacity = 16 objeto.Properties[16].Value = Convert.ToString(fila[8]); //ProcessingTime = 39 objeto.Properties[39].Value = Convert.ToString(fila[10]); //BatchQuantity = 27 objeto.Properties[27].Value = "100"; //MemberTransferInTime objeto.Properties["MemberTransferInTime"].Value = Convert.ToString(fila[9]);; String combi = "aeropuerto_" + Convert.ToString(fila[0]); INodeObject a = ((IFixedObject)model.Facility.IntelligentObjects["Personas"]).Nodes[0]; INodeObject b = ((IFixedObject)model.Facility.IntelligentObjects[combi]).Nodes[1]; var arista = model.Facility.IntelligentObjects.CreateLink("Path", a, b, null); var tipoSeleccion = arista.Properties["SelectionWeight"]; //Math.If( ModelEntity.destino == 1, 1, 0 ) tipoSeleccion.Value = "Math.If( ModelEntity.a_origen == " + Convert.ToString(fila[0]) + ", 1, 0 )"; String combi2 = "aeropuerto_" + Convert.ToString(fila[0]); INodeObject a2 = ((IFixedObject)model.Facility.IntelligentObjects["Aviones"]).Nodes[0]; INodeObject b2 = ((IFixedObject)model.Facility.IntelligentObjects[combi]).Nodes[0]; model.Facility.IntelligentObjects.CreateLink("Path", a2, b2, null); } //var objeto2 = model.Facility.IntelligentObjects["aeropuerto_1"]; //objeto2.ObjectName = "nuevo"; /**************Esto es para los Path**************/ //Destino posicion 0 //Origen posicion 1 foreach (DataRow fila in dt2.Rows) { String aux1 = "aeropuerto_" + fila[0]; String aux2 = "aeropuerto_" + fila[1]; String aux3 = "AuxAeropuerto_" + fila[0]; //Aeropuerto Origen -> Salida INodeObject a = ((IFixedObject)model.Facility.IntelligentObjects[aux2]).Nodes[2]; INodeObject b = ((IFixedObject)model.Facility.IntelligentObjects[aux3]).Nodes[0]; model.Facility.IntelligentObjects.CreateLink("Path", a, b, null); } //*************** Esto es para los experimentos **********/ //IExperiment experimento = model.Experiments.Create("Experimento"); ////configurando el experimento //IRunSetup setup = experimento.RunSetup; //setup.StartingTime = new DateTime(2018, 10, 1); //setup.WarmupPeriod = TimeSpan.FromHours(0); //setup.EndingTime = experimento.RunSetup.StartingTime + TimeSpan.FromDays(1); //experimento.ConfidenceLevel = ExperimentConfidenceLevelType.Point95; //experimento.LowerPercentile = 25; //experimento.UpperPercentile = 75; ////configuracion variable de control ////configurando los responses ////a estos hay que asignarles un valor en el escenario //IExperimentResponse response1 = experimento.Responses.Create("CantidadAviones"); //response1.Expression = "avion.cantidad"; //valor de ejemplo //IExperimentResponse response2 = experimento.Responses.Create("CantidadPersonasTranportadas"); //response2.Expression = "personas.cantidad"; //valor de ejemplo ////creando un escenario //IScenario escenario1 = experimento.Scenarios.Create("escenario1"); //IScenario escenario2 = experimento.Scenarios.Create("escenario2"); //IScenario escenario3 = experimento.Scenarios.Create("escenario3"); //escenario creados //TODO cambiar la variable de control por escenario //como se hace? el metodo de controls de cada escenario solo tiene un get //que solo devueleve el valor del control pero no para asignarselo SimioProjectFactory.SaveProject(_simioProject, path, out warnings); MessageBox.Show("Carga realizada"); } catch (Exception ex) { MessageBox.Show(ex.ToString()); } }
public INodeObject getNodeOutput(IIntelligentObject _objcect) { INodeObject node = seekForName("Output@" + _objcect.ObjectName) as INodeObject; return(node); }
private static IIntelligentObject CrearLink(string tipo, INodeObject nodo1, INodeObject nodo2) { return(intelligentObjects.CreateLink(tipo, nodo1, nodo2, null)); }
public INodeObject getMemberIpunt(IIntelligentObject _objcect) { INodeObject node = seekForName("MemberInput@" + _objcect.ObjectName) as INodeObject; return(node); }
public void CreateModel(string finalModelPath) { try { System.IO.File.WriteAllBytes(BASE_MODEL_PATH, FileStore.Resource.BaseModel); ISimioProject project = SimioProjectFactory.LoadProject(BASE_MODEL_PATH, out string[] warnings); IModel model = project.Models[1]; IIntelligentObjects intelligentObjects = model.Facility.IntelligentObjects; Source llegadaClientes = new Source(intelligentObjects, 0, 0); llegadaClientes.UpdateInterarrivalTime("Random.Uniform(1, 2.5)"); llegadaClientes.UpdateName("LlegadaClientes"); llegadaClientes.UpdateEntityType("Cliente"); Server caja = new Server(intelligentObjects, 10, 0); caja.UpdateProcessingTime("Random.Uniform(2/3, 11/6)"); caja.UpdateName("Caja"); Path pathLlegadaCaja = new Path(intelligentObjects, llegadaClientes.GetOutput(), caja.GetInput()); pathLlegadaCaja.UpdateDrawToScale("False"); pathLlegadaCaja.UpdateLogicalLength("20"); Source llegadaBotellas = new Source(intelligentObjects, 10, 15); llegadaBotellas.UpdateName("AlmacenBotella"); llegadaBotellas.UpdateEntityType("Botella"); llegadaBotellas.UpdateArrivalMode("On Event"); INodeObject entradaCaja = (INodeObject)intelligentObjects["EntradaCaja"]; new Path(intelligentObjects, entradaCaja, llegadaBotellas.GetOutput()); Combiner entrega = new Combiner(intelligentObjects, 20, 0); entrega.UpdateName("Entrega"); entrega.GetOutput().Properties["OutboundLinkRule"].Value = "By Link Weight"; Path cajaEntrega = new Path(intelligentObjects, caja.GetOutput(), entrega.GetParentInput()); cajaEntrega.UpdateDrawToScale("False"); cajaEntrega.UpdateLogicalLength("4"); Sink sink = new Sink(intelligentObjects, 60, -5); TimePath pathSalida = new TimePath(intelligentObjects, entrega.GetOutput(), sink.GetInput()); pathSalida.UpdateSelectionWeight("0.48"); pathSalida.UpdateTravelTime("0.3"); TransferNode transferNode = new TransferNode(intelligentObjects, 25, -10); transferNode.UpdateName("IrSalida"); new Path(intelligentObjects, transferNode.GetInput(), sink.GetInput()); CreateServer( intelligentObjects, 50, 40, "0.12", "Random.Triangular(4, 8, 12)", "5", null, "3", "Barra", entrega.GetOutput(), sink.GetInput() ); int i = 1; int x = 50; int y = 35; for (; i < 15; i++) { CreateServer( intelligentObjects, x, y, "0.025", "Random.Triangular(12, 20, 25)", i <= 8 ? "4" : "3", i <= 8 ? "10/60" : "12/60", null, "Mesa_" + i, entrega.GetOutput(), sink.GetInput() ); y -= 5; } SimioProjectFactory.SaveProject(project, finalModelPath, out warnings); System.IO.File.WriteAllLines(WARNINGS_FILE_PATH, warnings); } catch (Exception e) { System.IO.File.WriteAllText(WARNINGS_FILE_PATH, e.Message); } }