Revision 63:de89c1ff4fca

View differences:

src/main/java/tt/jointeuclid2ni/probleminstance/generator/ConflictGenerator.java
69 69
    private DirectedGraph<Point, Line>[] createGraphs(Environment environment, int[] bodyRadiuses, int[][] gridPattern, int step) {
70 70
        final DirectedGraph<Point, Line>[] directedGraphs = new DirectedGraph[agents];
71 71

  
72
        VisManager.setInitParam("", 100, 100);
73
        VisManager.init();
74
        VisManager.registerLayer(ColorLayer.create(Color.WHITE));
72
//        VisManager.setInitParam("", 100, 100);
73
//        VisManager.init();
74
//        VisManager.registerLayer(ColorLayer.create(Color.WHITE));
75 75

  
76 76
        for (int a = 0; a < agents; a++) {
77 77
            directedGraphs[a] = Discretization.createGrid(environment, bodyRadiuses[a], gridPattern, step);
78 78

  
79

  
80
            final DirectedGraph<Point, Line> graph = directedGraphs[a];
81
            VisManager.registerLayer(GraphLayer.create(new GraphProvider() {
82
				@Override
83
				public Graph getGraph() {
84
					return graph;
85
				}
86
			}, new tt.euclid2i.vis.ProjectionTo2d(), Color.BLACK, Color.BLACK, 1, 4));
79
//            final DirectedGraph<Point, Line> graph = directedGraphs[a];
80
//            VisManager.registerLayer(GraphLayer.create(new GraphProvider() {
81
//				@Override
82
//				public Graph getGraph() {
83
//					return graph;
84
//				}
85
//			}, new tt.euclid2i.vis.ProjectionTo2d(), Color.BLACK, Color.BLACK, 1, 4));
87 86

  
88 87
        }
89 88
        return directedGraphs;
src/main/resources/environments/urbanC-bounded.xml
1
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
<multiagentproblem>
3
<environment>
4
<obstacles>
5

  
6
<obstacle>
7
<point id="0">
8
<x>-1</x>
9
<y>-1</y>
10
</point>
11
<point id="1">
12
<x>1001</x>
13
<y>-1</y>
14
</point>
15
<point id="2">
16
<x>1001</x>
17
<y>-50</y>
18
</point>
19
<point id="3">
20
<x>-1</x>
21
<y>-50</y>
22
</point>
23
</obstacle>
24

  
25
<obstacle>
26
<point id="0">
27
<x>-1</x>
28
<y>-50</y>
29
</point>
30
<point id="1">
31
<x>-50</x>
32
<y>-50</y>
33
</point>
34
<point id="2">
35
<x>-50</x>
36
<y>1050</y>
37
</point>
38
<point id="3">
39
<x>-1</x>
40
<y>1050</y>
41
</point>
42
</obstacle>
43

  
44
<obstacle>
45
<point id="0">
46
<x>-1</x>
47
<y>1001</y>
48
</point>
49
<point id="1">
50
<x>-1</x>
51
<y>1050</y>
52
</point>
53
<point id="2">
54
<x>1001</x>
55
<y>1050</y>
56
</point>
57
<point id="3">
58
<x>1001</x>
59
<y>1001</y>
60
</point>
61
</obstacle>
62

  
63
<obstacle>
64
<point id="0">
65
<x>1001</x>
66
<y>1050</y>
67
</point>
68
<point id="1">
69
<x>1050</x>
70
<y>1050</y>
71
</point>
72
<point id="2">
73
<x>1050</x>
74
<y>-50</y>
75
</point>
76
<point id="3">
77
<x>1001</x>
78
<y>-50</y>
79
</point>
80
</obstacle>
81

  
82
<obstacle>
83
<point id="0">
84
<x>194</x>
85
<y>157</y>
86
</point>
87
<point id="1">
88
<x>196</x>
89
<y>388</y>
90
</point>
91
<point id="2">
92
<x>346</x>
93
<y>391</y>
94
</point>
95
<point id="3">
96
<x>345</x>
97
<y>158</y>
98
</point>
99
</obstacle>
100
<obstacle>
101
<point id="0">
102
<x>196</x>
103
<y>598</y>
104
</point>
105
<point id="1">
106
<x>345</x>
107
<y>598</y>
108
</point>
109
<point id="2">
110
<x>346</x>
111
<y>753</y>
112
</point>
113
<point id="3">
114
<x>196</x>
115
<y>751</y>
116
</point>
117
</obstacle>
118
<obstacle>
119
<point id="0">
120
<x>641</x>
121
<y>49</y>
122
</point>
123
<point id="1">
124
<x>639</x>
125
<y>202</y>
126
</point>
127
<point id="2">
128
<x>790</x>
129
<y>202</y>
130
</point>
131
<point id="3">
132
<x>794</x>
133
<y>49</y>
134
</point>
135
</obstacle>
136
<obstacle>
137
<point id="0">
138
<x>639</x>
139
<y>411</y>
140
</point>
141
<point id="1">
142
<x>639</x>
143
<y>564</y>
144
</point>
145
<point id="2">
146
<x>792</x>
147
<y>566</y>
148
</point>
149
<point id="3">
150
<x>792</x>
151
<y>412</y>
152
</point>
153
</obstacle>
154
<obstacle>
155
<point id="0">
156
<x>639</x>
157
<y>775</y>
158
</point>
159
<point id="1">
160
<x>639</x>
161
<y>925</y>
162
</point>
163
<point id="2">
164
<x>791</x>
165
<y>927</y>
166
</point>
167
<point id="3">
168
<x>792</x>
169
<y>776</y>
170
</point>
171
</obstacle>
172
</obstacles>
173
<bounds>
174
<point>
175
<x>0</x>
176
<y>0</y>
177
</point>
178
<point>
179
<x>1000</x>
180
<y>1000</y>
181
</point>
182
</bounds>
183
</environment>
184
<agents/>
185
</multiagentproblem>

Also available in: Unified diff