Dateien nach "mod/butadien" hochladen
This commit is contained in:
parent
756826ac0e
commit
f8c5f76531
@ -22,6 +22,34 @@ butadien = Graph.fromGMLString("""graph [
|
||||
edge [ source 3 target 9 label "-" ]
|
||||
]""", name="Butadien")
|
||||
|
||||
pentadien = Graph.fromGMLString("""graph [
|
||||
node [ id 0 label "C" ]
|
||||
node [ id 1 label "C" ]
|
||||
node [ id 2 label "C" ]
|
||||
node [ id 3 label "C" ]
|
||||
node [ id 4 label "H" ]
|
||||
node [ id 5 label "H" ]
|
||||
node [ id 6 label "H" ]
|
||||
node [ id 7 label "H" ]
|
||||
node [ id 8 label "H" ]
|
||||
node [ id 9 label "C" ]
|
||||
node [ id 10 label "H" ]
|
||||
node [ id 11 label "H" ]
|
||||
node [ id 12 label "H" ]
|
||||
edge [ source 0 target 1 label "=" ]
|
||||
edge [ source 1 target 2 label "-" ]
|
||||
edge [ source 2 target 3 label "=" ]
|
||||
edge [ source 0 target 4 label "-" ]
|
||||
edge [ source 0 target 5 label "-" ]
|
||||
edge [ source 1 target 6 label "-" ]
|
||||
edge [ source 2 target 7 label "-" ]
|
||||
edge [ source 3 target 8 label "-" ]
|
||||
edge [ source 3 target 9 label "-" ]
|
||||
edge [ source 9 target 10 label "-" ]
|
||||
edge [ source 9 target 11 label "-" ]
|
||||
edge [ source 9 target 12 label "-" ]
|
||||
]""", name="Pentadien")
|
||||
|
||||
restswap = Rule.fromGMLString(
|
||||
"""rule [
|
||||
left [
|
||||
@ -83,7 +111,7 @@ dg = DG(graphDatabase=inputGraphs)
|
||||
dg.build().execute(
|
||||
addSubset(inputGraphs)
|
||||
>> rightPredicate[
|
||||
lambda d: all(g.vLabelCount("C") <= 8 for g in d.right)
|
||||
lambda d: all(g.vLabelCount("C") <= 6 for g in d.right)
|
||||
](
|
||||
repeat(revive(inputRules)) #Revive not necessary
|
||||
)
|
||||
@ -95,7 +123,7 @@ for a in dg.vertices:
|
||||
a.graph.print()
|
||||
|
||||
flowAutocata = Flow(dg)
|
||||
flowAutocata.addSource(butadien)
|
||||
flowAutocata.addSource(pentadien)
|
||||
flowAutocata.findSolutions()
|
||||
flowAutocata.solutions.list()
|
||||
flowAutocata.solutions.print(flowPrinter)
|
||||
|
||||
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user