From 2825309dc82de50c35f76b7b9e87cd235ad47f4f Mon Sep 17 00:00:00 2001
From: John Hilasaca <89051327+Jaalya@users.noreply.github.com>
Date: Sun, 4 Dec 2022 20:05:07 -0500
Subject: [PATCH] =?UTF-8?q?Primera=20versi=C3=B3n=20estable?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
Form1.Designer.cs | 282 +++++++++++++++++++++++++++----
Form1.cs | 65 ++++++-
FormCostos.Designer.cs | 204 ----------------------
FormCostos.cs | 55 ------
FormCostos.resx | 66 --------
FormPFCM.Designer.cs | 152 +++++++++++++++++
FormPFCM.cs | 17 +-
FormPFCM.resx | 3 -
FormPFCS.Designer.cs | 152 +++++++++++++++++
FormPFCS.cs | 19 ++-
FormPICM.Designer.cs | 152 +++++++++++++++++
FormPICM.cs | 17 +-
FormPICM.resx | 3 -
FormPICS.Designer.cs | 174 +++++++++++--------
FormPICS.cs | 21 ++-
PFCM.cs | 9 +-
PFCS.cs | 9 +-
PICM.cs | 10 +-
PICS.cs | 9 +-
TCTS.csproj | 4 -
modeloColas.cs | 61 +++++++
sources/A resolver.txt | 5 -
sources/ModeloTeoriaColas.drawio | 1 -
validate.cs | 44 ++++-
24 files changed, 1049 insertions(+), 485 deletions(-)
delete mode 100644 FormCostos.Designer.cs
delete mode 100644 FormCostos.cs
delete mode 100644 FormCostos.resx
delete mode 100644 sources/A resolver.txt
delete mode 100644 sources/ModeloTeoriaColas.drawio
diff --git a/Form1.Designer.cs b/Form1.Designer.cs
index bc8e2cd..bb0cbb6 100644
--- a/Form1.Designer.cs
+++ b/Form1.Designer.cs
@@ -37,19 +37,41 @@ private void InitializeComponent()
this.rbtInfinita = new System.Windows.Forms.RadioButton();
this.rbtFinita = new System.Windows.Forms.RadioButton();
this.gbPoblacion = new System.Windows.Forms.GroupBox();
+ this.label5 = new System.Windows.Forms.Label();
this.tbN = new System.Windows.Forms.TextBox();
this.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
- this.label5 = new System.Windows.Forms.Label();
this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);
+ this.label13 = new System.Windows.Forms.Label();
+ this.label12 = new System.Windows.Forms.Label();
+ this.label11 = new System.Windows.Forms.Label();
+ this.label10 = new System.Windows.Forms.Label();
+ this.label6 = new System.Windows.Forms.Label();
+ this.groupBox4 = new System.Windows.Forms.GroupBox();
+ this.tbCS = new System.Windows.Forms.TextBox();
+ this.tbCTSE = new System.Windows.Forms.TextBox();
+ this.tbCTS = new System.Windows.Forms.TextBox();
+ this.tbCTE = new System.Windows.Forms.TextBox();
+ this.groupBox1 = new System.Windows.Forms.GroupBox();
+ this.groupBox2 = new System.Windows.Forms.GroupBox();
+ this.groupBox3 = new System.Windows.Forms.GroupBox();
+ this.groupBox5 = new System.Windows.Forms.GroupBox();
+ this.groupBox6 = new System.Windows.Forms.GroupBox();
+ this.tbTiempo = new System.Windows.Forms.TextBox();
this.gbPoblacion.SuspendLayout();
+ this.groupBox4.SuspendLayout();
+ this.groupBox1.SuspendLayout();
+ this.groupBox2.SuspendLayout();
+ this.groupBox3.SuspendLayout();
+ this.groupBox5.SuspendLayout();
+ this.groupBox6.SuspendLayout();
this.SuspendLayout();
//
// tbServidor
//
- this.tbServidor.Location = new System.Drawing.Point(64, 93);
+ this.tbServidor.Location = new System.Drawing.Point(32, 20);
this.tbServidor.Name = "tbServidor";
this.tbServidor.PlaceholderText = "Servidor";
this.tbServidor.Size = new System.Drawing.Size(100, 22);
@@ -58,16 +80,16 @@ private void InitializeComponent()
//
// tbPoblacion
//
- this.tbPoblacion.Location = new System.Drawing.Point(90, 43);
+ this.tbPoblacion.Location = new System.Drawing.Point(89, 45);
this.tbPoblacion.Name = "tbPoblacion";
this.tbPoblacion.PlaceholderText = "Población";
- this.tbPoblacion.Size = new System.Drawing.Size(62, 22);
+ this.tbPoblacion.Size = new System.Drawing.Size(65, 22);
this.tbPoblacion.TabIndex = 0;
this.tbPoblacion.TextChanged += new System.EventHandler(this.tbPoblacion_TextChanged);
//
// tbLambda
//
- this.tbLambda.Location = new System.Drawing.Point(202, 12);
+ this.tbLambda.Location = new System.Drawing.Point(32, 20);
this.tbLambda.Name = "tbLambda";
this.tbLambda.PlaceholderText = "Lambda";
this.tbLambda.Size = new System.Drawing.Size(100, 22);
@@ -76,7 +98,7 @@ private void InitializeComponent()
//
// tbMiu
//
- this.tbMiu.Location = new System.Drawing.Point(202, 42);
+ this.tbMiu.Location = new System.Drawing.Point(32, 20);
this.tbMiu.Name = "tbMiu";
this.tbMiu.PlaceholderText = "Miu";
this.tbMiu.Size = new System.Drawing.Size(100, 22);
@@ -85,7 +107,7 @@ private void InitializeComponent()
//
// btResolver
//
- this.btResolver.Location = new System.Drawing.Point(121, 121);
+ this.btResolver.Location = new System.Drawing.Point(301, 196);
this.btResolver.Name = "btResolver";
this.btResolver.Size = new System.Drawing.Size(75, 23);
this.btResolver.TabIndex = 4;
@@ -96,7 +118,7 @@ private void InitializeComponent()
// rbtInfinita
//
this.rbtInfinita.AutoSize = true;
- this.rbtInfinita.Location = new System.Drawing.Point(6, 19);
+ this.rbtInfinita.Location = new System.Drawing.Point(12, 20);
this.rbtInfinita.Name = "rbtInfinita";
this.rbtInfinita.Size = new System.Drawing.Size(63, 19);
this.rbtInfinita.TabIndex = 5;
@@ -108,7 +130,7 @@ private void InitializeComponent()
// rbtFinita
//
this.rbtFinita.AutoSize = true;
- this.rbtFinita.Location = new System.Drawing.Point(6, 44);
+ this.rbtFinita.Location = new System.Drawing.Point(12, 45);
this.rbtFinita.Name = "rbtFinita";
this.rbtFinita.Size = new System.Drawing.Size(54, 19);
this.rbtFinita.TabIndex = 6;
@@ -125,14 +147,24 @@ private void InitializeComponent()
this.gbPoblacion.Controls.Add(this.rbtInfinita);
this.gbPoblacion.Location = new System.Drawing.Point(12, 12);
this.gbPoblacion.Name = "gbPoblacion";
- this.gbPoblacion.Size = new System.Drawing.Size(160, 75);
+ this.gbPoblacion.Size = new System.Drawing.Size(160, 82);
this.gbPoblacion.TabIndex = 7;
this.gbPoblacion.TabStop = false;
this.gbPoblacion.Text = "Población";
//
+ // label5
+ //
+ this.label5.AutoSize = true;
+ this.label5.Location = new System.Drawing.Point(65, 49);
+ this.label5.Name = "label5";
+ this.label5.Size = new System.Drawing.Size(18, 15);
+ this.label5.TabIndex = 13;
+ this.label5.Text = "M";
+ this.toolTip1.SetToolTip(this.label5, "■ Población.");
+ //
// tbN
//
- this.tbN.Location = new System.Drawing.Point(202, 72);
+ this.tbN.Location = new System.Drawing.Point(32, 20);
this.tbN.Name = "tbN";
this.tbN.PlaceholderText = "Clientes";
this.tbN.Size = new System.Drawing.Size(100, 22);
@@ -142,7 +174,7 @@ private void InitializeComponent()
// label1
//
this.label1.AutoSize = true;
- this.label1.Location = new System.Drawing.Point(182, 12);
+ this.label1.Location = new System.Drawing.Point(12, 20);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(13, 15);
this.label1.TabIndex = 9;
@@ -152,7 +184,7 @@ private void InitializeComponent()
// label2
//
this.label2.AutoSize = true;
- this.label2.Location = new System.Drawing.Point(182, 42);
+ this.label2.Location = new System.Drawing.Point(12, 20);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(14, 15);
this.label2.TabIndex = 10;
@@ -162,7 +194,7 @@ private void InitializeComponent()
// label3
//
this.label3.AutoSize = true;
- this.label3.Location = new System.Drawing.Point(182, 72);
+ this.label3.Location = new System.Drawing.Point(12, 20);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(14, 15);
this.label3.TabIndex = 11;
@@ -172,44 +204,212 @@ private void InitializeComponent()
// label4
//
this.label4.AutoSize = true;
- this.label4.Location = new System.Drawing.Point(45, 96);
+ this.label4.Location = new System.Drawing.Point(12, 20);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(13, 15);
this.label4.TabIndex = 12;
this.label4.Text = "k";
this.toolTip1.SetToolTip(this.label4, "■ Número de servidores.");
//
- // label5
+ // label13
//
- this.label5.AutoSize = true;
- this.label5.Location = new System.Drawing.Point(66, 46);
- this.label5.Name = "label5";
- this.label5.Size = new System.Drawing.Size(18, 15);
- this.label5.TabIndex = 13;
- this.label5.Text = "M";
- this.toolTip1.SetToolTip(this.label5, "■ Población.");
+ this.label13.AutoSize = true;
+ this.label13.Location = new System.Drawing.Point(12, 120);
+ this.label13.Name = "label13";
+ this.label13.Size = new System.Drawing.Size(20, 15);
+ this.label13.TabIndex = 21;
+ this.label13.Text = "CS";
+ this.toolTip1.SetToolTip(this.label13, "■ Costo unitario por el servidor.\r\n■ Alquiler\r\n■ Salario\r\n■ Funcionamiento");
+ //
+ // label12
+ //
+ this.label12.AutoSize = true;
+ this.label12.Location = new System.Drawing.Point(12, 30);
+ this.label12.Name = "label12";
+ this.label12.Size = new System.Drawing.Size(28, 15);
+ this.label12.TabIndex = 20;
+ this.label12.Text = "CTE";
+ this.toolTip1.SetToolTip(this.label12, "■ Costo unitario por tiempo en cola.\r\n■ Tiempo de espera de los clientes.");
+ //
+ // label11
+ //
+ this.label11.AutoSize = true;
+ this.label11.Location = new System.Drawing.Point(12, 60);
+ this.label11.Name = "label11";
+ this.label11.Size = new System.Drawing.Size(27, 15);
+ this.label11.TabIndex = 19;
+ this.label11.Text = "CTS";
+ this.toolTip1.SetToolTip(this.label11, "■ Costo unitario por tiempo en el sistema.\r\n■ Tiempo en el sistema de los cliente" +
+ "s.\r\n");
+ //
+ // label10
+ //
+ this.label10.AutoSize = true;
+ this.label10.Location = new System.Drawing.Point(12, 90);
+ this.label10.Name = "label10";
+ this.label10.Size = new System.Drawing.Size(33, 15);
+ this.label10.TabIndex = 18;
+ this.label10.Text = "CTSE";
+ this.toolTip1.SetToolTip(this.label10, "■ Costo unitario por tiempo de servicio.\r\n■ Tiempo en el servicio de los clientes" +
+ ".\r\n");
+ //
+ // label6
+ //
+ this.label6.AutoSize = true;
+ this.label6.Location = new System.Drawing.Point(12, 20);
+ this.label6.Name = "label6";
+ this.label6.Size = new System.Drawing.Size(96, 15);
+ this.label6.TabIndex = 12;
+ this.label6.Text = "Horas de trabajo";
+ this.toolTip1.SetToolTip(this.label6, "■ Número de servidores.");
+ //
+ // groupBox4
+ //
+ this.groupBox4.Controls.Add(this.label13);
+ this.groupBox4.Controls.Add(this.label12);
+ this.groupBox4.Controls.Add(this.label11);
+ this.groupBox4.Controls.Add(this.label10);
+ this.groupBox4.Controls.Add(this.tbCS);
+ this.groupBox4.Controls.Add(this.tbCTSE);
+ this.groupBox4.Controls.Add(this.tbCTS);
+ this.groupBox4.Controls.Add(this.tbCTE);
+ this.groupBox4.Location = new System.Drawing.Point(344, 12);
+ this.groupBox4.Name = "groupBox4";
+ this.groupBox4.Size = new System.Drawing.Size(160, 162);
+ this.groupBox4.TabIndex = 23;
+ this.groupBox4.TabStop = false;
+ this.groupBox4.Text = "Costos Unitarios";
+ //
+ // tbCS
+ //
+ this.tbCS.Location = new System.Drawing.Point(47, 120);
+ this.tbCS.Name = "tbCS";
+ this.tbCS.PlaceholderText = "CS";
+ this.tbCS.Size = new System.Drawing.Size(100, 22);
+ this.tbCS.TabIndex = 3;
+ this.tbCS.TextChanged += new System.EventHandler(this.tbCS_TextChanged);
+ //
+ // tbCTSE
+ //
+ this.tbCTSE.Location = new System.Drawing.Point(47, 90);
+ this.tbCTSE.Name = "tbCTSE";
+ this.tbCTSE.PlaceholderText = "CTSE";
+ this.tbCTSE.Size = new System.Drawing.Size(100, 22);
+ this.tbCTSE.TabIndex = 2;
+ this.tbCTSE.TextChanged += new System.EventHandler(this.tbCTSE_TextChanged);
+ //
+ // tbCTS
+ //
+ this.tbCTS.Location = new System.Drawing.Point(47, 60);
+ this.tbCTS.Name = "tbCTS";
+ this.tbCTS.PlaceholderText = "CTS";
+ this.tbCTS.Size = new System.Drawing.Size(100, 22);
+ this.tbCTS.TabIndex = 1;
+ this.tbCTS.TextChanged += new System.EventHandler(this.tbCTS_TextChanged);
+ //
+ // tbCTE
+ //
+ this.tbCTE.Location = new System.Drawing.Point(47, 30);
+ this.tbCTE.Name = "tbCTE";
+ this.tbCTE.PlaceholderText = "CTE";
+ this.tbCTE.Size = new System.Drawing.Size(100, 22);
+ this.tbCTE.TabIndex = 0;
+ this.tbCTE.TextChanged += new System.EventHandler(this.tbCTE_TextChanged);
+ //
+ // groupBox1
+ //
+ this.groupBox1.Controls.Add(this.tbServidor);
+ this.groupBox1.Controls.Add(this.label4);
+ this.groupBox1.Location = new System.Drawing.Point(12, 116);
+ this.groupBox1.Name = "groupBox1";
+ this.groupBox1.Size = new System.Drawing.Size(160, 50);
+ this.groupBox1.TabIndex = 24;
+ this.groupBox1.TabStop = false;
+ this.groupBox1.Text = "Servidores";
+ //
+ // groupBox2
+ //
+ this.groupBox2.Controls.Add(this.tbLambda);
+ this.groupBox2.Controls.Add(this.label1);
+ this.groupBox2.Location = new System.Drawing.Point(178, 12);
+ this.groupBox2.Name = "groupBox2";
+ this.groupBox2.Size = new System.Drawing.Size(160, 50);
+ this.groupBox2.TabIndex = 25;
+ this.groupBox2.TabStop = false;
+ this.groupBox2.Text = "Tasa de llegada";
+ //
+ // groupBox3
+ //
+ this.groupBox3.Controls.Add(this.tbMiu);
+ this.groupBox3.Controls.Add(this.label2);
+ this.groupBox3.Location = new System.Drawing.Point(178, 68);
+ this.groupBox3.Name = "groupBox3";
+ this.groupBox3.Size = new System.Drawing.Size(160, 50);
+ this.groupBox3.TabIndex = 26;
+ this.groupBox3.TabStop = false;
+ this.groupBox3.Text = "Tasa de servicio";
+ //
+ // groupBox5
+ //
+ this.groupBox5.Controls.Add(this.tbN);
+ this.groupBox5.Controls.Add(this.label3);
+ this.groupBox5.Location = new System.Drawing.Point(178, 124);
+ this.groupBox5.Name = "groupBox5";
+ this.groupBox5.Size = new System.Drawing.Size(160, 50);
+ this.groupBox5.TabIndex = 27;
+ this.groupBox5.TabStop = false;
+ this.groupBox5.Text = "Clientes";
+ //
+ // groupBox6
+ //
+ this.groupBox6.Controls.Add(this.tbTiempo);
+ this.groupBox6.Controls.Add(this.label6);
+ this.groupBox6.Location = new System.Drawing.Point(12, 180);
+ this.groupBox6.Name = "groupBox6";
+ this.groupBox6.Size = new System.Drawing.Size(260, 50);
+ this.groupBox6.TabIndex = 28;
+ this.groupBox6.TabStop = false;
+ this.groupBox6.Text = "Día laborable";
+ //
+ // tbTiempo
+ //
+ this.tbTiempo.Location = new System.Drawing.Point(114, 17);
+ this.tbTiempo.Name = "tbTiempo";
+ this.tbTiempo.PlaceholderText = "Tiempo de trabajo";
+ this.tbTiempo.Size = new System.Drawing.Size(108, 22);
+ this.tbTiempo.TabIndex = 3;
+ this.tbTiempo.TextChanged += new System.EventHandler(this.tbTiempo_TextChanged);
//
// Form1
//
- this.ClientSize = new System.Drawing.Size(318, 159);
- this.Controls.Add(this.label4);
- this.Controls.Add(this.label3);
- this.Controls.Add(this.label2);
- this.Controls.Add(this.label1);
- this.Controls.Add(this.tbN);
+ this.ClientSize = new System.Drawing.Size(516, 287);
+ this.Controls.Add(this.groupBox6);
+ this.Controls.Add(this.groupBox5);
+ this.Controls.Add(this.groupBox3);
+ this.Controls.Add(this.groupBox2);
+ this.Controls.Add(this.groupBox1);
+ this.Controls.Add(this.groupBox4);
this.Controls.Add(this.gbPoblacion);
this.Controls.Add(this.btResolver);
- this.Controls.Add(this.tbServidor);
- this.Controls.Add(this.tbMiu);
- this.Controls.Add(this.tbLambda);
this.Font = new System.Drawing.Font("Maiandra GD", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
this.Name = "Form1";
this.Text = "Teoría de Colas";
this.Load += new System.EventHandler(this.Form1_Load);
this.gbPoblacion.ResumeLayout(false);
this.gbPoblacion.PerformLayout();
+ this.groupBox4.ResumeLayout(false);
+ this.groupBox4.PerformLayout();
+ this.groupBox1.ResumeLayout(false);
+ this.groupBox1.PerformLayout();
+ this.groupBox2.ResumeLayout(false);
+ this.groupBox2.PerformLayout();
+ this.groupBox3.ResumeLayout(false);
+ this.groupBox3.PerformLayout();
+ this.groupBox5.ResumeLayout(false);
+ this.groupBox5.PerformLayout();
+ this.groupBox6.ResumeLayout(false);
+ this.groupBox6.PerformLayout();
this.ResumeLayout(false);
- this.PerformLayout();
}
@@ -229,5 +429,21 @@ private void InitializeComponent()
private Label label3;
private Label label4;
private ToolTip toolTip1;
+ private GroupBox groupBox4;
+ private Label label13;
+ private Label label12;
+ private Label label11;
+ private Label label10;
+ private TextBox tbCS;
+ private TextBox tbCTSE;
+ private TextBox tbCTS;
+ private TextBox tbCTE;
+ private GroupBox groupBox1;
+ private GroupBox groupBox2;
+ private GroupBox groupBox3;
+ private GroupBox groupBox5;
+ private GroupBox groupBox6;
+ private TextBox tbTiempo;
+ private Label label6;
}
}
\ No newline at end of file
diff --git a/Form1.cs b/Form1.cs
index 6ed30e6..7ceace8 100644
--- a/Form1.cs
+++ b/Form1.cs
@@ -8,6 +8,7 @@ public Form1()
InitializeComponent();
tbPoblacion.Enabled = false;
}
+ //TODO agregar horas de trabajo
Validate validate;
private bool condicionPoblacion = false;//infinita
private bool condicionServidor = false;//1
@@ -18,9 +19,8 @@ private void btResolver_Click(object sender, EventArgs e)
if (tbServidor.Text != "1")
condicionServidor = true; else condicionServidor = false;
validate = new Validate(tbLambda.Text,
- tbMiu.Text,
- tbServidor.Text,
- tbN.Text, tbPoblacion.Text);
+ tbMiu.Text,tbServidor.Text,tbN.Text, tbPoblacion.Text,
+ tbCTE.Text, tbCTS.Text, tbCTSE.Text, tbCS.Text, tbTiempo.Text);
if(condicionPoblacion == false && condicionServidor == false)
{
@@ -35,8 +35,12 @@ private void btResolver_Click(object sender, EventArgs e)
else
{
FormPICS ventana = new FormPICS(validate.Lambda(),
- validate.Miu(), validate.K(), validate.N());
+ validate.Miu(), validate.K(), validate.N(),
+ validate.Cte(), validate.Cts(), validate.Ctse(),
+ validate.Cs(), validate.Time());
+ //FormCostos ventanaCostos = new FormCostos();
ventana.Show();
+ //ventanaCostos.Show();
}
}
@@ -53,8 +57,11 @@ private void btResolver_Click(object sender, EventArgs e)
}
else
{
+ //double cte, double cts, double ctse, double cs
FormPICM ventana = new FormPICM(validate.Lambda(),
- validate.Miu(), validate.K(), validate.N());
+ validate.Miu(), validate.K(), validate.N(),
+ validate.Cte(), validate.Cts(), validate.Ctse(),
+ validate.Cs(),validate.Time());
ventana.Show();
}
@@ -62,13 +69,17 @@ private void btResolver_Click(object sender, EventArgs e)
if (condicionPoblacion == true && condicionServidor == false)
{
FormPFCS ventana = new FormPFCS(validate.Lambda(),
- validate.Miu(),validate.K(),validate.N(),validate.M());
+ validate.Miu(),validate.K(),validate.N(),validate.M(),
+ validate.Cte(), validate.Cts(), validate.Ctse(),
+ validate.Cs(), validate.Time());
ventana.Show();
}
if(condicionPoblacion == true && condicionServidor == true)
{
FormPFCM ventana = new FormPFCM(validate.Lambda(),
- validate.Miu(),validate.K(),validate.N(),validate.M());
+ validate.Miu(),validate.K(),validate.N(),validate.M(),
+ validate.Cte(), validate.Cts(), validate.Ctse(),
+ validate.Cs(), validate.Time());
ventana.Show();
}
}
@@ -137,6 +148,46 @@ private void tbN_TextChanged(object sender, EventArgs e)
tbN.Clear();
}
}
+ private void tbCTE_TextChanged(object sender, EventArgs e)
+ {
+ //es un n�mero decimal, no entero
+ if (!Regex.IsMatch(tbCTE.Text, "^[0-9]+([,])?([0-9]+)?$"))
+ {
+ tbCTE.Clear();
+ }
+ }
+ private void tbCTS_TextChanged(object sender, EventArgs e)
+ {
+ //es un n�mero decimal, no entero
+ if (!Regex.IsMatch(tbCTS.Text, "^[0-9]+([,])?([0-9]+)?$"))
+ {
+ tbCTS.Clear();
+ }
+ }
+ private void tbCTSE_TextChanged(object sender, EventArgs e)
+ {
+ //es un n�mero decimal, no entero
+ if (!Regex.IsMatch(tbCTSE.Text, "^[0-9]+([,])?([0-9]+)?$"))
+ {
+ tbCTSE.Clear();
+ }
+ }
+ private void tbCS_TextChanged(object sender, EventArgs e)
+ {
+ //es un n�mero decimal, no entero
+ if (!Regex.IsMatch(tbCS.Text, "^[0-9]+([,])?([0-9]+)?$"))
+ {
+ tbCS.Clear();
+ }
+ }
+ private void tbTiempo_TextChanged(object sender, EventArgs e)
+ {
+ //es un n�mero decimal, no entero
+ if (!Regex.IsMatch(tbTiempo.Text, "^[0-9]+([,])?([0-9]+)?$"))
+ {
+ tbTiempo.Clear();
+ }
+ }
#endregion
diff --git a/FormCostos.Designer.cs b/FormCostos.Designer.cs
deleted file mode 100644
index df68a1e..0000000
--- a/FormCostos.Designer.cs
+++ /dev/null
@@ -1,204 +0,0 @@
-namespace TCTS
-{
- partial class FormCostos
- {
- ///
- /// Required designer variable.
- ///
- private System.ComponentModel.IContainer components = null;
-
- ///
- /// Clean up any resources being used.
- ///
- /// true if managed resources should be disposed; otherwise, false.
- protected override void Dispose(bool disposing)
- {
- if (disposing && (components != null))
- {
- components.Dispose();
- }
- base.Dispose(disposing);
- }
-
- #region Windows Form Designer generated code
-
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- this.components = new System.ComponentModel.Container();
- this.label1 = new System.Windows.Forms.Label();
- this.label2 = new System.Windows.Forms.Label();
- this.label3 = new System.Windows.Forms.Label();
- this.label4 = new System.Windows.Forms.Label();
- this.label5 = new System.Windows.Forms.Label();
- this.groupBox1 = new System.Windows.Forms.GroupBox();
- this.tbCT = new System.Windows.Forms.TextBox();
- this.tbCTS = new System.Windows.Forms.TextBox();
- this.tbCTTSE = new System.Windows.Forms.TextBox();
- this.tbCTTS = new System.Windows.Forms.TextBox();
- this.tbCTTE = new System.Windows.Forms.TextBox();
- this.label6 = new System.Windows.Forms.Label();
- this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);
- this.groupBox1.SuspendLayout();
- this.SuspendLayout();
- //
- // label1
- //
- this.label1.AutoSize = true;
- this.label1.Location = new System.Drawing.Point(12, 30);
- this.label1.Name = "label1";
- this.label1.Size = new System.Drawing.Size(35, 15);
- this.label1.TabIndex = 0;
- this.label1.Text = "CTTE";
- this.toolTip1.SetToolTip(this.label1, "■ Costo diario por el tiempo de espera en cola.");
- //
- // label2
- //
- this.label2.AutoSize = true;
- this.label2.Location = new System.Drawing.Point(12, 60);
- this.label2.Name = "label2";
- this.label2.Size = new System.Drawing.Size(34, 15);
- this.label2.TabIndex = 1;
- this.label2.Text = "CTTS";
- this.toolTip1.SetToolTip(this.label2, "■ Costo diario por el tiempo en el sistema.");
- //
- // label3
- //
- this.label3.AutoSize = true;
- this.label3.Location = new System.Drawing.Point(12, 90);
- this.label3.Name = "label3";
- this.label3.Size = new System.Drawing.Size(40, 15);
- this.label3.TabIndex = 2;
- this.label3.Text = "CTTSE";
- this.toolTip1.SetToolTip(this.label3, "■ Costo diario por el tiempo de servicio.");
- //
- // label4
- //
- this.label4.AutoSize = true;
- this.label4.Location = new System.Drawing.Point(12, 120);
- this.label4.Name = "label4";
- this.label4.Size = new System.Drawing.Size(27, 15);
- this.label4.TabIndex = 3;
- this.label4.Text = "CTS";
- this.toolTip1.SetToolTip(this.label4, "■ Costo diario del servidor.");
- //
- // label5
- //
- this.label5.AutoSize = true;
- this.label5.Location = new System.Drawing.Point(12, 160);
- this.label5.Name = "label5";
- this.label5.Size = new System.Drawing.Size(22, 15);
- this.label5.TabIndex = 4;
- this.label5.Text = "CT";
- this.toolTip1.SetToolTip(this.label5, "■ Costo total diario del sistema.");
- //
- // groupBox1
- //
- this.groupBox1.Controls.Add(this.tbCT);
- this.groupBox1.Controls.Add(this.tbCTS);
- this.groupBox1.Controls.Add(this.tbCTTSE);
- this.groupBox1.Controls.Add(this.tbCTTS);
- this.groupBox1.Controls.Add(this.tbCTTE);
- this.groupBox1.Controls.Add(this.label1);
- this.groupBox1.Controls.Add(this.label5);
- this.groupBox1.Controls.Add(this.label2);
- this.groupBox1.Controls.Add(this.label4);
- this.groupBox1.Controls.Add(this.label3);
- this.groupBox1.Controls.Add(this.label6);
- this.groupBox1.Location = new System.Drawing.Point(12, 12);
- this.groupBox1.Name = "groupBox1";
- this.groupBox1.Size = new System.Drawing.Size(200, 200);
- this.groupBox1.TabIndex = 5;
- this.groupBox1.TabStop = false;
- this.groupBox1.Text = "Costos Totales";
- //
- // tbCT
- //
- this.tbCT.Location = new System.Drawing.Point(60, 160);
- this.tbCT.Name = "tbCT";
- this.tbCT.PlaceholderText = "CT";
- this.tbCT.ReadOnly = true;
- this.tbCT.Size = new System.Drawing.Size(100, 22);
- this.tbCT.TabIndex = 10;
- //
- // tbCTS
- //
- this.tbCTS.Location = new System.Drawing.Point(60, 120);
- this.tbCTS.Name = "tbCTS";
- this.tbCTS.PlaceholderText = "CTS";
- this.tbCTS.ReadOnly = true;
- this.tbCTS.Size = new System.Drawing.Size(100, 22);
- this.tbCTS.TabIndex = 9;
- //
- // tbCTTSE
- //
- this.tbCTTSE.Location = new System.Drawing.Point(60, 90);
- this.tbCTTSE.Name = "tbCTTSE";
- this.tbCTTSE.PlaceholderText = "CTTSE";
- this.tbCTTSE.ReadOnly = true;
- this.tbCTTSE.Size = new System.Drawing.Size(100, 22);
- this.tbCTTSE.TabIndex = 8;
- //
- // tbCTTS
- //
- this.tbCTTS.Location = new System.Drawing.Point(60, 60);
- this.tbCTTS.Name = "tbCTTS";
- this.tbCTTS.PlaceholderText = "CTTS";
- this.tbCTTS.ReadOnly = true;
- this.tbCTTS.Size = new System.Drawing.Size(100, 22);
- this.tbCTTS.TabIndex = 8;
- //
- // tbCTTE
- //
- this.tbCTTE.Location = new System.Drawing.Point(60, 30);
- this.tbCTTE.Name = "tbCTTE";
- this.tbCTTE.PlaceholderText = "CTTE";
- this.tbCTTE.ReadOnly = true;
- this.tbCTTE.Size = new System.Drawing.Size(100, 22);
- this.tbCTTE.TabIndex = 7;
- //
- // label6
- //
- this.label6.AutoSize = true;
- this.label6.Location = new System.Drawing.Point(12, 140);
- this.label6.Name = "label6";
- this.label6.Size = new System.Drawing.Size(167, 15);
- this.label6.TabIndex = 6;
- this.label6.Text = "----------------------------------------";
- //
- // FormCostos
- //
- this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
- this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
- this.ClientSize = new System.Drawing.Size(226, 231);
- this.Controls.Add(this.groupBox1);
- this.Font = new System.Drawing.Font("Maiandra GD", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
- this.Name = "FormCostos";
- this.Text = "Costos";
- this.Load += new System.EventHandler(this.FormCostos_Load);
- this.groupBox1.ResumeLayout(false);
- this.groupBox1.PerformLayout();
- this.ResumeLayout(false);
-
- }
-
- #endregion
-
- private Label label1;
- private Label label2;
- private Label label3;
- private Label label4;
- private Label label5;
- private GroupBox groupBox1;
- private ToolTip toolTip1;
- private TextBox tbCT;
- private TextBox tbCTS;
- private TextBox tbCTTSE;
- private TextBox tbCTTS;
- private TextBox tbCTTE;
- private Label label6;
- }
-}
\ No newline at end of file
diff --git a/FormCostos.cs b/FormCostos.cs
deleted file mode 100644
index b1f028f..0000000
--- a/FormCostos.cs
+++ /dev/null
@@ -1,55 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Data;
-using System.Drawing;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using System.Windows.Forms;
-
-namespace TCTS
-{
- public partial class FormCostos : Form
- {
- double cte;
- double cts;
- double ctse;
- double cs;
- double lambda;
- double miu;
- double wq;
- double w;
- double t;
- double k;
- public FormCostos(double cte, double cts, double ctse, double cs,
- double lambda, double miu, double wq, double w,double k, double t)
- {
- InitializeComponent();
- this.cte = cte;
- this.cts = cts;
- this.ctse = ctse;
- this.cs = cs;
- this.lambda = lambda;
- this.miu = miu;
- this.wq = wq;
- this.w = w;
- this.t = t;
- this.k = k;
- }
- //TODO colocar gets para facilitar las cosas, por el calculo del 0
- //TODO convertir strings en constructor??
- private void FormCostos_Load(object sender, EventArgs e)
- {
- tbCTTE.Text = (lambda * t * wq * cte).ToString();
- tbCTTS.Text = (lambda * t * w * cts).ToString();
- tbCTTSE.Text = (lambda * t * (1/miu) * ctse).ToString();
- tbCTS.Text = (k * cs).ToString();
-
- tbCT.Text = (double.Parse(tbCTTE.Text) +
- double.Parse(tbCTTS.Text) +
- double.Parse(tbCTTSE.Text) +
- double.Parse(tbCTS.Text)).ToString();
- }
- }
-}
diff --git a/FormCostos.resx b/FormCostos.resx
deleted file mode 100644
index 0ccd1ea..0000000
--- a/FormCostos.resx
+++ /dev/null
@@ -1,66 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- text/microsoft-resx
-
-
- 2.0
-
-
- System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- 17, 17
-
-
- 17, 17
-
-
\ No newline at end of file
diff --git a/FormPFCM.Designer.cs b/FormPFCM.Designer.cs
index 8f32f7e..ab242e9 100644
--- a/FormPFCM.Designer.cs
+++ b/FormPFCM.Designer.cs
@@ -53,9 +53,22 @@ private void InitializeComponent()
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.groupBox3 = new System.Windows.Forms.GroupBox();
this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);
+ this.groupBox4 = new System.Windows.Forms.GroupBox();
+ this.tbCT = new System.Windows.Forms.TextBox();
+ this.tbCTS = new System.Windows.Forms.TextBox();
+ this.tbCTTSE = new System.Windows.Forms.TextBox();
+ this.tbCTTS = new System.Windows.Forms.TextBox();
+ this.tbCTTE = new System.Windows.Forms.TextBox();
+ this.label11 = new System.Windows.Forms.Label();
+ this.label12 = new System.Windows.Forms.Label();
+ this.label13 = new System.Windows.Forms.Label();
+ this.label14 = new System.Windows.Forms.Label();
+ this.label15 = new System.Windows.Forms.Label();
+ this.label16 = new System.Windows.Forms.Label();
this.groupBox1.SuspendLayout();
this.groupBox2.SuspendLayout();
this.groupBox3.SuspendLayout();
+ this.groupBox4.SuspendLayout();
this.SuspendLayout();
//
// label9
@@ -299,11 +312,136 @@ private void InitializeComponent()
this.groupBox3.TabStop = false;
this.groupBox3.Text = "Tiempo esperado";
//
+ // groupBox4
+ //
+ this.groupBox4.Controls.Add(this.tbCT);
+ this.groupBox4.Controls.Add(this.tbCTS);
+ this.groupBox4.Controls.Add(this.tbCTTSE);
+ this.groupBox4.Controls.Add(this.tbCTTS);
+ this.groupBox4.Controls.Add(this.tbCTTE);
+ this.groupBox4.Controls.Add(this.label11);
+ this.groupBox4.Controls.Add(this.label12);
+ this.groupBox4.Controls.Add(this.label13);
+ this.groupBox4.Controls.Add(this.label14);
+ this.groupBox4.Controls.Add(this.label15);
+ this.groupBox4.Controls.Add(this.label16);
+ this.groupBox4.Location = new System.Drawing.Point(344, 12);
+ this.groupBox4.Name = "groupBox4";
+ this.groupBox4.Size = new System.Drawing.Size(200, 200);
+ this.groupBox4.TabIndex = 37;
+ this.groupBox4.TabStop = false;
+ this.groupBox4.Text = "Costos Totales";
+ //
+ // tbCT
+ //
+ this.tbCT.Location = new System.Drawing.Point(60, 160);
+ this.tbCT.Name = "tbCT";
+ this.tbCT.PlaceholderText = "CT";
+ this.tbCT.ReadOnly = true;
+ this.tbCT.Size = new System.Drawing.Size(100, 23);
+ this.tbCT.TabIndex = 10;
+ //
+ // tbCTS
+ //
+ this.tbCTS.Location = new System.Drawing.Point(60, 120);
+ this.tbCTS.Name = "tbCTS";
+ this.tbCTS.PlaceholderText = "CTS";
+ this.tbCTS.ReadOnly = true;
+ this.tbCTS.Size = new System.Drawing.Size(100, 23);
+ this.tbCTS.TabIndex = 9;
+ //
+ // tbCTTSE
+ //
+ this.tbCTTSE.Location = new System.Drawing.Point(60, 90);
+ this.tbCTTSE.Name = "tbCTTSE";
+ this.tbCTTSE.PlaceholderText = "CTTSE";
+ this.tbCTTSE.ReadOnly = true;
+ this.tbCTTSE.Size = new System.Drawing.Size(100, 23);
+ this.tbCTTSE.TabIndex = 8;
+ //
+ // tbCTTS
+ //
+ this.tbCTTS.Location = new System.Drawing.Point(60, 60);
+ this.tbCTTS.Name = "tbCTTS";
+ this.tbCTTS.PlaceholderText = "CTTS";
+ this.tbCTTS.ReadOnly = true;
+ this.tbCTTS.Size = new System.Drawing.Size(100, 23);
+ this.tbCTTS.TabIndex = 8;
+ //
+ // tbCTTE
+ //
+ this.tbCTTE.Location = new System.Drawing.Point(60, 30);
+ this.tbCTTE.Name = "tbCTTE";
+ this.tbCTTE.PlaceholderText = "CTTE";
+ this.tbCTTE.ReadOnly = true;
+ this.tbCTTE.Size = new System.Drawing.Size(100, 23);
+ this.tbCTTE.TabIndex = 7;
+ //
+ // label11
+ //
+ this.label11.AutoSize = true;
+ this.label11.Location = new System.Drawing.Point(12, 30);
+ this.label11.Name = "label11";
+ this.label11.Size = new System.Drawing.Size(33, 15);
+ this.label11.TabIndex = 0;
+ this.label11.Text = "CTTE";
+ this.toolTip1.SetToolTip(this.label11, "■ Costo diario por el tiempo de espera en cola.");
+ //
+ // label12
+ //
+ this.label12.AutoSize = true;
+ this.label12.Location = new System.Drawing.Point(12, 160);
+ this.label12.Name = "label12";
+ this.label12.Size = new System.Drawing.Size(21, 15);
+ this.label12.TabIndex = 4;
+ this.label12.Text = "CT";
+ this.toolTip1.SetToolTip(this.label12, "■ Costo total diario del sistema.");
+ //
+ // label13
+ //
+ this.label13.AutoSize = true;
+ this.label13.Location = new System.Drawing.Point(12, 60);
+ this.label13.Name = "label13";
+ this.label13.Size = new System.Drawing.Size(33, 15);
+ this.label13.TabIndex = 1;
+ this.label13.Text = "CTTS";
+ this.toolTip1.SetToolTip(this.label13, "■ Costo diario por el tiempo en el sistema.");
+ //
+ // label14
+ //
+ this.label14.AutoSize = true;
+ this.label14.Location = new System.Drawing.Point(12, 120);
+ this.label14.Name = "label14";
+ this.label14.Size = new System.Drawing.Size(27, 15);
+ this.label14.TabIndex = 3;
+ this.label14.Text = "CTS";
+ this.toolTip1.SetToolTip(this.label14, "■ Costo diario del servidor.");
+ //
+ // label15
+ //
+ this.label15.AutoSize = true;
+ this.label15.Location = new System.Drawing.Point(12, 90);
+ this.label15.Name = "label15";
+ this.label15.Size = new System.Drawing.Size(39, 15);
+ this.label15.TabIndex = 2;
+ this.label15.Text = "CTTSE";
+ this.toolTip1.SetToolTip(this.label15, "■ Costo diario por el tiempo de servicio.");
+ //
+ // label16
+ //
+ this.label16.AutoSize = true;
+ this.label16.Location = new System.Drawing.Point(12, 140);
+ this.label16.Name = "label16";
+ this.label16.Size = new System.Drawing.Size(207, 15);
+ this.label16.TabIndex = 6;
+ this.label16.Text = "----------------------------------------";
+ //
// FormPFCM
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(629, 291);
+ this.Controls.Add(this.groupBox4);
this.Controls.Add(this.groupBox3);
this.Controls.Add(this.groupBox2);
this.Controls.Add(this.groupBox1);
@@ -316,6 +454,8 @@ private void InitializeComponent()
this.groupBox2.PerformLayout();
this.groupBox3.ResumeLayout(false);
this.groupBox3.PerformLayout();
+ this.groupBox4.ResumeLayout(false);
+ this.groupBox4.PerformLayout();
this.ResumeLayout(false);
}
@@ -346,5 +486,17 @@ private void InitializeComponent()
private TextBox tbPNe;
private Label label1;
private ToolTip toolTip1;
+ private GroupBox groupBox4;
+ private TextBox tbCT;
+ private TextBox tbCTS;
+ private TextBox tbCTTSE;
+ private TextBox tbCTTS;
+ private TextBox tbCTTE;
+ private Label label11;
+ private Label label12;
+ private Label label13;
+ private Label label14;
+ private Label label15;
+ private Label label16;
}
}
\ No newline at end of file
diff --git a/FormPFCM.cs b/FormPFCM.cs
index 64d8c56..2f8256a 100644
--- a/FormPFCM.cs
+++ b/FormPFCM.cs
@@ -14,11 +14,12 @@ public partial class FormPFCM : Form
{
PFCM pfcm;
int n;
- public FormPFCM(double lambda, double miu, int k, int n, int m)
+ public FormPFCM(double lambda, double miu, int k, int n, int m,
+ double cte, double cts, double ctse, double cs, double tiempo)
{
InitializeComponent();
this.n = n;
- pfcm = new PFCM(lambda, miu, k, n, m);
+ pfcm = new PFCM(lambda, miu, k, n, m,cte,cts,ctse,cs, tiempo);
}
private void FormPFCM_Load(object sender, EventArgs e)
{
@@ -36,9 +37,15 @@ private void FormPFCM_Load(object sender, EventArgs e)
tbLq.Text = pfcm.Lq.ToString("N2");
tbLn.Text = pfcm.Ln.ToString("N2");
- tbW.Text = pfcm.W.ToString("N2");
- tbWq.Text = pfcm.Wq.ToString("N2");
- tbWn.Text = pfcm.Wn.ToString("N2");
+ tbW.Text = pfcm.W.ToString("N3");
+ tbWq.Text = pfcm.Wq.ToString("N3");
+ tbWn.Text = pfcm.Wn.ToString("N3");
+
+ tbCTTE.Text = pfcm.Ctte.ToString("N2");
+ tbCTTS.Text = pfcm.Ctts.ToString("N2");
+ tbCTTSE.Text = pfcm.Cttse.ToString("N2");
+ tbCTS.Text = pfcm.Cts.ToString("N2");
+ tbCT.Text = pfcm.Ct.ToString("N2");
}
}
}
diff --git a/FormPFCM.resx b/FormPFCM.resx
index 0ccd1ea..57523cc 100644
--- a/FormPFCM.resx
+++ b/FormPFCM.resx
@@ -60,7 +60,4 @@
17, 17
-
- 17, 17
-
\ No newline at end of file
diff --git a/FormPFCS.Designer.cs b/FormPFCS.Designer.cs
index 61e49a5..f0167b9 100644
--- a/FormPFCS.Designer.cs
+++ b/FormPFCS.Designer.cs
@@ -51,9 +51,22 @@ private void InitializeComponent()
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.groupBox3 = new System.Windows.Forms.GroupBox();
this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);
+ this.groupBox4 = new System.Windows.Forms.GroupBox();
+ this.tbCT = new System.Windows.Forms.TextBox();
+ this.tbCTS = new System.Windows.Forms.TextBox();
+ this.tbCTTSE = new System.Windows.Forms.TextBox();
+ this.tbCTTS = new System.Windows.Forms.TextBox();
+ this.tbCTTE = new System.Windows.Forms.TextBox();
+ this.label10 = new System.Windows.Forms.Label();
+ this.label11 = new System.Windows.Forms.Label();
+ this.label12 = new System.Windows.Forms.Label();
+ this.label13 = new System.Windows.Forms.Label();
+ this.label14 = new System.Windows.Forms.Label();
+ this.label15 = new System.Windows.Forms.Label();
this.groupBox1.SuspendLayout();
this.groupBox2.SuspendLayout();
this.groupBox3.SuspendLayout();
+ this.groupBox4.SuspendLayout();
this.SuspendLayout();
//
// label9
@@ -275,11 +288,136 @@ private void InitializeComponent()
this.groupBox3.TabStop = false;
this.groupBox3.Text = "Tiempo esperado";
//
+ // groupBox4
+ //
+ this.groupBox4.Controls.Add(this.tbCT);
+ this.groupBox4.Controls.Add(this.tbCTS);
+ this.groupBox4.Controls.Add(this.tbCTTSE);
+ this.groupBox4.Controls.Add(this.tbCTTS);
+ this.groupBox4.Controls.Add(this.tbCTTE);
+ this.groupBox4.Controls.Add(this.label10);
+ this.groupBox4.Controls.Add(this.label11);
+ this.groupBox4.Controls.Add(this.label12);
+ this.groupBox4.Controls.Add(this.label13);
+ this.groupBox4.Controls.Add(this.label14);
+ this.groupBox4.Controls.Add(this.label15);
+ this.groupBox4.Location = new System.Drawing.Point(344, 12);
+ this.groupBox4.Name = "groupBox4";
+ this.groupBox4.Size = new System.Drawing.Size(200, 200);
+ this.groupBox4.TabIndex = 37;
+ this.groupBox4.TabStop = false;
+ this.groupBox4.Text = "Costos Totales";
+ //
+ // tbCT
+ //
+ this.tbCT.Location = new System.Drawing.Point(60, 160);
+ this.tbCT.Name = "tbCT";
+ this.tbCT.PlaceholderText = "CT";
+ this.tbCT.ReadOnly = true;
+ this.tbCT.Size = new System.Drawing.Size(100, 23);
+ this.tbCT.TabIndex = 10;
+ //
+ // tbCTS
+ //
+ this.tbCTS.Location = new System.Drawing.Point(60, 120);
+ this.tbCTS.Name = "tbCTS";
+ this.tbCTS.PlaceholderText = "CTS";
+ this.tbCTS.ReadOnly = true;
+ this.tbCTS.Size = new System.Drawing.Size(100, 23);
+ this.tbCTS.TabIndex = 9;
+ //
+ // tbCTTSE
+ //
+ this.tbCTTSE.Location = new System.Drawing.Point(60, 90);
+ this.tbCTTSE.Name = "tbCTTSE";
+ this.tbCTTSE.PlaceholderText = "CTTSE";
+ this.tbCTTSE.ReadOnly = true;
+ this.tbCTTSE.Size = new System.Drawing.Size(100, 23);
+ this.tbCTTSE.TabIndex = 8;
+ //
+ // tbCTTS
+ //
+ this.tbCTTS.Location = new System.Drawing.Point(60, 60);
+ this.tbCTTS.Name = "tbCTTS";
+ this.tbCTTS.PlaceholderText = "CTTS";
+ this.tbCTTS.ReadOnly = true;
+ this.tbCTTS.Size = new System.Drawing.Size(100, 23);
+ this.tbCTTS.TabIndex = 8;
+ //
+ // tbCTTE
+ //
+ this.tbCTTE.Location = new System.Drawing.Point(60, 30);
+ this.tbCTTE.Name = "tbCTTE";
+ this.tbCTTE.PlaceholderText = "CTTE";
+ this.tbCTTE.ReadOnly = true;
+ this.tbCTTE.Size = new System.Drawing.Size(100, 23);
+ this.tbCTTE.TabIndex = 7;
+ //
+ // label10
+ //
+ this.label10.AutoSize = true;
+ this.label10.Location = new System.Drawing.Point(12, 30);
+ this.label10.Name = "label10";
+ this.label10.Size = new System.Drawing.Size(33, 15);
+ this.label10.TabIndex = 0;
+ this.label10.Text = "CTTE";
+ this.toolTip1.SetToolTip(this.label10, "■ Costo diario por el tiempo de espera en cola.");
+ //
+ // label11
+ //
+ this.label11.AutoSize = true;
+ this.label11.Location = new System.Drawing.Point(12, 160);
+ this.label11.Name = "label11";
+ this.label11.Size = new System.Drawing.Size(21, 15);
+ this.label11.TabIndex = 4;
+ this.label11.Text = "CT";
+ this.toolTip1.SetToolTip(this.label11, "■ Costo total diario del sistema.");
+ //
+ // label12
+ //
+ this.label12.AutoSize = true;
+ this.label12.Location = new System.Drawing.Point(12, 60);
+ this.label12.Name = "label12";
+ this.label12.Size = new System.Drawing.Size(33, 15);
+ this.label12.TabIndex = 1;
+ this.label12.Text = "CTTS";
+ this.toolTip1.SetToolTip(this.label12, "■ Costo diario por el tiempo en el sistema.");
+ //
+ // label13
+ //
+ this.label13.AutoSize = true;
+ this.label13.Location = new System.Drawing.Point(12, 120);
+ this.label13.Name = "label13";
+ this.label13.Size = new System.Drawing.Size(27, 15);
+ this.label13.TabIndex = 3;
+ this.label13.Text = "CTS";
+ this.toolTip1.SetToolTip(this.label13, "■ Costo diario del servidor.");
+ //
+ // label14
+ //
+ this.label14.AutoSize = true;
+ this.label14.Location = new System.Drawing.Point(12, 90);
+ this.label14.Name = "label14";
+ this.label14.Size = new System.Drawing.Size(39, 15);
+ this.label14.TabIndex = 2;
+ this.label14.Text = "CTTSE";
+ this.toolTip1.SetToolTip(this.label14, "■ Costo diario por el tiempo de servicio.");
+ //
+ // label15
+ //
+ this.label15.AutoSize = true;
+ this.label15.Location = new System.Drawing.Point(12, 140);
+ this.label15.Name = "label15";
+ this.label15.Size = new System.Drawing.Size(207, 15);
+ this.label15.TabIndex = 6;
+ this.label15.Text = "----------------------------------------";
+ //
// FormPFCS
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(618, 291);
+ this.Controls.Add(this.groupBox4);
this.Controls.Add(this.groupBox3);
this.Controls.Add(this.groupBox2);
this.Controls.Add(this.groupBox1);
@@ -292,6 +430,8 @@ private void InitializeComponent()
this.groupBox2.PerformLayout();
this.groupBox3.ResumeLayout(false);
this.groupBox3.PerformLayout();
+ this.groupBox4.ResumeLayout(false);
+ this.groupBox4.PerformLayout();
this.ResumeLayout(false);
}
@@ -320,5 +460,17 @@ private void InitializeComponent()
private TextBox tbPe;
private Label label1;
private ToolTip toolTip1;
+ private GroupBox groupBox4;
+ private TextBox tbCT;
+ private TextBox tbCTS;
+ private TextBox tbCTTSE;
+ private TextBox tbCTTS;
+ private TextBox tbCTTE;
+ private Label label10;
+ private Label label11;
+ private Label label12;
+ private Label label13;
+ private Label label14;
+ private Label label15;
}
}
\ No newline at end of file
diff --git a/FormPFCS.cs b/FormPFCS.cs
index 9776f7d..fd73fbd 100644
--- a/FormPFCS.cs
+++ b/FormPFCS.cs
@@ -14,11 +14,12 @@ public partial class FormPFCS : Form
{
PFCS pfcs;
int n;
- public FormPFCS(double lambda, double miu, int k, int n, int m)
+ public FormPFCS(double lambda, double miu, int k, int n, int m,
+ double cte, double cts, double ctse, double cs, double tiempo)
{
InitializeComponent();
this.n = n;
- pfcs = new PFCS(lambda, miu,k,n,m);
+ pfcs = new PFCS(lambda, miu,k,n,m,cte,cts,ctse,cs,tiempo);
}
private void FormPFCS_Load(object sender, EventArgs e)
@@ -38,10 +39,16 @@ private void FormPFCS_Load(object sender, EventArgs e)
tbLq.Text = pfcs.Lq.ToString("N2");
tbLn.Text = pfcs.Ln.ToString("N2");
- tbW.Text = pfcs.W.ToString("N2");
- tbWq.Text = pfcs.Wq.ToString("N2");
- tbWn.Text = pfcs.Wn.ToString("N2");
-
+ tbW.Text = pfcs.W.ToString("N3");
+ tbWq.Text = pfcs.Wq.ToString("N3");
+ tbWn.Text = pfcs.Wn.ToString("N3");
+
+ tbCTTE.Text = pfcs.Ctte.ToString("N2");
+ tbCTTS.Text = pfcs.Ctts.ToString("N2");
+ tbCTTSE.Text = pfcs.Cttse.ToString("N2");
+ tbCTS.Text = pfcs.Cts.ToString("N2");
+ tbCT.Text = pfcs.Ct.ToString("N2");
+
}
private void button1_Click(object sender, EventArgs e)
diff --git a/FormPICM.Designer.cs b/FormPICM.Designer.cs
index 1331e76..cccef3f 100644
--- a/FormPICM.Designer.cs
+++ b/FormPICM.Designer.cs
@@ -53,9 +53,22 @@ private void InitializeComponent()
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.groupBox3 = new System.Windows.Forms.GroupBox();
this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);
+ this.groupBox4 = new System.Windows.Forms.GroupBox();
+ this.tbCT = new System.Windows.Forms.TextBox();
+ this.tbCTS = new System.Windows.Forms.TextBox();
+ this.tbCTTSE = new System.Windows.Forms.TextBox();
+ this.tbCTTS = new System.Windows.Forms.TextBox();
+ this.tbCTTE = new System.Windows.Forms.TextBox();
+ this.label11 = new System.Windows.Forms.Label();
+ this.label12 = new System.Windows.Forms.Label();
+ this.label13 = new System.Windows.Forms.Label();
+ this.label14 = new System.Windows.Forms.Label();
+ this.label15 = new System.Windows.Forms.Label();
+ this.label16 = new System.Windows.Forms.Label();
this.groupBox1.SuspendLayout();
this.groupBox2.SuspendLayout();
this.groupBox3.SuspendLayout();
+ this.groupBox4.SuspendLayout();
this.SuspendLayout();
//
// label9
@@ -298,11 +311,136 @@ private void InitializeComponent()
this.groupBox3.TabStop = false;
this.groupBox3.Text = "Tiempo esperado";
//
+ // groupBox4
+ //
+ this.groupBox4.Controls.Add(this.tbCT);
+ this.groupBox4.Controls.Add(this.tbCTS);
+ this.groupBox4.Controls.Add(this.tbCTTSE);
+ this.groupBox4.Controls.Add(this.tbCTTS);
+ this.groupBox4.Controls.Add(this.tbCTTE);
+ this.groupBox4.Controls.Add(this.label11);
+ this.groupBox4.Controls.Add(this.label12);
+ this.groupBox4.Controls.Add(this.label13);
+ this.groupBox4.Controls.Add(this.label14);
+ this.groupBox4.Controls.Add(this.label15);
+ this.groupBox4.Controls.Add(this.label16);
+ this.groupBox4.Location = new System.Drawing.Point(344, 12);
+ this.groupBox4.Name = "groupBox4";
+ this.groupBox4.Size = new System.Drawing.Size(200, 200);
+ this.groupBox4.TabIndex = 37;
+ this.groupBox4.TabStop = false;
+ this.groupBox4.Text = "Costos Totales";
+ //
+ // tbCT
+ //
+ this.tbCT.Location = new System.Drawing.Point(60, 160);
+ this.tbCT.Name = "tbCT";
+ this.tbCT.PlaceholderText = "CT";
+ this.tbCT.ReadOnly = true;
+ this.tbCT.Size = new System.Drawing.Size(100, 23);
+ this.tbCT.TabIndex = 10;
+ //
+ // tbCTS
+ //
+ this.tbCTS.Location = new System.Drawing.Point(60, 120);
+ this.tbCTS.Name = "tbCTS";
+ this.tbCTS.PlaceholderText = "CTS";
+ this.tbCTS.ReadOnly = true;
+ this.tbCTS.Size = new System.Drawing.Size(100, 23);
+ this.tbCTS.TabIndex = 9;
+ //
+ // tbCTTSE
+ //
+ this.tbCTTSE.Location = new System.Drawing.Point(60, 90);
+ this.tbCTTSE.Name = "tbCTTSE";
+ this.tbCTTSE.PlaceholderText = "CTTSE";
+ this.tbCTTSE.ReadOnly = true;
+ this.tbCTTSE.Size = new System.Drawing.Size(100, 23);
+ this.tbCTTSE.TabIndex = 8;
+ //
+ // tbCTTS
+ //
+ this.tbCTTS.Location = new System.Drawing.Point(60, 60);
+ this.tbCTTS.Name = "tbCTTS";
+ this.tbCTTS.PlaceholderText = "CTTS";
+ this.tbCTTS.ReadOnly = true;
+ this.tbCTTS.Size = new System.Drawing.Size(100, 23);
+ this.tbCTTS.TabIndex = 8;
+ //
+ // tbCTTE
+ //
+ this.tbCTTE.Location = new System.Drawing.Point(60, 30);
+ this.tbCTTE.Name = "tbCTTE";
+ this.tbCTTE.PlaceholderText = "CTTE";
+ this.tbCTTE.ReadOnly = true;
+ this.tbCTTE.Size = new System.Drawing.Size(100, 23);
+ this.tbCTTE.TabIndex = 7;
+ //
+ // label11
+ //
+ this.label11.AutoSize = true;
+ this.label11.Location = new System.Drawing.Point(12, 30);
+ this.label11.Name = "label11";
+ this.label11.Size = new System.Drawing.Size(33, 15);
+ this.label11.TabIndex = 0;
+ this.label11.Text = "CTTE";
+ this.toolTip1.SetToolTip(this.label11, "■ Costo diario por el tiempo de espera en cola.");
+ //
+ // label12
+ //
+ this.label12.AutoSize = true;
+ this.label12.Location = new System.Drawing.Point(12, 160);
+ this.label12.Name = "label12";
+ this.label12.Size = new System.Drawing.Size(21, 15);
+ this.label12.TabIndex = 4;
+ this.label12.Text = "CT";
+ this.toolTip1.SetToolTip(this.label12, "■ Costo total diario del sistema.");
+ //
+ // label13
+ //
+ this.label13.AutoSize = true;
+ this.label13.Location = new System.Drawing.Point(12, 60);
+ this.label13.Name = "label13";
+ this.label13.Size = new System.Drawing.Size(33, 15);
+ this.label13.TabIndex = 1;
+ this.label13.Text = "CTTS";
+ this.toolTip1.SetToolTip(this.label13, "■ Costo diario por el tiempo en el sistema.");
+ //
+ // label14
+ //
+ this.label14.AutoSize = true;
+ this.label14.Location = new System.Drawing.Point(12, 120);
+ this.label14.Name = "label14";
+ this.label14.Size = new System.Drawing.Size(27, 15);
+ this.label14.TabIndex = 3;
+ this.label14.Text = "CTS";
+ this.toolTip1.SetToolTip(this.label14, "■ Costo diario del servidor.");
+ //
+ // label15
+ //
+ this.label15.AutoSize = true;
+ this.label15.Location = new System.Drawing.Point(12, 90);
+ this.label15.Name = "label15";
+ this.label15.Size = new System.Drawing.Size(39, 15);
+ this.label15.TabIndex = 2;
+ this.label15.Text = "CTTSE";
+ this.toolTip1.SetToolTip(this.label15, "■ Costo diario por el tiempo de servicio.");
+ //
+ // label16
+ //
+ this.label16.AutoSize = true;
+ this.label16.Location = new System.Drawing.Point(12, 140);
+ this.label16.Name = "label16";
+ this.label16.Size = new System.Drawing.Size(207, 15);
+ this.label16.TabIndex = 6;
+ this.label16.Text = "----------------------------------------";
+ //
// FormPICM
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(622, 291);
+ this.Controls.Add(this.groupBox4);
this.Controls.Add(this.groupBox3);
this.Controls.Add(this.groupBox2);
this.Controls.Add(this.groupBox1);
@@ -315,6 +453,8 @@ private void InitializeComponent()
this.groupBox2.PerformLayout();
this.groupBox3.ResumeLayout(false);
this.groupBox3.PerformLayout();
+ this.groupBox4.ResumeLayout(false);
+ this.groupBox4.PerformLayout();
this.ResumeLayout(false);
}
@@ -345,5 +485,17 @@ private void InitializeComponent()
private TextBox tbPk;
private Label label1;
private ToolTip toolTip1;
+ private GroupBox groupBox4;
+ private TextBox tbCT;
+ private TextBox tbCTS;
+ private TextBox tbCTTSE;
+ private TextBox tbCTTS;
+ private TextBox tbCTTE;
+ private Label label11;
+ private Label label12;
+ private Label label13;
+ private Label label14;
+ private Label label15;
+ private Label label16;
}
}
\ No newline at end of file
diff --git a/FormPICM.cs b/FormPICM.cs
index 6d70605..c8a71c5 100644
--- a/FormPICM.cs
+++ b/FormPICM.cs
@@ -14,11 +14,12 @@ public partial class FormPICM : Form
{
PICM picm;
int n;
- public FormPICM(double lambda, double miu, int k, int n)
+ public FormPICM(double lambda, double miu, int k, int n,
+ double cte, double cts, double ctse, double cs, double tiempo)
{
InitializeComponent();
this.n = n;
- picm = new PICM(lambda, miu, k, n);
+ picm = new PICM(lambda, miu, k, n,cte,cts,ctse,cs,tiempo);
}
private void FormPICM_Load(object sender, EventArgs e)
@@ -37,9 +38,15 @@ private void FormPICM_Load(object sender, EventArgs e)
tbLq.Text = picm.Lq.ToString("N2");
tbLn.Text = picm.Ln.ToString("N2");
- tbW.Text = picm.W.ToString("N2");
- tbWq.Text = picm.Wq.ToString("N2");
- tbWn.Text = picm.Wn.ToString("N2");
+ tbW.Text = picm.W.ToString("N3");
+ tbWq.Text = picm.Wq.ToString("N3");
+ tbWn.Text = picm.Wn.ToString("N3");
+
+ tbCTTE.Text = picm.Ctte.ToString("N2");
+ tbCTTS.Text = picm.Ctts.ToString("N2");
+ tbCTTSE.Text = picm.Cttse.ToString("N2");
+ tbCTS.Text = picm.Cts.ToString("N2");
+ tbCT.Text = picm.Ct.ToString("N2");
}
}
diff --git a/FormPICM.resx b/FormPICM.resx
index 0ccd1ea..57523cc 100644
--- a/FormPICM.resx
+++ b/FormPICM.resx
@@ -60,7 +60,4 @@
17, 17
-
- 17, 17
-
\ No newline at end of file
diff --git a/FormPICS.Designer.cs b/FormPICS.Designer.cs
index e57d8f5..7a5c907 100644
--- a/FormPICS.Designer.cs
+++ b/FormPICS.Designer.cs
@@ -55,12 +55,14 @@ private void InitializeComponent()
this.label11 = new System.Windows.Forms.Label();
this.label12 = new System.Windows.Forms.Label();
this.label13 = new System.Windows.Forms.Label();
+ this.label14 = new System.Windows.Forms.Label();
this.groupBox4 = new System.Windows.Forms.GroupBox();
- this.btCalcularCosto = new System.Windows.Forms.Button();
- this.tbCS = new System.Windows.Forms.TextBox();
- this.tbCTSE = new System.Windows.Forms.TextBox();
+ this.tbCT = new System.Windows.Forms.TextBox();
this.tbCTS = new System.Windows.Forms.TextBox();
- this.tbCTE = new System.Windows.Forms.TextBox();
+ this.tbCTTSE = new System.Windows.Forms.TextBox();
+ this.tbCTTS = new System.Windows.Forms.TextBox();
+ this.tbCTTE = new System.Windows.Forms.TextBox();
+ this.label15 = new System.Windows.Forms.Label();
this.groupBox1.SuspendLayout();
this.groupBox2.SuspendLayout();
this.groupBox3.SuspendLayout();
@@ -289,110 +291,132 @@ private void InitializeComponent()
// label10
//
this.label10.AutoSize = true;
- this.label10.Location = new System.Drawing.Point(12, 90);
+ this.label10.Location = new System.Drawing.Point(12, 30);
this.label10.Name = "label10";
this.label10.Size = new System.Drawing.Size(33, 15);
- this.label10.TabIndex = 18;
- this.label10.Text = "CTSE";
- this.toolTip1.SetToolTip(this.label10, "■ Costo unitario por tiempo de servicio.\r\n■ Tiempo en el servicio de los clientes" +
- ".\r\n");
+ this.label10.TabIndex = 0;
+ this.label10.Text = "CTTE";
+ this.toolTip1.SetToolTip(this.label10, "■ Costo diario por el tiempo de espera en cola.");
//
// label11
//
this.label11.AutoSize = true;
- this.label11.Location = new System.Drawing.Point(12, 60);
+ this.label11.Location = new System.Drawing.Point(12, 160);
this.label11.Name = "label11";
- this.label11.Size = new System.Drawing.Size(27, 15);
- this.label11.TabIndex = 19;
- this.label11.Text = "CTS";
- this.toolTip1.SetToolTip(this.label11, "■ Costo unitario por tiempo en el sistema.\r\n■ Tiempo en el sistema de los cliente" +
- "s.\r\n");
+ this.label11.Size = new System.Drawing.Size(21, 15);
+ this.label11.TabIndex = 4;
+ this.label11.Text = "CT";
+ this.toolTip1.SetToolTip(this.label11, "■ Costo total diario del sistema.");
//
// label12
//
this.label12.AutoSize = true;
- this.label12.Location = new System.Drawing.Point(12, 30);
+ this.label12.Location = new System.Drawing.Point(12, 60);
this.label12.Name = "label12";
- this.label12.Size = new System.Drawing.Size(27, 15);
- this.label12.TabIndex = 20;
- this.label12.Text = "CTE";
- this.toolTip1.SetToolTip(this.label12, "■ Costo unitario por tiempo en cola.\r\n■ Tiempo de espera de los clientes.");
+ this.label12.Size = new System.Drawing.Size(33, 15);
+ this.label12.TabIndex = 1;
+ this.label12.Text = "CTTS";
+ this.toolTip1.SetToolTip(this.label12, "■ Costo diario por el tiempo en el sistema.");
//
// label13
//
this.label13.AutoSize = true;
this.label13.Location = new System.Drawing.Point(12, 120);
this.label13.Name = "label13";
- this.label13.Size = new System.Drawing.Size(21, 15);
- this.label13.TabIndex = 21;
- this.label13.Text = "CS";
- this.toolTip1.SetToolTip(this.label13, "■ Costo unitario por el servidor.\r\n■ Alquiler\r\n■ Salario\r\n■ Funcionamiento");
+ this.label13.Size = new System.Drawing.Size(27, 15);
+ this.label13.TabIndex = 3;
+ this.label13.Text = "CTS";
+ this.toolTip1.SetToolTip(this.label13, "■ Costo diario del servidor.");
+ //
+ // label14
+ //
+ this.label14.AutoSize = true;
+ this.label14.Location = new System.Drawing.Point(12, 90);
+ this.label14.Name = "label14";
+ this.label14.Size = new System.Drawing.Size(39, 15);
+ this.label14.TabIndex = 2;
+ this.label14.Text = "CTTSE";
+ this.toolTip1.SetToolTip(this.label14, "■ Costo diario por el tiempo de servicio.");
//
// groupBox4
//
- this.groupBox4.Controls.Add(this.btCalcularCosto);
- this.groupBox4.Controls.Add(this.label13);
- this.groupBox4.Controls.Add(this.label12);
- this.groupBox4.Controls.Add(this.label11);
- this.groupBox4.Controls.Add(this.label10);
- this.groupBox4.Controls.Add(this.tbCS);
- this.groupBox4.Controls.Add(this.tbCTSE);
+ this.groupBox4.Controls.Add(this.tbCT);
this.groupBox4.Controls.Add(this.tbCTS);
- this.groupBox4.Controls.Add(this.tbCTE);
+ this.groupBox4.Controls.Add(this.tbCTTSE);
+ this.groupBox4.Controls.Add(this.tbCTTS);
+ this.groupBox4.Controls.Add(this.tbCTTE);
+ this.groupBox4.Controls.Add(this.label10);
+ this.groupBox4.Controls.Add(this.label11);
+ this.groupBox4.Controls.Add(this.label12);
+ this.groupBox4.Controls.Add(this.label13);
+ this.groupBox4.Controls.Add(this.label14);
+ this.groupBox4.Controls.Add(this.label15);
this.groupBox4.Location = new System.Drawing.Point(344, 12);
this.groupBox4.Name = "groupBox4";
- this.groupBox4.Size = new System.Drawing.Size(160, 180);
+ this.groupBox4.Size = new System.Drawing.Size(200, 200);
this.groupBox4.TabIndex = 22;
this.groupBox4.TabStop = false;
- this.groupBox4.Text = "Costos Unitarios";
- //
- // btCalcularCosto
- //
- this.btCalcularCosto.Location = new System.Drawing.Point(47, 149);
- this.btCalcularCosto.Name = "btCalcularCosto";
- this.btCalcularCosto.Size = new System.Drawing.Size(75, 23);
- this.btCalcularCosto.TabIndex = 22;
- this.btCalcularCosto.Text = "Calcular";
- this.btCalcularCosto.UseVisualStyleBackColor = true;
- this.btCalcularCosto.Click += new System.EventHandler(this.btCalcularCosto_Click);
- //
- // tbCS
+ this.groupBox4.Text = "Costos Totales";
//
- this.tbCS.Location = new System.Drawing.Point(47, 120);
- this.tbCS.Name = "tbCS";
- this.tbCS.PlaceholderText = "CS";
- this.tbCS.Size = new System.Drawing.Size(100, 23);
- this.tbCS.TabIndex = 3;
+ // tbCT
//
- // tbCTSE
- //
- this.tbCTSE.Location = new System.Drawing.Point(47, 90);
- this.tbCTSE.Name = "tbCTSE";
- this.tbCTSE.PlaceholderText = "CTSE";
- this.tbCTSE.Size = new System.Drawing.Size(100, 23);
- this.tbCTSE.TabIndex = 2;
+ this.tbCT.Location = new System.Drawing.Point(60, 160);
+ this.tbCT.Name = "tbCT";
+ this.tbCT.PlaceholderText = "CT";
+ this.tbCT.ReadOnly = true;
+ this.tbCT.Size = new System.Drawing.Size(100, 23);
+ this.tbCT.TabIndex = 10;
//
// tbCTS
//
- this.tbCTS.Location = new System.Drawing.Point(47, 60);
+ this.tbCTS.Location = new System.Drawing.Point(60, 120);
this.tbCTS.Name = "tbCTS";
this.tbCTS.PlaceholderText = "CTS";
+ this.tbCTS.ReadOnly = true;
this.tbCTS.Size = new System.Drawing.Size(100, 23);
- this.tbCTS.TabIndex = 1;
+ this.tbCTS.TabIndex = 9;
+ //
+ // tbCTTSE
+ //
+ this.tbCTTSE.Location = new System.Drawing.Point(60, 90);
+ this.tbCTTSE.Name = "tbCTTSE";
+ this.tbCTTSE.PlaceholderText = "CTTSE";
+ this.tbCTTSE.ReadOnly = true;
+ this.tbCTTSE.Size = new System.Drawing.Size(100, 23);
+ this.tbCTTSE.TabIndex = 8;
+ //
+ // tbCTTS
+ //
+ this.tbCTTS.Location = new System.Drawing.Point(60, 60);
+ this.tbCTTS.Name = "tbCTTS";
+ this.tbCTTS.PlaceholderText = "CTTS";
+ this.tbCTTS.ReadOnly = true;
+ this.tbCTTS.Size = new System.Drawing.Size(100, 23);
+ this.tbCTTS.TabIndex = 8;
+ //
+ // tbCTTE
+ //
+ this.tbCTTE.Location = new System.Drawing.Point(60, 30);
+ this.tbCTTE.Name = "tbCTTE";
+ this.tbCTTE.PlaceholderText = "CTTE";
+ this.tbCTTE.ReadOnly = true;
+ this.tbCTTE.Size = new System.Drawing.Size(100, 23);
+ this.tbCTTE.TabIndex = 7;
//
- // tbCTE
+ // label15
//
- this.tbCTE.Location = new System.Drawing.Point(47, 30);
- this.tbCTE.Name = "tbCTE";
- this.tbCTE.PlaceholderText = "CTE";
- this.tbCTE.Size = new System.Drawing.Size(100, 23);
- this.tbCTE.TabIndex = 0;
+ this.label15.AutoSize = true;
+ this.label15.Location = new System.Drawing.Point(12, 140);
+ this.label15.Name = "label15";
+ this.label15.Size = new System.Drawing.Size(207, 15);
+ this.label15.TabIndex = 6;
+ this.label15.Text = "----------------------------------------";
//
// FormPICS
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
- this.ClientSize = new System.Drawing.Size(518, 291);
+ this.ClientSize = new System.Drawing.Size(556, 291);
this.Controls.Add(this.groupBox4);
this.Controls.Add(this.groupBox3);
this.Controls.Add(this.groupBox2);
@@ -437,14 +461,16 @@ private void InitializeComponent()
private GroupBox groupBox3;
private ToolTip toolTip1;
private GroupBox groupBox4;
- private TextBox tbCS;
- private TextBox tbCTSE;
+ private TextBox tbCT;
private TextBox tbCTS;
- private TextBox tbCTE;
- private Label label13;
- private Label label12;
- private Label label11;
+ private TextBox tbCTTSE;
+ private TextBox tbCTTS;
+ private TextBox tbCTTE;
private Label label10;
- private Button btCalcularCosto;
+ private Label label11;
+ private Label label12;
+ private Label label13;
+ private Label label14;
+ private Label label15;
}
}
\ No newline at end of file
diff --git a/FormPICS.cs b/FormPICS.cs
index cc37a1b..94520f9 100644
--- a/FormPICS.cs
+++ b/FormPICS.cs
@@ -14,11 +14,12 @@ public partial class FormPICS : Form
{
PICS pics;
int n;
- public FormPICS(double lambda, double miu, int k, int n)
+ public FormPICS(double lambda, double miu, int k, int n,
+ double cte, double cts, double ctse, double cs, double tiempo)
{
InitializeComponent();
this.n = n;
- pics = new PICS(lambda, miu, k, n);
+ pics = new PICS(lambda, miu, k, n,cte,cts,ctse,cs,tiempo);
}
private void FormPICS_Load(object sender, EventArgs e)
{
@@ -36,14 +37,22 @@ private void FormPICS_Load(object sender, EventArgs e)
tbLq.Text = pics.Lq.ToString("N2");
tbLn.Text = pics.Ln.ToString("N2");
- tbW.Text = pics.W.ToString("N2");
- tbWq.Text = pics.Wq.ToString("N2");
- tbWn.Text = pics.Wn.ToString("N2");
+ tbW.Text = pics.W.ToString("N3");
+ tbWq.Text = pics.Wq.ToString("N3");
+ tbWn.Text = pics.Wn.ToString("N3");
+
+ tbCTTE.Text = pics.Ctte.ToString("N2");
+ tbCTTS.Text = pics.Ctts.ToString("N2");
+ tbCTTSE.Text = pics.Cttse.ToString("N2");
+ tbCTS.Text = pics.Cts.ToString("N2");
+ tbCT.Text = pics.Ct.ToString("N2");
+
}
private void btCalcularCosto_Click(object sender, EventArgs e)
{
-
+ //FormCostos ventanaCosto = new FormCostos();
+ //ventanaCosto.Show();
}
}
}
diff --git a/PFCM.cs b/PFCM.cs
index 27b4afd..6605df0 100644
--- a/PFCM.cs
+++ b/PFCM.cs
@@ -11,12 +11,14 @@ internal class PFCM : modeloColas
int m;
double pe;
double pNe;
- public PFCM(double lambda, double miu, int k, int n, int m)
+ public PFCM(double lambda, double miu, int k, int n, int m,
+ double cte, double cts, double ctse, double cs, double tiempo)
{
Lambda = lambda;
Miu = miu;
M = m;
K = k;
+ Tiempo = tiempo;
P0 = calcularP0();
Pn = calcularPn(1,n);
pe = calcularPe();
@@ -27,6 +29,11 @@ public PFCM(double lambda, double miu, int k, int n, int m)
Wq = calcularWq();
W = calcularW();
Wn = calcularWn();
+ Ctte = calcularCTTE(cte);
+ Ctts = calcularCTTS(cts);
+ Cttse = calcularCTTSE(ctse);
+ Cts = calcularCTS(cs);
+ Ct = calcularCT();
}
#region get/set M, Pe, PNe
diff --git a/PFCS.cs b/PFCS.cs
index 74dbfaa..73b933a 100644
--- a/PFCS.cs
+++ b/PFCS.cs
@@ -10,12 +10,14 @@ internal class PFCS:modeloColas
{
int m;
double pe;
- public PFCS(double lambda, double miu, int k, int n, int m)
+ public PFCS(double lambda, double miu, int k, int n, int m,
+ double cte, double cts, double ctse, double cs, double tiempo)
{
Lambda = lambda;
Miu = miu;
M = m;
K = k;
+ Tiempo = tiempo;
P0 = calcularP0();
Pe = calcularPe();
Pn = calcularPn(n);
@@ -25,6 +27,11 @@ public PFCS(double lambda, double miu, int k, int n, int m)
Wq = calcularWq();
W = calcularW();
Wn = calcularWn();
+ Ctte = calcularCTTE(cte);
+ Ctts = calcularCTTS(cts);
+ Cttse = calcularCTTSE(ctse);
+ Cts = calcularCTS(cs);
+ Ct = calcularCT();
}
#region get/set M, Pe
diff --git a/PICM.cs b/PICM.cs
index ac4251c..b5b0187 100644
--- a/PICM.cs
+++ b/PICM.cs
@@ -10,11 +10,13 @@ internal class PICM:modeloColas
{
double pk;
double pNe;
- public PICM(double lambda, double miu, int k, int n)
+ public PICM(double lambda, double miu, int k, int n,
+ double cte, double cts, double ctse, double cs, double tiempo)
{
Lambda = lambda;
Miu = miu;
K = k;
+ Tiempo = tiempo;
P0 = calcularP0();
Pn = calcularPn(n);
Pk = calcularPk();
@@ -25,7 +27,11 @@ public PICM(double lambda, double miu, int k, int n)
W = calcularW();
Wq = calcularWq();
Wn = calcularWn();
-
+ Ctte = calcularCTTE(cte);
+ Ctts = calcularCTTS(cts);
+ Cttse = calcularCTTSE(ctse);
+ Cts = calcularCTS(cs);
+ Ct = calcularCT();
}
#region get/set pK, PNe
diff --git a/PICS.cs b/PICS.cs
index 10a6fc2..4eae83a 100644
--- a/PICS.cs
+++ b/PICS.cs
@@ -10,11 +10,13 @@ internal class PICS: modeloColas
{
private double ro;
- public PICS(double lambda, double miu, int k, int n)
+ public PICS(double lambda, double miu, int k, int n,
+ double cte, double cts, double ctse, double cs, double tiempo)
{
Lambda = lambda; //a
Miu = miu; //b
K = k; //c
+ Tiempo = tiempo;
Ro = calcularRo(); //1
P0 = calcularP0(); //2
Pn = calcularPn(n); //3 *
@@ -24,6 +26,11 @@ public PICS(double lambda, double miu, int k, int n)
W = calcularW(); //7
Wq = calcularWq(); //8
Wn = calcularWn(); //9
+ Ctte = calcularCTTE(cte);
+ Ctts = calcularCTTS(cts);
+ Cttse = calcularCTTSE(ctse);
+ Cts = calcularCTS(cs);
+ Ct = calcularCT();
}
#region get/Set Ro
diff --git a/TCTS.csproj b/TCTS.csproj
index d8cfd9a..b57c89e 100644
--- a/TCTS.csproj
+++ b/TCTS.csproj
@@ -8,8 +8,4 @@
enable
-
-
-
-
\ No newline at end of file
diff --git a/modeloColas.cs b/modeloColas.cs
index a872737..0545a50 100644
--- a/modeloColas.cs
+++ b/modeloColas.cs
@@ -19,6 +19,14 @@ internal class modeloColas
private double w;
private double wq;
private double wn;
+ private double ctte;
+ private double ctts;
+ private double cttse;
+ private double cts;
+ private double ct;
+ private double tiempo;
+
+
#region get/set
public double Lambda
@@ -77,8 +85,61 @@ public double Wn
get { return wn; }
set { wn = value; }
}
+ public double Ctte
+ {
+ get { return ctte; }
+ set { ctte = value; }
+ }
+ public double Ctts
+ {
+ get { return ctts; }
+ set { ctts = value; }
+ }
+ public double Cttse
+ {
+ get { return cttse; }
+ set { cttse = value; }
+ }
+ public double Cts
+ {
+ get { return cts; }
+ set { cts = value; }
+ }
+ public double Ct
+ {
+ get { return ct; }
+ set { ct = value; }
+ }
+ public double Tiempo
+ {
+ get { return tiempo; }
+ set { tiempo = value; }
+ }
+
#endregion
+ public double calcularCTTE(double value)
+ {
+ return lambda * tiempo * wq * value;
+ }
+ public double calcularCTTS(double value)
+ {
+ return lambda * tiempo * w * value;
+ }
+ public double calcularCTTSE(double value)
+ {
+ return lambda * tiempo * (1 / miu) * value;
+ }
+ public double calcularCTS(double value)
+ {
+ return k * value;
+ }
+ public double calcularCT()
+ {
+ return ctte + ctts + cttse + cts;
+ }
+
+
public double factorial(int value)
{
if (value == 0)
diff --git a/sources/A resolver.txt b/sources/A resolver.txt
deleted file mode 100644
index 2704fde..0000000
--- a/sources/A resolver.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-* poner funcion de estabilidad en ambos lados
-
-* cuando no se conozca k se debe realizar una simulacion de 0 a k (mejor opcion)??
-
-*corregir 0, que el programa detecte los ceros en cada tb
\ No newline at end of file
diff --git a/sources/ModeloTeoriaColas.drawio b/sources/ModeloTeoriaColas.drawio
deleted file mode 100644
index bf386d1..0000000
--- a/sources/ModeloTeoriaColas.drawio
+++ /dev/null
@@ -1 +0,0 @@
-7Z1bc9o4FMc/DTO7D9nxjUseAwk0DcnQkDbtvuwIrIAb2WJtEUI+fSWQwUYCbKgRBc1kpuhY+KLfOfLx+cu0ZDf891YIRsN77EJUsgz3vWRflyzLdMwy/YdZpnOL7dTmhkHoubzT0tD1PiA3Gtw69lwYpToSjBHxRmljHwcB7JOUDYQhnqS7vWCUPuoIDKBg6PYBEq3PnkuGc2vNqi7tn6A3GMZHNiuX8y0+iDvzK4mGwMWThMm+KdmNEGMy/+S/NyBigxePy/Pt9Bm1Xyutz1+i/8HX+t3Tw7eL+c6aeb6yuIQQBmTnXX+8vjQ/fXN+fh91ml8mRuuq9/mCf8V4A2jMx8tnHoAbGIGIXzaZxmMZTTwfgYC26i84IF2+hY5EHSBvENDPfXqKMKSGNxgSj2K44hsIHlFrf+ghtw2meMwuJCKg/xq36kMceh90twDRTSY10M0h4R5lVVI9uuyb1GxQawgj2qcTj465MLVBRHifPkYIjCKvNzth1sUH4cAL6pgQ7Mc7wuPAhS5vLXDPGiTErwsHYt/PyISzY6MB3xMeyRm1IPYhCae0S7w1djcebw5vTpbOa1a4bZhw3EVcAh4wg8WuF0d7pAEGggEdg8XhLDt9ODPr8SiQ1OEAotwDQGCdjWKUdEX6IXGlS9PMQXM4qyk4axv4PReU7Cs2QeExo7vqs3TYScI/EXwha70zGoG+Fwzasz7XztLyyK+bmTD97guaecbQc10YzDyHAALmzsXcZYS9gMwGplynf3T4GsY/5VKZnlCDts1lm/6x7iFp4IA6GfBm3gSp504g816Jn20M5O1+Nk3zy8s56VYpwHlpWgLNe2980ig3zC9D4iP+sSjgZUsxcFsAfqdxF4a7WlOMuyzg7kTj3r8wxCdNvSiepuEcDuiD2+p/7bzd12s/Pka9/7r2+OlOMmEzoA9nQFOglBXwepr2jmnWb6MpzsZtTXIXkuUDJlJSkhWRJI3LL5rmLjRrB8ySpDTF22Zbz7I70rSMAyZBUpqOQPNZk9yFpK06+6mJJPUsuyvNiurspyqlqWfZnWjWVJeSxFlWgIe8WdmaP3ib0pLuFrI+ZcR2F6N8YqSvL0wBty3itiVoEehB1MGRRzzM9h/O+64gV/W8aZsZMyG7sHtnTaAI3QGMVQc6JkM8wAFAN0vrStFl2aeNZ7QYrJ+QkCmXFcCY4LRb0GEMp9/Z92lY8eaP5Lbrd77zeWu6aLlXTK6izR7CTJxgpqaH0oUedgVrg2+TghDhcdiHGwhzDASEA7hDMIcQAeK9pU/ut0eq+KzSuW3cC5zXCE1GSQtNW9wkh9BUWxGaahlvyvblTkqTuaI02VmPV6zSJJ96xKcwMs8NmHYtCqPnmxpUtiR6ijMDMc87hxwvG7VjFY/k5UqxXsmqz6etIBUVlofUhuQ05eLQw43GuQPOg0pD0vO7FHAK8M79ASz3lJtZItqQje0F1RTX28QK7l9/n2hwFoFR+WQreehit86ThVjADFtRXX62xfozv2NqhhkZXqouOjuWnKEOxOwPlKZqtd2RrELVALMDjINAHUBxzftsvYSGmKOsozynEZ842noqzQfxUnVO44g1nWcNMDNA21Ke0EiWt+ipNB9ER3VCY69ZC6EhZodYVZ3UmFUBltbKN5S2+HAdt1huipHZuW10BdJaLS9eLb+I32eO1fJq1ptvnGblU8vL5T/ovUyxNvWoX/JJBvAf9FammJML9M5dysmPNat8XpSUY4mJ+uMZizj5AR5ywbKc4PrXKTXH7BwPuVRZnqhLMeqHLRHreiEn68rk4iBqDWA/gso1cVOLAPtTVC6KaxFgf4jKVXFTUkTWBLMTVC+JmxIdR0+mOSkq18XjrErrAHtQVC6MW5IHjKauGWeoGW9xh/Vl5LU1Y8dI13DLWWWi+J58ui9YWeJk0yVjl422ZTyM/R51vLOcdTYE9VEUjeXnp4vGBWA9YNFYfnpiYt6CLD670PcCENKJwXgCrzRsdKRmRKr8dy9kZeSmfgH7KNKDSlZJ+QzSA/GVFZ0ebAnqI04PxHUsOj3YG6vy9EBc9aHTg/2QKk8PHLXLCBcNtogwsabwCJYRynFyASK5jHDD74kcYB3hxtNM/pqJ9GdMdNZXfNZnr6ZhWYP+9LO++FR11pfpXnJ53FmfLVaidda3N1bVWZ8tFm511rcf0gKzPtpc/v9U82l6+b982Te/AA==
\ No newline at end of file
diff --git a/validate.cs b/validate.cs
index 0245dc7..04e17e9 100644
--- a/validate.cs
+++ b/validate.cs
@@ -17,15 +17,24 @@ internal class Validate
string cts = "";
string ctse = "";
string cs = "";
- public Validate(string lambda, string miu, string k, string n, string m)
+ string time = "";
+
+ public Validate(string lambda, string miu,
+ string k, string n, string m,
+ string cte, string cts, string ctse, string cs, string time)
{
this.lambda = lambda;
this.miu = miu;
this.k = k;
this.n = n;
this.m = m;
+ this.cte = cte;
+ this.cts = cts;
+ this.ctse = ctse;
+ this.cs = cs;
+ this.time = time;
}
-
+
public double Lambda(){
string value;
@@ -56,6 +65,35 @@ public int M()
value = (m == "") ? "0" : m;
return int.Parse(value);
}
-
+ public double Cte()
+ {
+ string value;
+ value = (cte == "") ? "0" : cte;
+ return double.Parse(value);
+ }
+ public double Cts()
+ {
+ string value;
+ value = (cts == "") ? "0" : cts;
+ return double.Parse(value);
+ }
+ public double Ctse()
+ {
+ string value;
+ value = (ctse == "") ? "0" : ctse;
+ return double.Parse(value);
+ }
+ public double Cs()
+ {
+ string value;
+ value = (cs == "") ? "0" : cs;
+ return double.Parse(value);
+ }
+ public double Time()
+ {
+ string value;
+ value = (time == "")? "0" : time;
+ return double.Parse(time);
+ }
}
}