当前位置: 首页>>代码示例>>C#>>正文


C# IModel.MaxActionValues方法代码示例

本文整理汇总了C#中IModel.MaxActionValues方法的典型用法代码示例。如果您正苦于以下问题:C# IModel.MaxActionValues方法的具体用法?C# IModel.MaxActionValues怎么用?C# IModel.MaxActionValues使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在IModel的用法示例。


在下文中一共展示了IModel.MaxActionValues方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: PredictionControl

        public PredictionControl(IModel model, List<Property> properties, List<LoggedValue> loggedValues)
        {
            _logger = new LogIt("", loggedValues); // TODO Add Path

            // Variables from properties list
            M = (int) Convert.ToDouble(properties.Find(p => p.Name.Equals("M")).Value);
            _horizonSize = (int)Convert.ToDouble(properties.Find(p => p.Name.Equals("Horizon")).Value);
            _predictionHorizonSize = (int)Convert.ToDouble(properties.Find(p => p.Name.Equals("PredictionHorizon")).Value); // TODO
            _discount = Convert.ToDouble(properties.Find(p => p.Name.Equals("Discount")).Value);
            _startSigma = Convert.ToDouble(properties.Find(p => p.Name.Equals("StartSigma")).Value);
            _sigmaMin = Convert.ToDouble(properties.Find(p => p.Name.Equals("SigmaMin")).Value);
            var externalDiscretization =
                Convert.ToDouble(properties.Find(p => p.Name.Equals("ExternalDiscretization")).Value);
            var internalDiscretization =
                Convert.ToDouble(properties.Find(p => p.Name.Equals("InternalDiscretization")).Value);
            var TimeLimit = Convert.ToDouble(properties.Find(p => p.Name.Equals("TimeLimit")).Value);
            _iterationLimitOptimisation = (int)Convert.ToDouble(properties.Find(p => p.Name.Equals("OptimisationIterationLimit")).Value);

            _iterationsLimit = (int)(TimeLimit / externalDiscretization);

            _model = model;
            _model.SetDiscretizations(externalDiscretization, internalDiscretization);
            _state = new List<double>(_model.GetInitialState());
            _minAction = _model.MinActionValues();
            _maxAction = _model.MaxActionValues();
            VestSum = 0;
            VestAv = 0;

            GenerateHorizon();
            _iterationNumExternal = 0;
            _episodeNr = 0;
        }
开发者ID:dankrasniak,项目名称:Inzynierka,代码行数:32,代码来源:PredictionControl.cs

示例2: Advisor

        public Advisor(IModel model, List<Property> properties, List<LoggedValue> loggedValues)
        {
            _model = model;

            MODEL_ACTION_VAR_COUNT = _model.GenerateControlVariables().Count;
            MODEL_STATE_VAR_COUNT = _model.GetInitialState().Count;

            HORIZON_SIZE = (int)Convert.ToDouble(properties.Find(p => p.Name.Equals("Horizon")).Value);
            Vsize = (int)Convert.ToDouble(properties.Find(p => p.Name.Equals("Neurons Number")).Value);
            BetaV = Convert.ToDouble(properties.Find(p => p.Name.Equals("BetaV")).Value);
            Gamma = Convert.ToDouble(properties.Find(p => p.Name.Equals("Discount")).Value);;
            Sigma = Convert.ToDouble(properties.Find(p => p.Name.Equals("Sigma")).Value);
            SigmaMin = Convert.ToDouble(properties.Find(p => p.Name.Equals("SigmaMin")).Value);
            TimesToAdjust = (int)Convert.ToDouble(properties.Find(p => p.Name.Equals("TimesToAdjust")).Value);
            var externalDiscretization =
                Convert.ToDouble(properties.Find(p => p.Name.Equals("ExternalDiscretization")).Value);
            var internalDiscretization =
                Convert.ToDouble(properties.Find(p => p.Name.Equals("InternalDiscretization")).Value);
            var TimeLimit = Convert.ToDouble(properties.Find(p => p.Name.Equals("TimeLimit")).Value);
            TimesToTeach = (int)Convert.ToDouble(properties.Find(p => p.Name.Equals("TimesToTeach")).Value);
            TimesToAdjustPastActions = (int)Convert.ToDouble(properties.Find(p => p.Name.Equals("TimesToAdjustPastActions")).Value);

            _logger = new LogIt("", loggedValues);
            _model.SetDiscretizations(externalDiscretization, internalDiscretization);

            TimeIndex = 0;
            _episodeNr = 0;
            AllVisits = new ArrayList();
            Sampler = new ASampler();
            IterationsLimit = (int) (TimeLimit / externalDiscretization);
            VestSum = 0;

            StartInState(_model.GetInitialState().ToArray());
            MinAction = new Vector(_model.MinActionValues());
            MaxAction = new Vector(_model.MaxActionValues());

            double[] stateAverage = _model.GetStateValuesAverageNN().ToArray();
            double[] stateStandardDeviation = _model.GetStateValuesStandardDeviationNN().ToArray();

            Init(stateAverage, stateStandardDeviation, MinAction.Table, Vsize);
        }
开发者ID:dankrasniak,项目名称:Inzynierka,代码行数:41,代码来源:AdvisorCCMPctrl.cs


注:本文中的IModel.MaxActionValues方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。