diff options
author | Daniel Friesel <derf@finalrewind.org> | 2017-06-01 09:16:57 +0200 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2017-06-01 09:16:57 +0200 |
commit | 286a50b1e1ee21a8dbb2c66d9cb9a69ba541e480 (patch) | |
tree | 203a79ae72ce0cf363020badcdad7ab5faf58a7b /lib/Kratos | |
parent | 6b45e9720286d21aee1de6e381d9200002812491 (diff) |
Model: initialized transition (relative) energy to 0
Diffstat (limited to 'lib/Kratos')
-rw-r--r-- | lib/Kratos/DFADriver/Model.pm | 20 |
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( |