예제 #1
0
def simulate(devs, duration, simu_name, is_remote):

    from SimulationNoGUI import makeSimulation

    if str(duration) in ('inf', 'ntl'):
        __builtin__.__dict__['NTL'] = True
        duration = 0.0

    ### launch simulation
    makeSimulation(devs, duration, simu_name, is_remote, True)
예제 #2
0
def simulate(devs, duration, simu_name, is_remote):

	from SimulationNoGUI import makeSimulation

	if str(duration) in ('inf', 'ntl'):
		__builtin__.__dict__['NTL'] = True
		duration = 0.0

	### launch simulation
	makeSimulation(devs, duration, simu_name, is_remote, True)
예제 #3
0
 	import gettext
 	_ = gettext.gettext

 	#sys.stdout.write(_("DEVSimPy - version %s\n"%__version__ ))
 	l=len(sys.argv)

	if l == 2:

		### check dsp filename
		filename = sys.argv[1]
		if not os.path.exists(filename):
			sys.stderr.write(_('ERROR: Unspecified devsimpy file!\n'))
			sys.exit()

		### launch simulation
		makeSimulation(filename, T = 10.0)

	elif l == 3:
		### check time
		arg1 = sys.argv[2]

		if str(arg1) in ('-js','-javascript'):

			### check dsp filename
			filename = sys.argv[1]
			if not os.path.exists(filename):
				sys.stderr.write(_('ERROR: Unspecified devsimpy file!\n'))
				sys.exit()
			else:
				### launch JS file generation
				makeJS(filename)
예제 #4
0
if __name__ == '__main__':

    import gettext
    _ = gettext.gettext

    sys.stdout.write(_("DEVSimPy - version %s\n" % __version__))

    if len(sys.argv) == 2:
        ### check dsp filename
        filename = sys.argv[1]
        if not os.path.exists(filename):
            sys.stderr.write(_('ERROR: Unspecified .dsp file!\n'))
            sys.exit()

        ### launch simulation
        makeSimulation(filename, T=10.0)

    elif len(sys.argv) == 3:
        ### check dsp filename
        filename = sys.argv[1]
        if not os.path.exists(filename):
            sys.stderr.write(_('ERROR: Unspecified .dsp file!\n'))
            sys.exit()

        ### check time
        time = sys.argv[2]

        if str(time) in ('-js', '-javascript'):
            ### launch JS generation
            makeJS(filename)
예제 #5
0
if __name__ == '__main__':

 	import gettext
 	_ = gettext.gettext

 	sys.stdout.write(_("DEVSimPy - version %s\n"%__version__ ))

	if len(sys.argv) == 2:
		### check dsp filename
		filename = sys.argv[1]
		if not os.path.exists(filename):
			sys.stderr.write(_('ERROR: Unspecified .dsp file!\n'))
			sys.exit()

		### launch simulation
		makeSimulation(filename, T = 10.0)

	elif len(sys.argv) == 3:
		### check dsp filename
		filename = sys.argv[1]
		if not os.path.exists(filename):
			sys.stderr.write(_('ERROR: Unspecified .dsp file!\n'))
			sys.exit()

		### check time
		time = sys.argv[2]

		if str(time) in ('-js','-javascript'):
			### launch JS generation
			makeJS(filename)