Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
Distributed Computing and Network Fusion System
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
WirelessInformationCollaborate
Distributed Computing and Network Fusion System
Commits
35fefb35
Commit
35fefb35
authored
Sep 05, 2020
by
Elf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
csv修改
parent
fb743ae8
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
11 deletions
+18
-11
apps/cnf-path-computing/businessInCloud/src/main/java/top/ninwoo/test/CsvMerge/Wteg.java
...sInCloud/src/main/java/top/ninwoo/test/CsvMerge/Wteg.java
+18
-11
No files found.
apps/cnf-path-computing/businessInCloud/src/main/java/top/ninwoo/test/CsvMerge/Wteg.java
View file @
35fefb35
...
@@ -3,6 +3,7 @@ package top.ninwoo.test.CsvMerge;
...
@@ -3,6 +3,7 @@ package top.ninwoo.test.CsvMerge;
import
top.ninwoo.test.doMap.DoMap
;
import
top.ninwoo.test.doMap.DoMap
;
import
java.text.ParseException
;
import
java.text.SimpleDateFormat
;
import
java.text.SimpleDateFormat
;
import
java.util.Arrays
;
import
java.util.Arrays
;
import
java.util.Date
;
import
java.util.Date
;
...
@@ -15,33 +16,39 @@ public class Wteg {
...
@@ -15,33 +16,39 @@ public class Wteg {
* 先用SimpleDateFormat.parse() 方法将日期字符串转化为Date格式
* 先用SimpleDateFormat.parse() 方法将日期字符串转化为Date格式
* 通过Date.getTime()方法,将其转化为毫秒数
* 通过Date.getTime()方法,将其转化为毫秒数
*/
*/
public
static
double
[][]
getWteg
()
{
public
static
double
[][]
getWteg
()
throws
ParseException
{
//传输时间参数
//传输时间参数
String
str
;
String
str
;
String
str1
;
String
str1
;
String
str2
;
String
str2
;
//可在这里修改时间
//todo 应该放在yaml文件中
String
dateInput
=
"5-00-00"
;
long
time
;
//测试时间
//测试时间
/*str = ReadFile.date+" 5-00-00";
str
=
ReadFile
.
date
+
" "
+
dateInput
;
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH-mm-ss"
);
Date
current1
=
new
Date
(
sdf
.
parse
(
str
).
getTime
()+
(
long
)
DoMap
.
slot
);
Date
current2
=
new
Date
(
current1
.
getTime
()+
(
long
)
DoMap
.
slot
);
//
str1
=
sdf
.
format
(
current1
);
str2
=
sdf
.
format
(
current2
);
//产生三个时隙
int
[][]
topo
=
TopoRequire
(
str
);
int
[][]
topo
=
TopoRequire
(
str
);
str1 = ReadFile.date+" 5-00-20";
int
[][]
topo1
=
TopoRequire
(
str1
);
int
[][]
topo1
=
TopoRequire
(
str1
);
str2 = ReadFile.date+" 5-00-40";
int
[][]
topo2
=
TopoRequire
(
str2
);
int[][] topo2 = TopoRequire(str2);*/
//动态获取当前时间topo
//动态获取当前时间topo
Date
current
=
new
Date
();
/*
Date current = new Date();
Date current1 = new Date(current.getTime()+ (long)DoMap.slot);
Date current1 = new Date(current.getTime()+ (long)DoMap.slot);
Date current2 = new Date(current1.getTime()+ (long)DoMap.slot);
Date current2 = new Date(current1.getTime()+ (long)DoMap.slot);
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH-mm-ss");
"yyyy-MM-dd HH-mm-ss"
);
str = sdf.format(current);
str = sdf.format(current);
str1 = sdf.format(current1);
str1 = sdf.format(current1);
str2 = sdf.format(current2);
str2 = sdf.format(current2);
int[][] topo = TopoRequire(str);
int[][] topo = TopoRequire(str);
int[][] topo1 = TopoRequire(str1);
int[][] topo1 = TopoRequire(str1);
int
[][]
topo2
=
TopoRequire
(
str2
);
int[][] topo2 = TopoRequire(str2);*/
//获得单时隙连接矩阵 0或MAXWEIGHT
//获得单时隙连接矩阵 0或MAXWEIGHT
//等待下一时隙开始执行业务
//等待下一时隙开始执行业务
...
...
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