summaryrefslogtreecommitdiff
path: root/lib/Kratos
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2017-06-01 09:16:57 +0200
committerDaniel Friesel <derf@finalrewind.org>2017-06-01 09:16:57 +0200
commit286a50b1e1ee21a8dbb2c66d9cb9a69ba541e480 (patch)
tree203a79ae72ce0cf363020badcdad7ab5faf58a7b /lib/Kratos
parent6b45e9720286d21aee1de6e381d9200002812491 (diff)
Model: initialized transition (relative) energy to 0
Diffstat (limited to 'lib/Kratos')
-rw-r--r--lib/Kratos/DFADriver/Model.pm20
1 files changed, 13 insertions, 7 deletions
diff --git a/lib/Kratos/DFADriver/Model.pm b/lib/Kratos/DFADriver/Model.pm
index d97bde9..aff44cf 100644
--- a/lib/Kratos/DFADriver/Model.pm
+++ b/lib/Kratos/DFADriver/Model.pm
@@ -123,7 +123,10 @@ sub new_from_repo {
}
if ( exists $repo->{class}{"DriverEvalThread_${class_name}"} ) {
- for my $var ( keys %{ $repo->{class}{"DriverEvalThread_${class_name}"}{variable} } ) {
+ for my $var (
+ keys %{ $repo->{class}{"DriverEvalThread_${class_name}"}{variable} }
+ )
+ {
if ( $var
=~ m{ ^ testVal __ (?<fun> [^_]+ ) __ arg (?<index> \d+ ) __ (?<descr> [^_]+ ) $ }x
)
@@ -156,12 +159,15 @@ sub new_from_repo {
my $name = $transition_names[$i];
my $guess_level = ( $name eq 'epilogue' ? 'epilogue' : 'user' );
$self->{transition}{$name} = {
- name => $name,
- id => $i,
- destination => $transition{$name}{dst}[0],
- origins => $transition{$name}{src},
- level => $transition{$name}{level} // $guess_level,
- parameters => $transition{$name}{parameters} // [],
+ name => $name,
+ id => $i,
+ destination => $transition{$name}{dst}[0],
+ origins => $transition{$name}{src},
+ level => $transition{$name}{level} // $guess_level,
+ parameters => $transition{$name}{parameters} // [],
+ energy => { static => 0 },
+ rel_energy_prev => { static => 0 },
+ rel_energy_next => { static => 0 },
};
if ( @{ $transition{$name}{dst} } > 1 ) {
warn(