档案

Archive for 2007年7月

Eclipse 3.3

2007年07月31日 留下评论

      昨天晚上才知道原来Eclipse已经出了3.3了,还叫什么Europa(木卫二),看来它真的是打算跟星星干上了。急忙试着下载准备尝尝鲜,不过装上之后才发现原来的WTP不兼容这个版本,于是又嘿咻嘿咻地去下载WTP2.0以及支持这个版本的GEF和EMF等等……

      给我的第一感觉就是:没看出什么变化嘛,除了控件的样式有一些不同之外好像……,算啦,象我这种凡夫俗子怎么可能一眼就看透其中的精妙之处呢,反正就这样用呗…… 咱就是Eclipse的Fans,虽然以前也喜欢过JBUILDER,并且现在也承认它功能不是一般的强大,但是我还是喜欢Eclipse,不光是因为它免费而且人性化,更是因为我喜欢开放源代码这种自由的感觉,可以集合全世界聪明人的智慧,可以聆听全世界用户的需求,这才是真正的科技以人为本嘛,毕竟群众的力量是无穷的嘛。

      今天又有小道消息说公司有人事上的一番大动作,不知道又出什么什么事情亦或是有有什么事情即将发生,反正咱也不是那种爱管闲事的人,再说了咱即便是爱管闲事的人也轮不到咱们来管,所以…… 只是我最近感觉越来越没有干劲了,看来有必要先调整一下自己的心态了,毕竟工作不是生活的全部,一个人没有了工作可以再找,但是如果一个人没有了自我就……

分类:未分类

Lingo的建模语言

2007年07月29日 留下评论

      今天学着一个例子尝试了使用Lingo的建模语言来解决一个十分典型的运输问题:

model:

sets:
source/s1..s2/:inventory;
distination/d1..d8/:demand;
link(source,distination):cost,volume;
endsets

data:
inventory=100 45;
demand=22 14 18 17 15 13 15 20;
cost=14 24 21 20 21.5 19 17 30
     24 15 28 20 18.5 19.5 24 28;
enddata

min=@sum(link:cost*volume);

@for(source(row):@sum(distination(col):volume(row,col))<=inventory(row));
@for(distination(col):@sum(source(row):volume(row,col))=demand(col));

end

      怎么说呢,在我看来,用Lingo解决问题其实就是两种方式,一种就是采用类似人类自然语言的那种方式,用数学的形式逐个逐个地描述出需要优化的问题及其约束条件,然后由系统求解。而另外一种就是利用Lingo内建的建模语言,其实就是相当于采用类似编程的方式来描述问题及其约束条件。两者应该是一样的,我猜想Lingo会在求解之前将两种形式的描述转化成统一的内部表现形式。

     附上两个可以用于模型经济分析的名词:

     影子价格(dual price),与每个约束相关,可以定义为随着约束的右端项每增加一个单位目标函数最优值的变化。

     缩减成本系数(reduced cost),非基变量增加一个单位时目标函数减少的量。

分类:未分类

直觉

2007年07月29日 2 条评论

      上次那个胖胖的美女老外给我们上课的时候提到intuition这个词,她解释说女性的直觉有的时候很灵的,有些事情她们不知道为什么知道,但是她们就是知道。不过我要说不光是女人,其实男人也是有直觉的,特别是双鱼座的男人。最近我就感觉自己的直觉有的时候已经到了不可思议的地步了,甚至有一条短信过来我居然能强烈地感觉到是谁发的,坐在公司的班车上我会突然之间感觉到今天有谁不来上班。不过,怎么说呢,我觉得我的直觉更多的时候是基于“转念一想”,也就是说从其它一些事情的蛛丝马迹马上就可以联想到别的事情的一些结果,或者是别人的一个微小的动作我也可以马上了解到他的想法。所以我觉得自己象柯南一样,很有当侦探的天分。

      这个周末生活特别没有规律,晚上不想睡觉,所以连着两天都是3点半睡的觉,还是自己硬逼着自己睡的(不过晚睡也有晚睡的好处,那就是不会做梦)。早上又很晚起床,然后中午想叫外卖,好像外面的饭店不知道是有人检查还是什么的又全关门了,只好吃面包牛奶充饥,晚上到9点半才跑去M吃了一顿,然后凌晨一点多又煮面吃。吃东西太没有规律了,胃很疼,我怕再这样搞多几次非得胃病不可。一起住的同事消失了,不知道是回家了还是泡mm去了,不过根据我强烈的直觉,应该是后者。不过其实我有的时候很喜欢这种一个人单独占据一个空间的感觉,很自由……  我想也许以后我会试着自己单独租房间住也说不定。突然想听王菲的歌,好不容易找出在大学时候买的那张CD "光之翼",才发现原来只剩下一个壳,光碟早就不知道被我弄到哪儿去了。在网上下mp3,又把电脑搞死机了,很不顺……

分类:未分类

Lingo

2007年07月26日 留下评论

      我想我是一个喜新厌旧的人,因为前几天才开始觉得用MATLAB解线性规划比用Excel更加方便,今天又开始觉得它不行了。因为今天开始接触混合整数规划问题,当我想用MATLAB来解这种问题的时候才发现没有专门用来解这种问题的函数,我必须要通过一种曲线的方法将这种问题转化成线性规划的问题然后用linprog来求解,很是不爽…… 看来毕竟不是专门用来求解运筹学问题的工具。

      在网上转悠了一段时间,终于被我找到了一个新大陆:Lingo,一个专门用来解线性或非线性规划的软件。费了九牛二虎之力终于下载到了一个……

      解压,安装,破解…… 一切都是那么地顺利,因为我早已经习以为常了。 从一个小例子开始使用…… 我一下子明白了什么叫做人外有人,山外有山。 完全象是直接用语言把问题描述出来,不用做任何的概念转换,然后程序就可以帮你求解,这种感觉真好……

      需要更正一下,后来才知道原来MATLAB 7中新增了一个函数bintprog专门用来解0-1整数线性规划的……

分类:未分类

决不放弃

2007年07月25日 3 条评论

      晚上早早地把衣服洗了,因为明天是星期四。收音机里面传来:月亮代表我的心……。我把头探出窗外,想看一看今天天上是不是有月亮,我想说不定谁跟我一样正在世界的另一边看着这个月亮。可惜,月亮好像融化在黑夜里面一样,甚至连一颗星星的影子都没有。开始怀念小时候的夏夜,满天的星斗,皎洁的月光,闪亮的银河,那个时候习以为常的东西现在再难看见了。

      就在我即将清醒的一瞬间,我怎么突然感觉到一种难以明状的痛苦感觉。那是一种无奈的,一种不受我的控制,任我如何努力都无法触及的感觉。人与人之间需要一个距离,一个轻轻的微笑可以拉进这个距离,可是一个漠然的眼神又可以使它荡然无存。凤凰可以在每次浴火之后重生,看上去光彩四溢,可是,它在浴火的时候真的就不痛吗??

      闭上眼睛,远方有一个人,它也闭着眼睛。你说沙加为什么总是闭着眼睛呢。

      “你相信缘分吗?”

      “信!”

      “为什么?”

      “因为每一次都是那么的巧,我想不到除了缘分以外我还可以用其它的东西去解释它。我觉得老天其实很眷顾我,每次我所希望的它都满足我了,即便是我不经意之间随便想的东西。只是我现在才知道,原来它只是给了我一个机遇,想要成功还需要我自己的努力!”

分类:未分类

16 Practical Tips for Solving Your Problems More Easily(转载)

2007年07月23日 留下评论

What’s the best way to solve a problem?

I really don’t think there is one way to do it. And the ways you can use to solve a problem depends on the problem.

But I have found a few tips that have helped me solve problems more easily. I seldom use all of the tips for solving one problem and they aren’t arranged in any special order. However, I find doing some of these things early on can really help you solve the problem faster and with less struggle and pain.

  1. Accept the problem. This is the one I try to do first when I run into a problem and I use it almost every time. When you accept that the problem already exists and stop resisting then you also stop putting more energy into the problem and “feeding it”. Now it just exists (well, more or less, you might still feel a bit down about it). And you can use the energy you previously fed the problem with – the energy that probably made the problem look bigger than it was – to find creative solutions to the challenge.
  1. Ask yourself: what’s the worst that can happen? This is another one to do early on. You can easily to use your mind to blow problems all out of proportion. By asking this question you can restore the problem to it’s original size. And realize that the worst case scenario – if you actually define it – is perhaps not so pleasant but something you can handle and solve.
  1. Gather some good knowledge. Information about your problem can often decrease that uncertain anxiety and fear we face when we are challenged with something. Knowledge wisps away the clouds of fear around a problem. And we often find that the problem might not be as bad as we thought.
  1. Try to figure out possible problem along the way. This is something you can do before the problem even arises. Be prepared. When you research – as described in point # 3 – also try to find out what others in the same situation ran into, what kind of challenges they faced. Ask people what they did. If you don’t have anyone to ask then books, forums and blogs are good resources for gathering the personal experience of people. Also, be on the lookout for local groups and organizations. Google it and see what you find. If you keep your eyes and ears open you are sure to find something helpful.
  1. Ask for help. You can ask people for advice on what to do and what they did in similar situations like yours. But you can also ask for more practical help. You don´t have to solve every problem on your own and sometimes it feels better to have someone by your side, even if it is just for emotional support.
  1. Let go of the need to be right. Open your mind to a solution that may work and try it out instead of just making snap judgements based on little information and experience. The need to be right can make you disregard solutions that are just what you need for far too long.
  1. Come up with more than one solution. You don´t know what will actually work before you try it. What may seem like a good solution in theory doesn´t always work in reality. So brain-storm and come up with at least a few solutions. If the first didn´t work, try the next one.

  1. Redefine failure. This is important both to handle fear of failure for the whole problem and to get you start trying different solutions without too much hesitation. The definition of failure we are brought up with in society might not be the best and most useful to have. If you look at the most successful people you quickly notice that they have a different response to failure than the more common one. They don´t take failure or rejection that seriously. They know it´s not the end of the world if they fail. Instead they look at each failure and see the good part about: what they can learn from it and improve next time. They have an abundance-mentality. They know that if their first business-venture fails it feels like crap for a while but it´s ok in the long run. They learn from it and then they try again. Redefine failure as feedback and as a natural part of a successful life.
  1. Break down the problem into smaller pieces. Completing a task or solving a problem can seem overwhelming and impossible if you take it all in at once. To decrease anxiety and think more clearly try to break the problem down. Try to identify the different things and people it consists of. Then figure out one practical solution you can take for each of those pieces. Try those solutions. They may not solve the whole problem immediately. But they might solve a few pieces of it. And then you can keep trying other solutions for the rest of the pieces until there are none left.
  1. Use the 80/20 rule. Use 80 percent of your time to find solutions and only 20 percent to complain, worry and whine. It might not always be easy but focusing your energy, time and thoughts in this way is much more beneficial to you and others than doing the opposite.
  1. Use Parkinson’s Law. This law says that a task will expand in time and seeming complexity depending on the time you set aside for it. For instance, if you say to yourself that you´ll come up with a solution within a week then the problem will seem to grow more difficult and you´ll spend more and more time trying to come up with a solution. Combine this law with the 80/20 rule to find solutions quickly. Focus your time on finding solutions. Then just give yourself an hour (instead of the whole day) or the day (instead of the whole week) to solve the problem. This will force your mind to focus on solutions and action.

  1. Find the lesson or opportunity within the problem. There is almost always a good side of a problem. Perhaps it alerts us to a great way to improve our business. Or teaches us how our lives perhaps aren’t as bad as we thought. Finding this more positive part of the problem reduces its negative emotional impact and you may even start to see the situation as a great opportunity for you. When you are faced with a problem ask yourself: How can I use this? What is the good thing about this? What can I learn from this? What hidden opportunity can I find within this problem?
  1. Actually talk about the problem and communicate clearly. Many problems arise because someone misinterpreted what someone else said. One way to make sure that you and everyone else have the same interpretation of for instance a project is to have people repeat back their view of the project and their part in it. See if your and their view matches. If a conflict arises then maybe you need to just talk it out, let go of a bit of steam, emotion and tension instead of everyone bottling it up. After that the discussion may be less emotionally charged. And it becomes easier to communicate clearly and reach a good solution for everyone involved.
  1. Create fewer problems. A lot of our problems are created by ourselves. You save yourself a lot of trouble by being proactive, thinking before you speak and trying to avoid creating or complicating problems more than necessary. One way to decrease problems is to follow – as much as you can – Dale Carnegie´s wise words: “Never critize, complain or condemn”. Many problems are somehow connected to relationships with other people so a good way to create less problems is to improve your social skills. Check out Do You Make These 10 Mistakes in a Conversation? and 5 Mistakes That Can Make You Look Dumb for some tips in that area. And go down to your local library and borrow a copy of How to Win Friends and Influence People.
  1. Use the power of words to your advantage. Our minds respond more than one may think to what words that are used to describe something. A problem is a negatively charged word. To make it easier to handle the problem use the more neutral or positive word challenge instead. This may sound like some empty and in reality just useless advice. But, at least to me, I have found that doing this small change has some impact on how negatively/positively I view a situation.
  1. Keep your motivation up. It´s easy to be discouraged, especially if you fear failure and your first and second solution to a problem didn´t work. You might feel like just giving up. Then it´s time to give yourself a boost of motivation. Try a few of the techniques described in 25 Simple Ways to Motivate Yourself and 5 More Ways to Motivate Yourself. Changing your mental state to a brighter, more positive and more motivated one can make all the difference in the world. It will keep you going. Even though you might just a few minutes earlier felt like all hope was gone.
分类:未分类

Transformers

2007年07月22日 留下评论

       今天没什么事,一个人偷偷跑去中华广场看了变形金刚。怎么说呢,给我的感觉完全就是一种危机,国外的电脑特技发展得越来越快。想当年,97年的时候迪斯尼出了第一部完全的三维动画电影“玩具总动员”,算是开创了三维技术的先河,没想到短短的10年已经发展成现在的这个水平了,几乎可以在电影里面逼真地创造出任何可以想象得到的东西。想比较而已,中国就……,唉,人家的发展速度是指数型的,我们的发展速度是线性的,最后的结果就是差距越来越大…… 不说了,生气……

      今天试着用MATLAB里面的linprog函数解线性规划的问题,相比较前一阵子学到的用Excel里面的线性规划求解,虽然没有那么直观了,但是更加方便,因为MATLAB里面的概念更加符合将线性方程组看成矩阵函数的概念,而且MATLAB里面可以编程,更可以被外部程序调用,所以如果有的问题可以被固定模式的话,就可以编成通用的程序从企业数据库获取输入数据进行运算,实现完全的自动化了……

分类:未分类

恶梦

2007年07月16日 留下评论

       昨天晚上临睡之前想着希望能梦见某个人,没想到居然还真的就梦见了,只可惜故事情节对我来说是一个恶梦,所以在被惊醒之后久久不敢再睡,生怕继续这个恶梦。人有的时候就是这么的矛盾……,费尽千辛万苦之后才发现得到的东西并不是自己想要的。

分类:未分类

飞利浦 190CW7

2007年07月15日 留下评论

       这个礼拜没怎么碰电脑,因为上周我那台可怜的笔记本坏了显示屏,起初以为是屏线的问题,花个一百多就可以搞定的事情,结果有时候事情远比我想像的要严重的多。上周末跑了三家修笔记本的地方才确定原来是那快液晶屏坏了。

       忍了一个礼拜,最终还是决定先买个液晶显示器顶住先。网络真是好啊,如果我想了解一件事情的话,它可以让我在一个晚上的时间之内成为专家。通过昨天晚上的临时抱佛脚,今天决定出手了。以下是需要跟js确定的几件事情:1.我想要LPL面板的液晶屏,这个可以通过同时按住AUTO+MENU键开机进入工厂模式看到 2.确认是否包无亮点 3.飞利浦有附赠DVI连线的,确认js是否会私吞

       俗话说智者千虑必有一失,今天犯了一个很愚蠢的错误。因为昨天的飘流我把所有的卡都从钱包里面拿了出来,只留了一张招行的卡,虽然路上想到了这件事情,可是我满以为里面有足够的银子让我买的起一台显示器。结果可想而知了,等我花了差不多一个小时的时间来到天河准备取钱的时候傻眼了,卡里总共只有可怜的一千多一点的银子,即便加上钱包里的还是不够,想了半天也想不到周围有什么熟人可以临时借给我的,只要咬咬牙又坐着车子原路返回了,唉……

       整个买的过程都算比较顺利,走了三家,大概摸清了价钱,也没有怎么还价,本来想开发票的,结果后来受不了js的唠叨,说什么没发票一样保修,再看看可以便宜差不多100大洋,想想就算了。仔细确定了一下预先的问题,交了钱之后又拆机试了一下就抱回家了。

       回家试了一下,可能是T23的显卡比较落伍了,居然无法支持1440×900的分辨率,只好用着1024×768先,虽然会感觉屏幕有点被压扁的感觉并且不是那么清楚,不过还算过得去,看来老天是注定要我换电脑了,哇哈哈……

分类:未分类

清远漂流

2007年07月14日 留下评论

       不记得什么时候清远会在我的脑子里跟漂流联系在一起。可能是因为上次有个朋友去清远漂流而我死命打手机都联系不上导致的。所以当有同事建议去那儿漂流的时候,我突然有一种好奇心想去那儿看一看。
       早上和往常一样被闹钟叫醒,路上虽然因为选择了一条容易堵车的路线,导致比预想的时间迟了十五分钟,但是还是比规定到达的时间提前了五分钟。其他四个人早就在车上等着了。
       因为是个带着购物团性质的旅行团,所以走了一大段高速以后汽车首先来到了一家珠宝城,导游要求至少要呆一个小时!!幸好有Jackie带的UNO,大家玩得很开心,所以并没有感觉很长时间。
       午餐是在一艘游船上吃的,和一群不认识的mm挤在一起。热得出了一身的汗。虽然说饭菜很一般,但是大家还是光顾着吃了,根本没有心情抬头去欣赏船窗外的美景!

       吃完饭就坐车去游客中心换衣服,存包。导游说等我们十分钟,结果等到大家上车以后换成我们等她一个小时……无语,也不知道是发生了什么事情,反正车子就是不能开进去。大太阳底下的车子就好像一个温室一样,开了空调也不管用,个个象在蒸桑拿一样。

      好不容易车子终于可以进去了,结果又要排很长的队伍,唉,当时在想真不知道是花钱来玩的还是花钱来受罪的……

      当所有的辛苦总算可以换来最后的快乐的时候,所有的不快乐也随之而去。享受着水浸满整个飘流艇的感觉真是不错,虽然有人抽筋有人冻得浑身发抖,哈哈……

分类:未分类