Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-WIC-Cnf
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
3
Issues
3
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
CommunityXG
OpenXG-WIC-Cnf
Commits
3c6c46d5
Commit
3c6c46d5
authored
Aug 23, 2020
by
Hu Jintao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
调整参数
parent
8f16ab39
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
1 deletion
+38
-1
apps/cnf-path-computing/businessInCloud/src/main/java/top/ninwoo/test/BisheTestMain.java
...sInCloud/src/main/java/top/ninwoo/test/BisheTestMain.java
+35
-0
apps/cnf-path-computing/businessInCloud/src/main/java/top/ninwoo/test/doMap/DoMap.java
...essInCloud/src/main/java/top/ninwoo/test/doMap/DoMap.java
+3
-1
No files found.
apps/cnf-path-computing/businessInCloud/src/main/java/top/ninwoo/test/BisheTestMain.java
View file @
3c6c46d5
...
...
@@ -54,6 +54,11 @@ public class BisheTestMain implements ApplicationRunner {
System
.
out
.
println
();
// 输入:
//子任务依赖关系 边
int
[][]
link
=
{{
0
,
0
,
1
,
2
,
3
,
4
,
5
},
{
1
,
2
,
3
,
4
,
5
,
5
,
6
}};
//task编号
int
[]
func
=
{
1
,
3
,
3
,
3
,
2
,
2
,
4
};
DoMap
doMap
=
new
DoMap
();
doMap
.
doMapApp
();
...
...
@@ -69,6 +74,36 @@ public class BisheTestMain implements ApplicationRunner {
)
{
sequence
.
add
(
a
);
}
//边映射结果T2
int
[][]
edgeMaps
=
new
int
[
2
][
link
[
0
].
length
];
edgeMaps
[
0
][
0
]
=
2
;
for
(
int
tm
=
0
;
tm
<
link
[
0
].
length
;
tm
++){
//第一列为边起点,第二列为边终点
edgeMaps
[
0
][
tm
]
=
result
[
link
[
0
][
tm
]];
edgeMaps
[
1
][
tm
]
=
result
[
link
[
1
][
tm
]];
}
//节点映射结果T1
HashMap
<
Integer
,
Integer
>
nodeMaps
=
new
HashMap
();
nodeMaps
.
put
(
1
,
func
[
0
]);
for
(
int
tm
=
0
;
tm
<
link
[
0
].
length
;
tm
++){
if
(!
nodeMaps
.
containsKey
(
result
[
link
[
1
][
tm
]])){
//key值为节点映射卫星编号,value值为图像处理功能编号
nodeMaps
.
put
(
result
[
link
[
1
][
tm
]],
func
[
link
[
1
][
tm
]]);
}
}
int
[][]
lastHop
=
doMap
.
lastHop
;
//将路由结果保存
Stack
[]
route
=
doMap
.
route
;
int
routeNumber
=
0
;
...
...
apps/cnf-path-computing/businessInCloud/src/main/java/top/ninwoo/test/doMap/DoMap.java
View file @
3c6c46d5
...
...
@@ -87,6 +87,8 @@ public class DoMap {
public
static
long
startT
;
//传输时延约束
public
static
LinkedList
<
Double
>
list
=
new
LinkedList
<>();
//路由表
public
static
int
[][]
lastHop
;
public
static
void
doMapApp
()
{
...
...
@@ -142,7 +144,7 @@ public class DoMap {
route
[
i
]
=
new
Stack
<
Integer
>();
}
//3根据分配结果,回溯每一条路由
int
[][]
lastHop
=
pathRecord
.
lastHop
;
lastHop
=
pathRecord
.
lastHop
;
for
(
int
i
=
0
;
i
<
link
[
0
].
length
;
i
++){
int
start
=
best_par
.
taskfinal
[
link
[
0
][
i
]];
int
end
=
best_par
.
taskfinal
[
link
[
1
][
i
]];
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment