数据库解决方案

昨天遇到遇到一个数据库错误:

Could not allocate space for object '...'.'...' in database '...'because the 'PRIMARY' filegroup is full. Create disk space by deleting unneeded files, dropping objects in the filegroup, adding additional files to the filegroup, or setting autogrowth on for existing files in the filegroup.

刚开始一直以为是因为我使用的是SQL Server Express,所以有10GB的限制。费了半天劲把Standard版本装好,还是一直报错,原来我使用的LocalDB只存在于Express版本。LocalDB的好处是方便操作,可以轻易复制,对于我现在的程序而言可以在不同机器上设置本地服务器,而且这个版本免费。

因为需要进行大量的模拟,模拟结果都要存到服务器上的话,貌似设置一个SQL Server成为必要的工作。如果设置一个网络服务器,这样程序在任意一台机器上都能连接并将数据保存到同一个数据库。

Solution exception: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.

database_timeout

设定这个Timeout的值为多大合适让我有点困惑,判定依据是什么呢? 简单设为0肯定是不太合理的,肯定会带来什么弊端。

SqlCommand的CommandTimeout 设置的是处理超时时间,连接数据库超时时间应该是连接字符串中的ConnectionTimeout

参见以下文章:

http://support.microsoft.com/kb/887126/en-us

 

箱型图 ggplot2 boxplot

箱形图(英文:Box-plot)是一种用作显示一组数据分散情况的统计图,于1977年由美国著名统计学家约翰·图基(John Tukey)发明。它能显示出一组数据的最大值、最小值、中位数、下四分位数及上四分位数。

Boxplot_vs_PDF 箱型图由一个长方形(即所谓的箱子)和两根从长方形延伸出的线组成,两根线的末端一般以一根短线结尾,它们有时候也被称为胡须或天线。位于长方形里边的线表示分布的中位数,也就是说这根线两边各存在50%的数。长方形的两端各代表下四分位数及上四分位数,也就是说,长方形内也包含了50%的数。下四分位数和上四分位数之间的距离被称为四分位间距(interquartile range),简称IQR。 根据John Tukey对天线末端位置的定义,它们距离各自箱型边界的距离不超过1.5倍IQR,当最大值或最小值在这个范围内时,则取最大值或者最小值。也就是为什么通常两根线长短不一的原因。如果在这个范围之外存在数值,被成为离群值(Outlier),它们将被单独表示出来。这种表达方法也是ggplot里boxplot默认的方法。 此外也可以选择带缺口的箱型图(notched box plot),它对基本的图形进行扩展,标示出1.58 * IQR / sqrt(n)位置,大约是所有数值95%的区间。 通过观察箱型图,人们可以迅速地了解数据的大致分布,比如50%数据分布的位置,大多数数据集中的范围,从中位线位置看出数据分布的对称性等。

References

McGill, R., Tukey, J. W. and Larsen, W. A. (1978) Variations of box plots. The American Statistician 32, 12-16.

40 years of boxplots

Box Plot: Display of Distribution

ASHRAE Standard 90.1参考模型

美国能源部网站提供基于ASHRAE Standard 90.1的各类建筑模型的下载。分商业建筑和住宅两个大类。

商业建筑细分为:

Small Office
Medium Office
Large Office
Stand-alone Retail
Strip Mall
Primary School
Secondary School
Outpatient Healthcare
Hospital
Small Hotel
Large Hotel
Warehouse (non-refrigerated)
Quick Service Restaurant
Full Service Restaurant
Mid-rise Apartment
High-rise Apartment

住宅细分为:

Single-family detached house
Multi-family low-rise apartment building

下载地址:http://www.energycodes.gov/development

其实我是想找中国的模型,谁知道的话麻烦告诉我。

走过必留下——关于大数据

建筑这个行业和它从业人员每天都在产生和使用大量的数据,设计,施工,运营。 在AECMAGAZINE的文章简述了这个观点。

Architecture is fundamentally about data. At the foundation of every BIM model lies data. Architects and engineers work to orchestrate data — creating it, modifying it, using it in simulations. Contractors take data and turn it into physical spaces, while building operators are increasingly managing buildings using data from architects and from building sensors. Data underlies much of the modern AECO (Architecture, Engineering, Construction and Owner-operated) industry and we are only destined to produce more of it.

然而问题的重点在于这些数据是否被有效地利用,数据产生的过程是否是一个连续的过程。让我印象深刻的是,设计人员在无休止地出方案,画图,建模,新方案,画图。。。直到Deadline。往往一个新的方案,哪怕是一点点修改,都意味着之前的努力将被白费。建筑师将方案交予工程师时,工程师又开始了画图,建模,计算的过程。