public SerializedModel(double buildingHeight, int numberOfStories, Seismicity seismicity, List <Line2D> wallLines, List <Line2D> corridorLines, Polygon2D outline, List <Polygon2D> unitBoundaries, RandomizedBuilding randomizedBuilding, double randomizedPercent)
        {
            var levels = new List <BuildingLevel>();

            for (int i = 1; i <= numberOfStories; i++)
            {
                levels.Add(new BuildingLevel("LEVEL_" + i, buildingHeight * i));
            }

            ModelSettings = new ModelSettings(buildingHeight);

            var systemParameters = new SystemParameters();

            var seismicBaseLevel = new BuildingLevel("BASE", 0);

            var buildingParameters = new BuildingParameters(seismicBaseLevel);

            SeismicParameters = new SeismicParameters(systemParameters, buildingParameters, seismicity);

            var bearingWalls = new List <BearingWall>();
            var oneWayDecks  = new List <OneWayDeck>();

            Random random = new Random();
            int    test   = random.Next(0, 2);

            foreach (var level in levels)
            {
                var wallLineID = 1;
                foreach (var wallLine in wallLines)
                {
                    if (random.NextDouble() < randomizedPercent)
                    {
                        var wallId = level.Name + "_" + wallLineID;
                        bearingWalls.Add(new BearingWall(wallId, wallLine, level));
                        wallLineID += 1;
                    }
                }

                foreach (var wallLine in corridorLines)
                {
                    var wallId = level.Name + "_" + wallLineID;

                    bearingWalls.Add(new BearingWall(wallId, wallLine, level));

                    wallLineID += 1;
                }

                oneWayDecks.Add(new OneWayDeck(outline, level));
            }

            OneWayDecks = oneWayDecks;

            UnitBoundaries = unitBoundaries;
        }
 public SeismicParameters(SystemParameters systemParameters, BuildingParameters buildingParameters, Seismicity seismicity)
 {
     SystemParameters   = systemParameters;
     BuildingParameters = buildingParameters;
     Seismicity         = seismicity;
 }