Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
droplet-sequence-generator
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Peter Wagenhuber
droplet-sequence-generator
Commits
bb5b389b
Commit
bb5b389b
authored
7 years ago
by
Peter Wagenhuber
Browse files
Options
Downloads
Patches
Plain Diff
berechnung der position sollte jetzt stimmen. fixes #5
parent
18c0e534
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/Nloc.java
+21
-9
21 additions, 9 deletions
src/Nloc.java
src/TestNloc.java
+1
-1
1 addition, 1 deletion
src/TestNloc.java
with
22 additions
and
10 deletions
src/Nloc.java
+
21
−
9
View file @
bb5b389b
...
...
@@ -29,6 +29,16 @@ public class Nloc {
possibleSequences
.
sort
((
a
,
b
)
->
a
.
size
()
-
b
.
size
());
List
<
SequenceTuple
>
currentSeq
=
possibleSequences
.
get
(
0
);
//for (SequenceTuple seqTup: currentSeq) {
// System.out.println("Droplet: " + seqTup.getDroplet().getName() + " Minpos: " + seqTup.getMinPos() + " Maxpos: " + seqTup.getMaxPos());
// System.out.print("Path: ");
// List<Channel> dropletpath = seqTup.getPath();
// for (Channel ch: dropletpath) {
// System.out.print(" ch: " + ch.getName() + " len: " + ch.getHSteps());
// }
// System.out.println("");
//}
//System.out.println("");
int
min
=
0
,
max
=
0
;
for
(
SequenceTuple
stl:
currentSeq
)
{
...
...
@@ -39,9 +49,7 @@ public class Nloc {
int
span
=
max
-
min
;
pump
.
setSteps
(
span
);
possibleSequences
=
setTuplePumpoffsetToPumpPosition
(
possibleSequences
,
min
);
currentSeq
=
possibleSequences
.
get
(
0
);
currentSeq
=
setTuplePumpoffsetToPumpPosition
(
currentSeq
,
min
);
List
<
Droplet
>
dropletSequence
=
generateDropletListRecursive
(
new
ArrayList
<
Droplet
>(),
currentSeq
,
currentSeq
.
get
(
0
).
getMinPos
());
...
...
@@ -53,19 +61,23 @@ public class Nloc {
return
pump
;
}
public
List
<
List
<
SequenceTuple
>>
setTuplePumpoffsetToPumpPosition
(
List
<
List
<
SequenceTuple
>>
possibleSequences
,
int
minOffset
)
{
/*
* TODO: comment on the parameters of the function
*
*/
public
List
<
SequenceTuple
>
setTuplePumpoffsetToPumpPosition
(
List
<
SequenceTuple
>
currentSequence
,
int
minOffset
)
{
for
(
List
<
SequenceTuple
>
stl:
possible
Sequence
s
)
{
for
(
SequenceTuple
stup:
stl
)
{
//
for (List<SequenceTuple> stl:
current
Sequence) {
for
(
SequenceTuple
stup:
currentSequence
)
{
int
pumpOffsetMin
=
stup
.
getMinPos
();
stup
.
setMinPos
(
pumpOffsetMin
+
Math
.
abs
(
minOffset
));
int
pumpOffsetMax
=
stup
.
getMaxPos
();
stup
.
setMaxPos
(
pumpOffsetMax
+
Math
.
abs
(
minOffset
));
}
}
return
possible
Sequence
s
;
//
}
return
current
Sequence
;
}
public
List
<
Droplet
>
generateDropletListRecursive
(
...
...
This diff is collapsed.
Click to expand it.
src/TestNloc.java
+
1
−
1
View file @
bb5b389b
...
...
@@ -39,8 +39,8 @@ public class TestNloc {
}
else
{
System
.
out
.
print
(
" | "
);
}
System
.
out
.
println
(
""
);
}
System
.
out
.
println
(
""
);
}
public
static
String
[]
extractModuleStringArrayFromPath
(
List
<
Channel
>
path
)
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment