def exitStructure_command(self, ctx:slatParser.Structure_commandContext): id = ctx.ID().getText(); s = pyslat.structure(id) groups = [] for g in ctx.id_list().ID(): groups.append(g.getText()) s.AddCompGroup(pyslat.compgroup.lookup(g.getText())) print("Create structure {} from {}.".format(id, groups));
def exitStructure_command(self, ctx: slatParser.Structure_commandContext): id = ctx.ID().getText() s = pyslat.structure(id) groups = [] for g in ctx.id_list().ID(): groups.append(g.getText()) s.AddCompGroup(pyslat.compgroup.lookup(g.getText())) print("Create structure {} from {}.".format(id, groups))
[102, "EDP.14", "FRAG.108", "COST_108", "DELAY_108", 10], [103, "EDP.16", "FRAG.108", "COST_108", "DELAY_108", 10], [104, "EDP.18", "FRAG.108", "COST_108", "DELAY_108", 10], [105, "EDP.20", "FRAG.108", "COST_108", "DELAY_108", 10], [106, "EDP.01", "FRAG.214", "COST_214", "DELAY_214", 10], [107, "EDP.03", "FRAG.214", "COST_214", "DELAY_214", 10], [108, "EDP.05", "FRAG.214", "COST_214", "DELAY_214", 10], [109, "EDP.07", "FRAG.214", "COST_214", "DELAY_214", 10], [110, "EDP.09", "FRAG.214", "COST_214", "DELAY_214", 10], [111, "EDP.11", "FRAG.214", "COST_214", "DELAY_214", 10], [112, "EDP.13", "FRAG.214", "COST_214", "DELAY_214", 10], [113, "EDP.15", "FRAG.214", "COST_214", "DELAY_214", 10], [114, "EDP.17", "FRAG.214", "COST_214", "DELAY_214", 10], [115, "EDP.19", "FRAG.214", "COST_214", "DELAY_214", 10]] building = pyslat.structure("building") building.setRebuildCost( pyslat.MakeLogNormalDist(14E6, pyslat.LOGNORMAL_MU_TYPE.MEAN_X, 0.35, pyslat.LOGNORMAL_SIGMA_TYPE.SD_LN_X)) building.setRebuildCost( pyslat.MakeLogNormalDist(14E6, pyslat.LOGNORMAL_MU_TYPE.MEAN_X, 0.35, pyslat.LOGNORMAL_SIGMA_TYPE.SD_LN_X)) building.setDemolitionCost( pyslat.MakeLogNormalDist(14E6, pyslat.LOGNORMAL_MU_TYPE.MEAN_X, 0.35, pyslat.LOGNORMAL_SIGMA_TYPE.SD_LN_X)) for comp in COMPONENT_DATA: id = comp[0] edp = comp[1] frag = comp[2] cost = comp[3] delay = comp[4]
[103, "EDP.16", "FRAG.108", "COST_108", "DELAY_108", 10], [104, "EDP.18", "FRAG.108", "COST_108", "DELAY_108", 10], [105, "EDP.20", "FRAG.108", "COST_108", "DELAY_108", 10], [106, "EDP.01", "FRAG.214", "COST_214", "DELAY_214", 10], [107, "EDP.03", "FRAG.214", "COST_214", "DELAY_214", 10], [108, "EDP.05", "FRAG.214", "COST_214", "DELAY_214", 10], [109, "EDP.07", "FRAG.214", "COST_214", "DELAY_214", 10], [110, "EDP.09", "FRAG.214", "COST_214", "DELAY_214", 10], [111, "EDP.11", "FRAG.214", "COST_214", "DELAY_214", 10], [112, "EDP.13", "FRAG.214", "COST_214", "DELAY_214", 10], [113, "EDP.15", "FRAG.214", "COST_214", "DELAY_214", 10], [114, "EDP.17", "FRAG.214", "COST_214", "DELAY_214", 10], [115, "EDP.19", "FRAG.214", "COST_214", "DELAY_214", 10], ] building = pyslat.structure("building") building.setRebuildCost( pyslat.MakeLogNormalDist(14e6, pyslat.LOGNORMAL_MU_TYPE.MEAN_X, 0.35, pyslat.LOGNORMAL_SIGMA_TYPE.SD_LN_X) ) building.setRebuildCost( pyslat.MakeLogNormalDist(14e6, pyslat.LOGNORMAL_MU_TYPE.MEAN_X, 0.35, pyslat.LOGNORMAL_SIGMA_TYPE.SD_LN_X) ) building.setDemolitionCost( pyslat.MakeLogNormalDist(14e6, pyslat.LOGNORMAL_MU_TYPE.MEAN_X, 0.35, pyslat.LOGNORMAL_SIGMA_TYPE.SD_LN_X) ) for comp in COMPONENT_DATA: id = comp[0] edp = comp[1] frag = comp[2] cost = comp[3] delay = comp[4]