In [ ]:
import Match
import os
from matplotlib import pyplot as plt
%matplotlib inline
In [ ]:
_ = reload(Match)
mcf = Match.MatchConfFile("teste.conf")
In [ ]:
_ = mcf.setSeries(1, "LR04core")
_ = mcf.setSeries(2, "LR04core")
In [ ]:
mcf.generateSpeeds(1, 5)
In [ ]:
mcf.nomatch = 1.0
mcf.speedpenalty = 1.0
mcf.targetspeed = "1:1"
mcf.speedchange = 1.0
mcf.tiepenalty = 1.0
mcf.gappenalty = 1.0
In [ ]:
mcf.report()
In [ ]:
mcf.guessParameters().report()
In [ ]:
tfile = Match.Tie("new_tie")
tfile.set_tie(1500, 1400, label="A")
tfile.set_tie(1700, 1600, label="B")
tfile.save()
mcf.tiefile = "new_tie"
In [ ]:
sa = mcf.getSeries(1)
sa.plot()
In [ ]:
sb = mcf.getSeries(2)
sb.plot()
In [ ]:
mcf.save()
In [ ]:
mcf.saveas("teste2.conf")
In [ ]:
mcf = Match.MatchConfFile("teste.conf")
mcf.report()
In [ ]:
mcf.optimize("speedchange", [0.0, 5.0, 10.])
In [ ]:
mcf.run()
In [ ]:
plt.figure(figsize=(20,10))
mcf.getSeries(1).plotcomp(mcf.getSeries(2))
In [ ]:
mcf.clean()
In [ ]:
os.unlink("teste.conf")
os.unlink("teste2.conf")
os.unlink("new_tie")