Log In | Get Help   
Home My Page Projects Code Snippets Project Openings BonFIRE VCOC Demonstration Kit
Summary Activity SCM Files Wiki
[bonfiredemokit] Annotation of /ea/submit_file.py
[bonfiredemokit] / ea / submit_file.py Repository:
ViewVC logotype

Annotation of /ea/submit_file.py

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1 - (view) (download) (as text)

1 : agomez 1 '''
2 :     Created on 20/03/2012
3 :    
4 :     @author: R. Valin
5 :     '''
6 :    
7 :     #import matplotlib.pyplot as plt
8 :     import time
9 :     import json
10 :     import os
11 :     import sys
12 :     import random
13 :     #from exp.ea
14 :     #import experiment_type as expt
15 :     #from exp.ea
16 :     import ea_bonfire as ea
17 :    
18 :    
19 :     #print 'Ruta completa del Json que define experimento:'
20 :     #filej=raw_input()
21 :     if len(sys.argv) < 2:
22 :     sys.stderr.write('A JSON file is needed')
23 :     #sys.stderr.write('Usage: sys.argv[0] ')
24 :     sys.exit(1)
25 :    
26 :     filej="../examples/"+sys.argv[1]
27 :     if not os.path.exists(filej):
28 :     sys.stderr.write('ERROR: file '+filej+ 'does not exist!')
29 :     sys.exit(1)
30 :    
31 :     print '----------------'
32 :     print 'Json PATH:',filej
33 :     print '----------------'
34 :    
35 :     if os.path.exists(filej):
36 :     jsonf=open(filej, 'r')
37 :     exper=json.loads(jsonf.read())
38 :     print exper
39 :     jsonf.close()
40 :     else:
41 :     print "File doesn't exist"
42 :    
43 :    
44 :     #duration = 120
45 :     multi = 5
46 :    
47 :     #for i in exp:
48 :     # print i
49 :     # m=str(i)
50 :     j=0
51 :     while j < multi:
52 :     #save(locations)
53 :     #location=info_location[m]
54 :     #instance=info_instance[m]
55 :     #store=info_storage[m]
56 :     print 'Repetition before ea:', j
57 :     j=ea.ea_bf(exper,j)
58 :     j=j+1
59 :     #time.sleep(float(130))
60 :    
61 :    
62 :    

root@forge.cesga.es
ViewVC Help
Powered by ViewVC 1.0.0  

Powered By FusionForge