Пример #1
0
        public virtual void Execute(int round_count, int step_count, bool bad_sensor_mode, int opinion_share_num, ExtendProgressBar pb = null)
        {
            string ori_tag = "";

            if (pb != null)
            {
                ori_tag = pb.Tag;
            }

            foreach (var round in Enumerable.Range(0, round_count))             //ラウンド数分回す
            {
                this.InitializeRound(opinion_share_num);                        //初期設定.センサセット,エージェントの信念値初期化など
                this.NextRound(step_count, bad_sensor_mode, opinion_share_num); //ステップ数を渡す.1ラウンド分が実行される.記録も取る.
                this.RecordRound();                                             //↑でとった1ラウンドの記録の重みを更新してラウンドの記録とし,RecordRoundsに加える
                pb.RefreshWithoutChange($"{pb.Tag} {this.CurrentRound} ");
                this.FinalizeRound();                                           //AAT_OSMでオーバーライド.意見形成率の推定.リンクの重み更新.+CurrentRound数をインクリメント
            }
        }