Beispiel #1
0
 public Stair(Vector2 enterPos, Vector2 outPos, Floor destination, StairCase target)
 {
     this.enterPos    = enterPos;
     this.outPos      = outPos;
     this.destination = destination;
     this.target      = target;
 }
Beispiel #2
0
 public Stair(Vector2 enterPos, Vector2 outPos, Floor destination, StairCase target)
 {
     this.enterPos = enterPos;
     this.outPos = outPos;
     this.destination = destination;
     this.target = target;
 }
 //пока расчёт для лестничной клетки, с первого этажа которой нет выхода в холл или коридор, а есть выход на улицу
 public MethodsSupplyStair(StairCase stairCase, Climate climate)
 {
     Stair   = stairCase;
     Climate = climate;
     CompPwind();
     CompPs2_23();
     CompGsa_24();
 }
Beispiel #4
0
 public FloorSearcher(Vector2 startingPos, Vector2 targetPos, Floor startingFloor = null, Floor targetFloor = null, StairCase startingStair = null, StairCase targetStair = null)
 {
     pathList = new List<List<Vector2>>();
     this.startingPos = startingPos;
     this.targetPos = targetPos;
     this.startingFloor = startingFloor;
     this.targetFloor = targetFloor;
     this.startingStair = startingStair;
     this.targetStair = targetStair;
 }
Beispiel #5
0
 public FloorSearcher(Vector2 startingPos, Vector2 targetPos, Floor startingFloor = null, Floor targetFloor = null, StairCase startingStair = null, StairCase targetStair = null)
 {
     pathList           = new List <List <Vector2> >();
     this.startingPos   = startingPos;
     this.targetPos     = targetPos;
     this.startingFloor = startingFloor;
     this.targetFloor   = targetFloor;
     this.startingStair = startingStair;
     this.targetStair   = targetStair;
 }
        public void CalculateStepsForTop_WhenValidInputMultipleFlight_ThenReturnValidResult()
        {
            //Arrange
            var stairCase = new StairCase {
                Flights = new int[] { 5, 11, 9, 13, 8, 30, 14 }, StepsPerStride = 3, TurnAroundSride = 2
            };

            // Act
            stairCaseService.CalculateStepsForTop(stairCase);

            //Assert

            Assert.AreEqual(44, stairCase.TotalStepsRequired);
        }
        public void CalculateStepsForTop_WhenValidInputTwoFlight_ThenReturnValidResult()
        {
            //Arrange
            var stairCase = new StairCase {
                Flights = new int[] { 15, 15 }, StepsPerStride = 2, TurnAroundSride = 2
            };

            // Act
            stairCaseService.CalculateStepsForTop(stairCase);

            //Assert

            Assert.AreEqual(18, stairCase.TotalStepsRequired);
        }
Beispiel #8
0
        static void Main(string[] args)
        {
            Climate climate = new Climate(-25, 20, 2);
            Floors  floors  = new Floors(1, 16, 1);

            floors.AddSingle(1, 5);
            floors.AddRange((2, 16), 3);
            Pressures pressures = new Pressures(floors, climate);

            Console.WriteLine($"ROOF LEVEL : {floors.RoofFloorLevel}");
            Console.WriteLine($"PRESSURE OUTSIDE MAX : {pressures.OutsideDeltaPMax}");
            Window window = new Window(1.8, 1, climate, pressures);

            Console.WriteLine($"WINDOW AREA : {window.Area}");
            DoorOutside doorO = new DoorOutside(1.36, 2.4);
            DoorInside  doorI = new DoorInside(1.1, 2.1, 196000);
            StairCase   stair = new StairCase(16, StairCase.Portal.Straight, floors, doorO, 1, doorI, window);

            MethodsSupplyStair meth = new MethodsSupplyStair(stair, climate);

            meth.CompCollect();
            Console.WriteLine($"Pwind : {meth.Pwind}");
            Console.WriteLine($"Ps2 : {meth.Ps2_23}");
            Console.WriteLine($"Gsa : {meth.Gsa_24}");
            Console.WriteLine($"Door smoke resistance : {doorI.SmokeResistance}");
            Console.WriteLine($"---------------------------------");
            var results = meth.EachFloorResults.OrderByDescending(x => x.LevelKey);

            foreach (var item in results)
            {
                var lk   = String.Format("{0:0.##}", item.LevelKey);
                var v    = String.Format("{0:0.##}", item.V);
                var p    = String.Format("{0:0.##}", item.P);
                var gsd  = String.Format("{0:0.##}", item.Gsd);
                var gsw  = String.Format("{0:0.##}", item.Gsw);
                var gsum = String.Format("{0:0.##}", item.Gsum);

                Console.WriteLine($"{lk}  |  {item.LevelValue}  |  {v}  |  {p}  |  {gsd}  |  {gsw}  |  {gsum}");
            }
            Console.WriteLine("-----------------");
            Console.WriteLine($"Fan capacity : {Math.Round(meth.Lv)}");
        }
Beispiel #9
0
 public void SetStair(StairCase newStair)
 {
     _isOnStair = true;
     currentStair = newStair;
 }
Beispiel #10
0
 public void SetStair(StairCase newStair)
 {
     _isOnStair = true;
 }
Beispiel #11
0
 public void SetStair(StairCase newStair)
 {
     _isOnStair   = true;
     currentStair = newStair;
 }
Beispiel #12
0
 void Start()
 {
     step      = transform.parent.GetComponent <StairStep>();
     stairCase = step.transform.parent.GetComponent <StairCase> ();
 }
Beispiel #13
0
        public static async Task Main(string[] args)
        {
            var builder = WebAssemblyHostBuilder.CreateDefault(args);

            builder.RootComponents.Add <App>("#app");
            builder.Services.AddScoped(
                sp => new HttpClient {
                BaseAddress = new Uri(builder.HostEnvironment.BaseAddress)
            });
            //регистрация классов, которые относятся к расчёту ПОДПОР В ЛЕСТНИЧНУЮ КЛЕТКУ. Функциональность некоторых классов повторяется, но решено всё равно для каждого расчёта создавать свои классы чтобы избежать путаницы
            Climate1 climate1 = new Climate1(-25, 20, 2);
            Floors1  floors1  = new Floors1(1, 10);

            floors1.AddRange((1, 10), 3.1);
            DoorOutside        doorOutside        = new DoorOutside(1.4, 2.4);
            DoorInside         doorInside         = new DoorInside(1.1, 2.1, DoorInside.Type.Usual, climate1);
            Pressures          pressures          = new Pressures(floors1, climate1);
            Window             window             = new Window(1.8, 1, climate1, pressures);
            StairCase          stair              = new StairCase(16, StairCase.Portal.Straight, floors1, doorOutside, 1, doorInside, window);
            MethodsSupplyStair methodsSupplyStair = new MethodsSupplyStair(stair, climate1);

            builder.Services.AddSingleton(climate1);
            builder.Services.AddSingleton(floors1);
            builder.Services.AddSingleton(doorOutside);
            builder.Services.AddSingleton(doorInside);
            builder.Services.AddSingleton(pressures);
            builder.Services.AddSingleton(window);
            builder.Services.AddSingleton(stair);
            builder.Services.AddSingleton(methodsSupplyStair);
            //регистрация классов, которые относятся к расчёту ДЫМОУДАЛЕНИЕ ИЗ КОРИДОРОВ
            Climate2       climate2 = new Climate2(26, 26, 2);
            List <Opening> openings = new List <Opening>();
            Room           room     = new Room(25, 2.8, openings, 14, 400, climate2);
            DoorHall       doorHall = new DoorHall(1.1, 2.1, DoorHall.Type.Usual, climate2);
            Hall           hall     = new Hall(30, 15, 2.8, doorHall, room, climate2, BuildingType.Residential);
            Network        network  = new Network(1, 10, 0, climate2, hall);

            builder.Services.AddSingleton(climate2);
            builder.Services.AddSingleton(room);
            builder.Services.AddSingleton(doorHall);
            builder.Services.AddSingleton(hall);
            builder.Services.AddSingleton(network);
            //регистрация классов, которые относятся к расчёту ПОДПОР В ЛИФТ
            Climate3 climate3 = new Climate3(-25, 18, 2);
            Floors3  floors3  = new Floors3(1, 10);

            floors3.AddRange((1, 10), 3.2);
            ElevatorDoor elevatorDoor = new ElevatorDoor(1, 2);
            HallDoor     hallDoor     = new HallDoor(1.1, 2.1);
            Elevator     elevator     = new Elevator(floors3, 4, 5, elevatorDoor, hallDoor, climate3, false);

            builder.Services.AddSingleton(climate3);
            builder.Services.AddSingleton(floors3);
            builder.Services.AddSingleton(elevatorDoor);
            builder.Services.AddSingleton(hallDoor);
            builder.Services.AddSingleton(elevator);
            builder.Services.AddMatToaster(config =>
            {
                config.Position             = MatToastPosition.BottomRight;
                config.PreventDuplicates    = true;
                config.NewestOnTop          = true;
                config.ShowCloseButton      = true;
                config.MaximumOpacity       = 100;
                config.VisibleStateDuration = 4000;
            });
            builder.Services.AddClipboard();
            await builder.Build().RunAsync();
        }
Beispiel #14
0
 public void SetStair(StairCase newStair)
 {
     _isOnStair = true;
 }