diff options
author | Daniel Friesel <derf@finalrewind.org> | 2017-04-05 16:07:13 +0200 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2017-04-05 16:07:13 +0200 |
commit | 6b9684f4e7efa3dfe29ead936475bd4448245323 (patch) | |
tree | eee0c2037751f6269d452bcbb5ad614daff795fd /lib/Kratos | |
parent | c0bea5229a16902ff75f2ad8437e3bc5d89ac12b (diff) |
DFADriver: update_model: Sort keys for easier comparison of outputs
Diffstat (limited to 'lib/Kratos')
-rw-r--r-- | lib/Kratos/DFADriver.pm | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/Kratos/DFADriver.pm b/lib/Kratos/DFADriver.pm index 7804d2b..b894248 100644 --- a/lib/Kratos/DFADriver.pm +++ b/lib/Kratos/DFADriver.pm @@ -615,7 +615,8 @@ sub assess_validation { sub update_model { my ($self) = @_; - while ( my ( $name, $state ) = each %{ $self->{log}{aggregate}{state} } ) { + for my $name (sort keys %{ $self->{log}{aggregate}{state} }) { + my $state = $self->{log}{aggregate}{state}{$name}; $self->model->set_state_power( $name, $state->{power}{median} ); for my $fname ( keys %{ $state->{power}{function} } ) { $self->model->set_state_params( @@ -625,9 +626,8 @@ sub update_model { ); } } - while ( my ( $name, $transition ) - = each %{ $self->{log}{aggregate}{transition} } ) - { + for my $name (sort keys %{ $self->{log}{aggregate}{transition} }) { + my $transition = $self->{log}{aggregate}{transition}{$name}; $self->model->set_transition_data( $name, $transition->{duration}{median}, |