本帖最后由 原始岛1930 于 2012-4-5 23:11 编辑
本人是骑车不到20天的新手,对变速这块一直不太了解,参考了不少网上的资料,用程序得出了24速平滑变速的结果,希望对新骑友有些帮助.
1-1, 0.688
1-2, 0.786
1-3, 0.917
1-4, 1.048
1-3, 0.917过渡
2-3, 1.333
2-4, 1.524
2-5, 1.778
2-6, 2.133
2-5, 1.778过渡
3-5, 2.444
3-6, 2.933
3-7, 3.385
3-8, 4.000
以上结果去掉了一些不好的组合[[1,8], [1,7], [1,6], [1,5], [2,8], [2,7], [2,2], [2,1], [3,1], [3,2], [3,3], [3,4]]- from __future__ import division
- front = {1:22, 2:32, 3:44}
- behind = {8:11, 7:13, 6:15, 5:18, 4:21, 3:24, 2:28, 1:32} #27,21速可以相应修改这里
- besides = [[1,8], [1,7], [1,6], [1,5], [2,8], [2,7], [2,2], [2,1], [3,1], [3,2], [3,3], [3,4]]
- if __name__ == '__main__':
- dd = {}
- for fk, fv in front.iteritems():
- for bk, bv in behind.iteritems():
- if [fk,bk] not in besides:
- dd["%d-%d" % (fk, bk)] = fv / bv
- keys = dd.keys()
- keys.sort(key = dd.__getitem__)
- for k in keys:
- print "%s, %5.3f" % (k, dd[k])
复制代码 |