Hello. There are thousands of text files on hand. There are various data in these files. I need to operate this data in a computer program. But the data in these files is not in the format I want. I want to read the text file contents in order and write a code that will change the contents of the data in the desired data format and save it. I'm glad you helped me.
The format of the ready data:
<number of tasks>
83
<cycle time>
4732
<task times>
1 1673
2 985
3 1836
<precedence relations>
1,2
2,3
2,4
<number of task attributes>
1
<task attribute values>
1,1:70
2,1:6
4,1:16
<attribute bounds per station>
1:100
<linked tasks>
7,11
15,20
<incompatible tasks>
1,81
2,18
Required format:
Nbtasks = 83;
cycleTime = 4732;
taskTime = [1673, 985, 1836];
numberOftaskAttributes = 1;
attributeBounds = {<1,100>};
Precedences = {<1,2>, <2,3>, <2,4>};
taskAttribute ={<1,1,70>, <2,1,60>, <4,1,16>};
Linked = {<7,11>, <15,20>};
Incompatibles = {<1,81>, <2,18>};
Thank you very much for your interest in advance.
The format of the ready data:
<number of tasks>
83
<cycle time>
4732
<task times>
1 1673
2 985
3 1836
<precedence relations>
1,2
2,3
2,4
<number of task attributes>
1
<task attribute values>
1,1:70
2,1:6
4,1:16
<attribute bounds per station>
1:100
<linked tasks>
7,11
15,20
<incompatible tasks>
1,81
2,18
Required format:
Nbtasks = 83;
cycleTime = 4732;
taskTime = [1673, 985, 1836];
numberOftaskAttributes = 1;
attributeBounds = {<1,100>};
Precedences = {<1,2>, <2,3>, <2,4>};
taskAttribute ={<1,1,70>, <2,1,60>, <4,1,16>};
Linked = {<7,11>, <15,20>};
Incompatibles = {<1,81>, <2,18>};
Thank you very much for your interest in advance.