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


PHP Configuration::Trimp方法代码示例

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


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

示例1: recalculateMaxValues

 /**
  * Recalculate maximal values for CTL/ATL/Trimp
  */
 public function recalculateMaxValues()
 {
     $Query = new Performance\ModelQuery();
     $Query->execute(\DB::getInstance());
     $Calc = new Performance\MaximumCalculator(function (array $array) {
         return new Performance\TSB($array, Configuration::Trimp()->daysForCTL(), Configuration::Trimp()->daysForATL());
     }, $Query->data());
     $this->updateMaxCTL($Calc->maxFitness());
     $this->updateMaxATL($Calc->maxFatigue());
     $this->updateMaxTrimp($Calc->maxTrimp());
 }
开发者ID:guancio,项目名称:Runalyze,代码行数:14,代码来源:Data.php

示例2: allCategories

 /**
  * All categories
  * @return ConfigurationCategory[]
  */
 private function allCategories()
 {
     return array(Configuration::General(), Configuration::Privacy(), Configuration::ActivityView(), Configuration::ActivityForm(), Configuration::Design(), Configuration::DataBrowser(), Configuration::Vdot(), Configuration::Trimp(), Configuration::BasicEndurance(), Configuration::Misc());
 }
开发者ID:guancio,项目名称:Runalyze,代码行数:8,代码来源:class.ConfigTabGeneral.php

示例3: getFieldsetTRIMP

    /**
     * Get fieldset for TRIMP
     * @return \FormularFieldset
     */
    public function getFieldsetTRIMP()
    {
        $ModelQuery = new Performance\ModelQuery();
        $ModelQuery->execute(DB::getInstance());
        $TSBmodel = new Performance\TSB($ModelQuery->data(), Configuration::Trimp()->daysForCTL(), Configuration::Trimp()->daysForATL());
        $TSBmodel->calculate();
        $maxATL = Configuration::Data()->maxATL();
        $maxCTL = Configuration::Data()->maxCTL();
        $ATL = $TSBmodel->fatigueAt(0);
        $CTL = $TSBmodel->fitnessAt(0);
        $TrimpValues = array('ATL' => round(100 * $ATL / $maxATL), 'CTL' => round(100 * $CTL / $maxCTL), 'TSB' => $TSBmodel->performanceAt(0));
        $Table = '
			<table class="fullwidth zebra-style">
				<thead>
					<tr>
						<th></th>
						<th>' . __('Name') . '</th>
						<th>' . __('in &#37;') . '</th>
						<th>' . __('Time range') . '</th>
						<th>' . __('&oslash; value/day') . '</th>
						<th>' . __('max. value') . '</th>
						<th class="small">' . __('Description') . '</th>
					</tr>
				</thead>
				<tbody>
					<tr>
						<td class="b">ATL</td>
						<td>' . __('Actual Training Load') . '</td>
						<td class="c">' . $TrimpValues['ATL'] . ' &#37;</td>
						<td class="c small">' . sprintf(__('%s days'), Configuration::Trimp()->daysForATL()) . '</td>
						<td class="c">' . $ATL . '</td>
						<td class="c">' . $maxATL . '</td>
						<td class="small">' . __('Training impulse over a short period') . '</td>
					</tr>
					<tr>
						<td class="b">CTL</td>
						<td>' . __('Chronical Training Load') . '</td>
						<td class="c">' . $TrimpValues['CTL'] . ' &#37;</td>
						<td class="c small">' . sprintf(__('%s days'), Configuration::Trimp()->daysForCTL()) . '</td>
						<td class="c">' . $CTL . '</td>
						<td class="c">' . $maxCTL . '</td>
						<td class="small">' . __('Training impulse over a long period') . '</td>
					</tr>
					<tr>
						<td class="b">TSB</td>
						<td>' . __('Training Stress Balance') . '</td>
						<td class="c">' . $TrimpValues['TSB'] . '</td>
						<td colspan="3" class="c">' . $CTL . ' - ' . $ATL . ' = ' . $TrimpValues['TSB'] . '</td>
						<td class="small">' . __('Current impulse<br>positive: recovery<br>negative: hard training') . '
						</td>
					</tr>
				</tbody>
			</table>';
        $Fieldset = new FormularFieldset('ATL/CTL/TSB');
        $Fieldset->addBlock(__('ATL/CTL are based on the TRIMP-concept, which adresses an impulse value to every activity. ' . 'ATL and CTL are averaged values over a given time range.'));
        $Fieldset->addBlock($Table);
        $Fieldset->addInfo(__('see <a href="http://www.netzathleten.de/fitness/richtig-trainieren/item/1481-trainingstagebuch-sinnvoll-oder-nicht" title="Das TRIMP-Konzept">The TRIMP-concept</a> (german, netzathleten.de)'));
        $Fieldset->addInfo(__('see <a href="http://fellrnr.com/wiki/TRIMP">TRIMP</a> and <a href="http://fellrnr.com/wiki/Modeling_Human_Performance#The_TSB_Formulas">Modeling Human Performance</a> on fellrnr.com'));
        return $Fieldset;
    }
开发者ID:n0rthface,项目名称:Runalyze,代码行数:64,代码来源:class.RunalyzePluginPanel_Rechenspiele.php

示例4: array

$Plot->Data[] = array('label' => __('Fitness (CTL)'), 'color' => '#008800', 'data' => $CTLs);
//if (count($ATLs) < $MaxATLPoints)
$Plot->Data[] = array('label' => __('Fatigue (ATL)'), 'color' => '#CC2222', 'data' => $ATLs);
$Plot->Data[] = array('label' => __('avg VDOT'), 'color' => '#000000', 'data' => $VDOTs, 'yaxis' => 2);
$Plot->Data[] = array('label' => 'TRIMP', 'color' => '#5555FF', 'data' => $TRIMPs, 'yaxis' => 3);
$Plot->Data[] = array('label' => __('day VDOT'), 'color' => '#444444', 'data' => $VDOTsday, 'yaxis' => 2);
$Plot->setMarginForGrid(5);
$Plot->setLinesFilled(array(0));
$Plot->setLinesFilled(array(1), 0.3);
$Plot->setXAxisAsTime();
if (!$All && !$lastHalf && !$lastYear) {
    $Plot->setXAxisLimitedTo($Year);
}
$Plot->addYAxis(1, 'left');
$Plot->setYTicks(1, 1);
if (Configuration::Trimp()->showInPercent()) {
    $Plot->addYUnit(1, '%');
    $Plot->setYLimits(1, 0, 100);
}
$Plot->addYAxis(2, 'right');
$Plot->setYTicks(2, 1, 1);
$Plot->addYAxis(3, 'right');
$Plot->setYLimits(3, 0, $maxTrimp * 2);
$Plot->showAsBars(3, 1, 2);
$Plot->showAsPoints(4);
$Plot->smoothing(false);
if (($lastHalf || $lastYear) && !$DataFailed) {
    $Plot->addMarkingArea('x', Plot::dayOfYearToJStime($StartYear, $HighestIndex - 30 - $AddDays + $StartDayInYear + 1), $index, 'rgba(255,255,255,0.3)');
    //'rgba(200,200,200,0.5)');
}
$Plot->setGridAboveData();
开发者ID:schoch,项目名称:Runalyze,代码行数:31,代码来源:Plot.Form.php

示例5:

 }
 $performanceModel->calculate();
 if ($All) {
     $maxATL = $performanceModel->maxFatigue();
     $maxCTL = $performanceModel->maxFitness();
     if ($perfmodel == 'tsb' && $maxATL != Configuration::Data()->maxATL()) {
         Configuration::Data()->updateMaxATL($maxATL);
     }
     if ($perfmodel == 'tsb' && $maxCTL != Configuration::Data()->maxCTL()) {
         Configuration::Data()->updateMaxCTL($maxCTL);
     }
 } else {
     $maxATL = Configuration::Data()->maxATL();
     $maxCTL = Configuration::Data()->maxCTL();
 }
 $showInPercent = Configuration::Trimp()->showInPercent() && $perfmodel != 'banister';
 if (!$showInPercent) {
     $maxATL = 100;
     $maxCTL = 100;
 }
 for ($d = $LowestIndex; $d <= $HighestIndex; $d++) {
     $index = Plot::dayOfYearToJStime($StartYear, $d - $AddDays + $StartDayInYear);
     $ATLs[$index] = 100 * $performanceModel->fatigueAt($d) / $maxATL;
     $CTLs[$index] = 100 * $performanceModel->fitnessAt($d) / $maxCTL;
     $TSBs[$index] = 100 * $performanceModel->performanceAt($d) / $maxCTL;
     $TRIMPs[$index] = $Trimps_raw[$d];
     if ($maxTrimp < $Trimps_raw[$d]) {
         $maxTrimp = $Trimps_raw[$d];
     }
     $VDOT_slice = array_slice($VDOTs_raw, $d - $VDOTdays, $VDOTdays);
     $Durations_slice = array_slice($Durations_raw, $d - $VDOTdays, $VDOTdays);
开发者ID:guancio,项目名称:Runalyze,代码行数:31,代码来源:Plot.Form.php


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