mirror of
https://github.com/esiur/esiur-dotnet.git
synced 2025-12-18 09:50:25 +00:00
eBook
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="CsvHelper" Version="30.0.1" />
|
||||
<PackageReference Include="ScottPlot.WinForms" Version="4.1.58" />
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
@@ -1,4 +1,28 @@
|
||||
using Esiur.Analysis.Graph;
|
||||
/*
|
||||
|
||||
Copyright (c) 2023 Ahmed Kh. Zamil
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
||||
*/
|
||||
|
||||
using Esiur.Analysis.Graph;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
|
||||
21
Esiur.Analysis.Test/LICENSE
Normal file
21
Esiur.Analysis.Test/LICENSE
Normal file
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2012 - 2023 Esiur Foundation, Ahmed Kh. Zamil.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
@@ -1,10 +1,3 @@
|
||||
using System.Diagnostics;
|
||||
using System.Net.Sockets;
|
||||
using System.Text;
|
||||
using Esiur.Analysis.Coding;
|
||||
using Esiur.Analysis.DSP;
|
||||
using Esiur.Analysis.Graph;
|
||||
using Esiur.Analysis.Signals;
|
||||
/*
|
||||
|
||||
Copyright (c) 2022 Ahmed Kh. Zamil
|
||||
@@ -29,10 +22,23 @@ SOFTWARE.
|
||||
|
||||
*/
|
||||
|
||||
using System.Diagnostics;
|
||||
using System.Formats.Asn1;
|
||||
using System.Globalization;
|
||||
using System.Net.Sockets;
|
||||
using System.Text;
|
||||
using CsvHelper;
|
||||
using Esiur.Analysis.Coding;
|
||||
using Esiur.Analysis.DSP;
|
||||
using Esiur.Analysis.Graph;
|
||||
using Esiur.Analysis.Scheduling;
|
||||
using Esiur.Analysis.Signals;
|
||||
using Esiur.Analysis.Signals.Codes;
|
||||
using Esiur.Data;
|
||||
using Esiur.Resource;
|
||||
using ScottPlot.Statistics.Interpolation;
|
||||
using Process = Esiur.Analysis.Scheduling.Process;
|
||||
using Esiur.Analysis.Queueing;
|
||||
|
||||
namespace Esiur.Analysis.Test
|
||||
{
|
||||
@@ -48,6 +54,46 @@ namespace Esiur.Analysis.Test
|
||||
{
|
||||
|
||||
|
||||
var queues = new Queue[] { new Queue() { ServiceRate = 2, VisitRatio = 1 },
|
||||
new Queue() { Servers = 1 , ServiceRate = 1, VisitRatio = 0.2 },
|
||||
new Queue(){Servers = 1, ServiceRate = 2, VisitRatio = 0.3 },
|
||||
new Queue(){Servers = 1, ServiceRate = 4, VisitRatio = 0.5}};
|
||||
|
||||
var mva = new MeanValueAnalysis(queues);
|
||||
|
||||
mva.Process(10);
|
||||
|
||||
//using (var reader = new StreamReader("c:\\cd\\s2.csv"))
|
||||
//using (var csv = new CsvReader(reader, CultureInfo.InvariantCulture))
|
||||
//{
|
||||
// var records = csv.GetRecords<dynamic>();
|
||||
|
||||
// var procs = records.Select(x =>
|
||||
// {
|
||||
// return new Process()
|
||||
// {
|
||||
// Arrival = Convert.ToInt32(x.arrival),
|
||||
// Burst = Convert.ToInt32(x.wc) * 0.5,
|
||||
// Priority = x.label == "high" ? 0 : 1,
|
||||
// Title = x.subject
|
||||
// };
|
||||
// }).ToArray();
|
||||
|
||||
|
||||
// var processes = Esiur.Analysis.Scheduling.SPF.ScheduleHybrid(procs);
|
||||
|
||||
// var class0 = processes.Where(x => x.Priority == 0).ToArray();
|
||||
// var class1 = processes.Where(x => x.Priority == 1).ToArray();
|
||||
|
||||
// var waitTime = processes.Sum(x => x.WaitTime) / processes.Length;
|
||||
// var class0Time = class0.Sum(x => x.WaitTime) / class0.Length;
|
||||
// var class1Time = class1.Sum(x => x.WaitTime) / class1.Length;
|
||||
|
||||
// Console.WriteLine(waitTime.ToString());
|
||||
//}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
var msg = Encoding.ASCII.GetBytes("A_DEAD_DAD_CEDED_A_BAD_BABE_A_BEADED_ABACA_BED").Select(x => CodeWord<Base2>.FromByte(x)).ToArray();// <Base2>());
|
||||
|
||||
Reference in New Issue
Block a user