如何选择显示值的单位?
我有一个值,并且我知道它的单位是
米mn/md * kgkn/kd * ssn/sd * KKn/Kd * A广告/广告
注意:指数是有理数,单位 m0.5 是有效的
问题是如何选择如何将单位分解为更紧凑的东西,
例如如果
md=kd=sd=Kd=Ad=1
mn=Kn=An=0
kn=1
sn=-1
我可以的话使用 N/m
我怀疑这是离散优化问题的一些子集。
I have a value and I known that it's units is
metersmn/md * kgkn/kd * ssn/sd * KKn/Kd * AAn/Ad
Note: the exponents are rational, units of m0.5 are valid
The question is how to pick how to break down the units into something more compact
for instance if
md=kd=sd=Kd=Ad=1
mn=Kn=An=0
kn=1
sn=-1
I can use N/m
I suspect that this is some subset of a discrete optimization problem.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
将复杂度定义为符号总数:单位的 1 次方复杂度为 1,任何其他整数次方为 2,小数次方为 3。尝试几个示例,看看感觉如何。 考虑到复杂性,您可能必须使用 1、2、3 以外的其他数字。
尝试使用贪心算法进行优化:在每次迭代中,分解出尽可能简化的复合单元(可能是分数或负幂)(使目标函数尽可能小)。 我有一种预感,贪婪会起作用,因为这些单位的设计是这样的,如果两个单位的乘积/比率比它们中的每一个都简单,那么它将成为一个自己的单位。
Define the complexity as the total number of symbols: A unit to the power of 1 has complexity 1, any other integer power is 2, a fractional power is 3. Try several examples and see how it feels. Maybe you have to use other numbers than 1, 2, 3 for complexities.
Try optimization using a greedy algorithm: on each iteration, factor out the composite unit (possibly to a fractional or negative power) that simplifies as much as possible (makes the target function as small as possible). I have a hunch that greed will work because the units are designed so that if the product / ratio of two units is simpler than each of them, it will be a unit of its own.