예제 #1
0
def buildRiskObstacleModel(p, apName, envName, graphName):
    from cairis.legacy.kaosxdot import KaosXDotParser
    from cairis.legacy.KaosModel import KaosModel
    assocs = p.riskObstacleModel(apName, envName)
    model = KaosModel(list(assocs.values()), envName, 'obstacle', apName)
    parser = KaosXDotParser('obstacle', model.graph())
    graph = parser.parse()
    drawGraph(graph, graphName)
    return True
예제 #2
0
def buildComponentGoalModel(p, cName, graphName):
    from cairis.legacy.kaosxdot import KaosXDotParser
    from cairis.legacy.KaosModel import KaosModel
    assocs = p.componentGoalModel(cName)
    model = KaosModel(list(assocs.values()), '', 'template_goal')
    parser = KaosXDotParser('goal', model.graph())
    graph = parser.parse()
    drawGraph(graph, graphName)
    return True