1 | #module imports
|
---|
2 | from fielddisplay import fielddisplay
|
---|
3 |
|
---|
4 | class flaim:
|
---|
5 | #properties
|
---|
6 | def __init__(self):
|
---|
7 | # {{{ Properties
|
---|
8 | self.targets = ''
|
---|
9 | self.tracks = ''
|
---|
10 | self.flightreqs = {}
|
---|
11 | self.criterion = float('NaN')
|
---|
12 | self.gridsatequator = 200000
|
---|
13 | self.usevalueordering = True
|
---|
14 | self.split_antimeridian = True
|
---|
15 | self.solution = ''
|
---|
16 | self.quality = 0
|
---|
17 | self.path_optimize = False
|
---|
18 | self.opt_ndir = 1
|
---|
19 | self.opt_dist = 25
|
---|
20 | self.opt_niter = 30000
|
---|
21 | #}}}
|
---|
22 | def __repr__(obj):
|
---|
23 | # {{{ Displa
|
---|
24 | string=' FLAIM - Flight Line Adaptation using Ice sheet Modeling:'
|
---|
25 |
|
---|
26 | string="%s\n\n%s"%(string,' Input:')
|
---|
27 | string="%s\n%s"%(string,fielddisplay(obj,'targets' ,'name of kml output targets file '))
|
---|
28 | string="%s\n%s"%(string,fielddisplay(obj,'tracks' ,'name of kml input tracks file '))
|
---|
29 | string="%s\n%s"%(string,fielddisplay(obj,'flightreqs' ,'structure of kml flight requirements (not used yet)'))
|
---|
30 | string="%s\n%s"%(string,fielddisplay(obj,'criterion' ,'element or nodal criterion for flight path evaluation (metric)'))
|
---|
31 |
|
---|
32 | string="%s\n\n%s"%(string,' Arguments:')
|
---|
33 | string="%s\n%s"%(string,fielddisplay(obj,'gridsatequator' ,'number of grids at equator (determines resolution)'))
|
---|
34 | string="%s\n%s"%(string,fielddisplay(obj,'usevalueordering' ,'flag to consider target values for flight path evaluation'))
|
---|
35 | string="%s\n%s"%(string,fielddisplay(obj,'split_antimeridian' ,'flag to split polygons on the antimeridian'))
|
---|
36 |
|
---|
37 | string="%s\n\n%s"%(string,' Optimization:')
|
---|
38 | string="%s\n%s"%(string,fielddisplay(obj,'path_optimize' ,'optimize? (default false)'))
|
---|
39 | string="%s\n%s"%(string,fielddisplay(obj,'opt_ndir' ,['number of directions to test when moving a point. If this value = 1, a random direction is tested.',\
|
---|
40 | 'A value > 1 results in directions equally spaced from [0, 2*PI] being tested.',\
|
---|
41 | 'For example, 4 would result in directions [0, PI/2, PI, 3PI/2].']))
|
---|
42 | string="%s\n%s"%(string,fielddisplay(obj,'opt_dist' ,'specifies the distance in km (default 25) to move a randomly selected path point on each iteration'))
|
---|
43 | string="%s\n%s"%(string,fielddisplay(obj,'opt_niter' ,['number of iterations (default 30,000) to run for flightplan optimization',\
|
---|
44 | 'i.e. the number of times to randomly select a point and move it.']))
|
---|
45 |
|
---|
46 | string="%s\n\n%s"%(string,' Output:')
|
---|
47 | string="%s\n%s"%(string,fielddisplay(obj,'solution' ,'name of kml solution file'))
|
---|
48 | string="%s\n%s"%(string,fielddisplay(obj,'quality' ,'quality of kml solution'))
|
---|
49 | return string
|
---|
50 | #}}}
|
---|