Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Simonstrator
PeerfactSim.KOM
Commits
695ccd86
Commit
695ccd86
authored
Apr 04, 2019
by
Julian Zobel
Browse files
rm sysout
parent
b0f47b3a
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/de/tud/kom/p2psim/impl/energy/components/StatelessMotorComponent.java
View file @
695ccd86
...
...
@@ -99,8 +99,6 @@ public class StatelessMotorComponent implements EnergyComponent {
double
cons
=
calculateEnergyConsumation
(
energyState
,
timeSpentInState
);
System
.
out
.
println
(
"consumed energy : "
+
(
cons
/
uJconversionFactor
)
+
" in "
+
Time
.
getFormattedTime
(
timeSpentInState
));
energyModel
.
componentConsumedEnergy
(
this
,
cons
);
// set new state
...
...
@@ -126,9 +124,7 @@ public class StatelessMotorComponent implements EnergyComponent {
else
{
approximateThrustCurrentRelation
(
targetThrust
);
}
System
.
out
.
println
(
"Now providing Thrust: "
+
this
.
thrust
+
" N"
);
return
this
.
thrust
;
}
...
...
@@ -175,12 +171,9 @@ public class StatelessMotorComponent implements EnergyComponent {
* Calculate the approximated current with the upper and lower bounds:
* Amp_approx = Amp_lower + (T_target - T_lower)/(T_upper - T_lower) * (Amp_upper - Amp_lower)
*/
double
delta
=
(
targetThrust
-
lower
.
getThrust
())/(
upper
.
getThrust
()
-
lower
.
getThrust
());
double
delta
=
(
targetThrust
-
lower
.
getThrust
())/(
upper
.
getThrust
()
-
lower
.
getThrust
());
double
calculatedAmps
=
lower
.
getCurrent
()
+
delta
*
(
upper
.
getCurrent
()
-
lower
.
getCurrent
());
System
.
out
.
println
(
targetThrust
+
" N targeted => "
+
calculatedAmps
+
" A calculated | "
+
delta
+
" <> "
+
lower
+
" "
+
upper
);
setLoad
(
targetThrust
,
calculatedAmps
);
}
...
...
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