Skip to content

Commit

Permalink
changed test case start/end points
Browse files Browse the repository at this point in the history
  • Loading branch information
lightningclaw001 committed Nov 3, 2021
1 parent 9dd88c0 commit fd2c872
Show file tree
Hide file tree
Showing 13 changed files with 27 additions and 12 deletions.
8 changes: 4 additions & 4 deletions mpet/mod_CCCVCPcycle.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,8 +238,8 @@ def DeclareEquations(self):
self.time_counter() < dae.Constant(
0 * s)) if capfrac_cutoffs[i] is None else (
(self.ffrac_limtrode()
<= 1 - capfrac_cutoffs[i]) if limtrode == "c" else (
self.ffrac_limtrode() >= capfrac_cutoffs[i]))
< 1 - capfrac_cutoffs[i]) if limtrode == "c" else (
self.ffrac_limtrode() > capfrac_cutoffs[i]))
# for capacity condition, cathode is capped at 1-cap_frac, anode is at cap_Frac
# if end state, then we send back to state 0 and also add one to cycle_number
if i == len(constraints)-1:
Expand Down Expand Up @@ -415,9 +415,9 @@ def DeclareEquations(self):
cap_cond = (
self.time_counter() < dae.Constant(
0 * s)) if capfrac_cutoffs[i] is None else (
(self.ffrac_limtrode() >= 1
(self.ffrac_limtrode() > 1
- capfrac_cutoffs[i]) if limtrode == "c" else (
self.ffrac_limtrode() <= capfrac_cutoffs[i]))
self.ffrac_limtrode() < capfrac_cutoffs[i]))
# voltage cutoff
v_cond = (self.time_counter() < dae.Constant(
0*s)) if voltage_cutoffs[i] is None else \
Expand Down
4 changes: 2 additions & 2 deletions tests/ref_outputs/test025/params_system.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ Vmax = 5
Vmin = 2.5
Vset = 0.12
segments = [
[1, None, 0.05, None, None, 4],
[-1, None, 0.45, None, None, 1],
[1, None, 0.06, None, None, 4],
[-1, None, 0.44, None, None, 1],
]
prevDir = false
totalCycle = 4
Expand Down
15 changes: 15 additions & 0 deletions tests/ref_outputs/test025/sim_output/commit.diff
Original file line number Diff line number Diff line change
@@ -1 +1,16 @@
diff --git a/tests/ref_outputs/test025/params_system.cfg b/tests/ref_outputs/test025/params_system.cfg
index 4d65978..1730c1a 100644
--- a/tests/ref_outputs/test025/params_system.cfg
+++ b/tests/ref_outputs/test025/params_system.cfg
@@ -6,8 +6,8 @@ Vmax = 5
Vmin = 2.5
Vset = 0.12
segments = [
- [1, None, 0.05, None, None, 4],
- [-1, None, 0.45, None, None, 1],
+ [1, None, 0.06, None, None, 4],
+ [-1, None, 0.44, None, None, 1],
]
prevDir = false
totalCycle = 4

Binary file modified tests/ref_outputs/test025/sim_output/input_dict_anode.p
Binary file not shown.
Binary file modified tests/ref_outputs/test025/sim_output/input_dict_cathode.p
Binary file not shown.
Binary file modified tests/ref_outputs/test025/sim_output/input_dict_system.p
Binary file not shown.
Binary file modified tests/ref_outputs/test025/sim_output/output_data.mat
Binary file not shown.
4 changes: 2 additions & 2 deletions tests/ref_outputs/test025/sim_output/run_info.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ branch name:
feature/mod_battery_cycle_only

commit hash:
622dfe1
9dd88c0

to run, from the root repo directory, copy relevant files there,
edit input_params_system.cfg to point to correct material
Expand All @@ -14,4 +14,4 @@ $ git checkout [commit hash]
$ patch -p1 < commit.diff:
$ python[3] mpetrun.py input_params_system.cfg

Total run time: 0.22750616073608398 s
Total run time: 48.87151479721069 s
4 changes: 2 additions & 2 deletions tests/ref_outputs/test029/params_system.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ Vmax = 5
Vmin = 2.5
Vset = 0.12
segments = [
[1, None, 0.05, None, None, 4],
[-1, None, 0.45, None, None, 1],
[1, None, 0.06, None, None, 4],
[-1, None, 0.44, None, None, 1],
]
prevDir = false
totalCycle = 4
Expand Down
Binary file modified tests/ref_outputs/test029/sim_output/input_dict_cathode.p
Binary file not shown.
Binary file modified tests/ref_outputs/test029/sim_output/input_dict_system.p
Binary file not shown.
Binary file modified tests/ref_outputs/test029/sim_output/output_data.mat
Binary file not shown.
4 changes: 2 additions & 2 deletions tests/ref_outputs/test029/sim_output/run_info.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ branch name:
feature/mod_battery_cycle_only

commit hash:
622dfe1
9dd88c0

to run, from the root repo directory, copy relevant files there,
edit input_params_system.cfg to point to correct material
Expand All @@ -14,4 +14,4 @@ $ git checkout [commit hash]
$ patch -p1 < commit.diff:
$ python[3] mpetrun.py input_params_system.cfg

Total run time: 0.08475279808044434 s
Total run time: 0.9027960300445557 s

0 comments on commit fd2c872

Please sign in to comment.