Example #1
0
 def executeMonitorPlots (self):
     self.printSep()
     print "- Generating graph files"
     for each in self.monitorPlots:
         fileName = each + " series - Seed " + str(self.seed) + ".ps"
         plot = SimPlot ()
         pl = plot.plotLine (self.monitorPlots[each], color="blue",width=2)
         pl.postscr(fileName)
         print "Graph file created\t:\t " + fileName
Example #2
0
            edge = [ind, rod]
            self.EdgeList.append(edge)

        self.EdgeList = dict(self.EdgeList)

    def channelOn(self, chn):
        self.EdgeList[chn].color = v.color.red

    def channelOff(self, chn):
        self.EdgeList[chn].color = v.color.green


initialize()
Net = Network()
if G.vis_on: V = Vis()
for N in Net.Nodes:
    N.initCounterparts()
    N.activate()
simulate(until=G.max_time)
print 'Sim Finished, Visualising graphs...'

if not G.vis_on:
    plt = SimPlot()
    plt2 = SimPlot()
    plt2.plotLine(Net.waitQMon)
    plt.plotLine(Net.activeQMon)
    plt.mainloop()

#nx.draw(Net.graph_plan)
#plt.show()
Example #3
0
# Prog1.py
from SimPy.SimPlot import *
plt = SimPlot()
plt.plotLine([[0, 0], [1, 1], [2, 4], [3, 9]])
plt.mainloop()
Example #4
0
    def MyXYPlot(X, Y):

        Z = zip(X, Y)
        plt = SimPlot()
        plt.plotLine(Z)
        plt.mainloop()
Example #5
0
 def plotLine (self,monitor):
     SimPlot().plotLine (monitor).mainloop()
Example #6
0
# AdvancedAPI.py
from SimPy.SimPlot import *
plt = SimPlot()  # step 1
plt.root.title("Advanced API example")  # step 3
line = plt.makeLine([[0, 42], [1, 1], [4, 16]])  # step 4
bar = plt.makeBars([[0, 42], [1, 1], [4, 16]], color='blue')  # step 4
sym = plt.makeSymbols([[1, 1]], marker="triangle", size=3,
                      fillcolor="red")  # step 4
obj = plt.makeGraphObjects([line, bar, sym])  # step 5
frame = Frame(plt.root)  # step 6
graph = plt.makeGraphBase(frame, 500, 300, title="Line and bars")  # step 7
graph.pack()  # step 8
graph.draw(obj)  # step 9
frame.pack()  # step 10
graph.postscr()  # step 11
plt.mainloop()  # step 12