Friday, August 23, 2013

Moving on from Oracle Crystal Ball development team

As of August 16th, 2013, I am not part of the Oracle Crystal Ball development team any more. For questions related to Oracle Crystal Ball, please post in either our LinkedIn group, or our Yahoo group (but not both) - and the Crystal Ball community (of which I will continue to be a part) and the organization should be able to help you out. 

Personally, I intend to continue my journey in Monte Carlo simulation, stochastic optimization and time-series forecasting, and hope to keep posting on some topics related to Crystal Ball as well, as time permits.

I will miss being part of the Oracle Crystal Ball development team.

Monday, July 29, 2013

In search of a good code editor

Every coder worth his/her salt is always looking for a better code editor. Why? Because, there is always something in a code editor you are currently using (or, are forced to use) that ... you don't like, or doesn't work, or is plain broken. But, why stick with it then? Well, might be for variety of reasons: 
  • Your organization mandates using it, and everyone in the team uses it
  • It is still the editor with least amount of nuisance
  • The editor has something special about certain software project you are working on
Happens with everyone. Happens with me. Here are my set of editors:
  • Visual Studio
    • C#, .NET
    • Javascript, HTML5 (mobile coding)
  • Eclipse
    • Java
    • Perl (with the EPIC plugin)
  • PSPad
    • SQL
    • Text files
    • Everything else.
The features I value in a code editor, in no specific preference, are color coding/syntax highlighting, auto-completion of symbol names, method names and properties, code folding (in regions), line wrapping and split windows. I think Visual Studio does all this things perfectly, and would have been pathway to coding nirvana, had it not for the two problems:
  • The latest and greatest of it costs money (I know, there is an express version, and I think that is really really good)
  • It is not general purpose for all languages that I use. 
The last one is big, so even if I have VS open almost all the time, I sill have to open bunch of other editors as well to get stuff done. Eclipse, on the other hand, doesn't give me that feel. It is very powerful and free, but always feels a little sluggish, weird, and what not. Eclipse also does not have auto-completion of symbol names (without doing CTRL+SPACE), which I find very helpful. But I stick with it, because it has special tooling for android development.

PSPad, on the lower end, has been reasonably good to me. It doesn't have any auto-completion or code folding, but the files I work with in PSPad, I mostly don't need those features. I needed those features for perl, which is why moved perl from PSPad to Eclipse. 

Courting with Geany
A few months back, I uninstalled PSPad after using it for more than five or so years, because I discovered another editor called Geany. I read about it, installed it and it looked good. Not only was it small and fast, but it seemed to have all the features I need. I was even thinking I would be able to bring back perl, and even java [*shiver*] (with android). If I can replace Eclipse and PSPad with Geany - that would itself be pretty cool.

Unfortunately, the dating period wasn't too long. Here are a few reasons:
  • The editor is based on GTK+. That means, in order to install it, you will have to install GTK+ first. I don't like to install too many things, and this didn't go well. Note: this wasn't a deal-breaker in itself, but accompanied with other ones, it was.
  • The autocomplete feature of Perl or java wasn't a true autocomplete - if you press CTRL+SPACE after typing one or ore letters, the editor would show any token in the file starting with those characters. It works as autocomplete, and is better than nothing, but isn't the same as I understand from VS.
  • Finally, interface was a bit old style ... for my taste anyways.
Next in Line: Notepad++
So, when I got my new laptop, I decided to look for another editor yet again. This time it was the turn for Notepad++. The feature set looked good (yes, it also supports autocomplete without having to press any extra keys), the interface looks good, so let's see how this goes.

Let me finish this post with some links to a few posts from coding horror by Jeff Atwood. If you are into programming, read his blog.
Update (3rd Sep, 2015): After almost two years of publishing this post, I am still using Notepad++, and I have to say that I am very happy using it. If you have not tried this editor (on Windows) yet, check it out.

    Monday, May 20, 2013

    Simulation Modeling for football (soccer) games

    In the last few weeks, I have come across two posts and discussions on modeling football (soccer) games with Monte Carlo simulation. Thought it might be interesting for our readers. Yes, I am more used to calling this game football, but let's just skip that part, shall we?

    The first one is a blog post detailing a simple model which tries to simulate the number of goals scored by each competing team in a match. The blog discusses quite a bit on the inner details of finding out distribution parameters using optimization, which may not be that relevant, but the post is interesting. Find the blog post here. The post models the world cup final of 2011.

    The second model is from our own Dave Hammal, who has posted the model in our LinkedIn group. He models the ongoing English Premier league, and predicts the match-by-match results. To access the post and the model, use this direct link

    Both models are similar, in that, they try to use discrete distributions to model the number of goals that are going to be scored in the game, and they find out the parameters of the discrete distribution from the past data for that team. The first post also discusses a few interesting improvements to the model. Note that, the first post is a static analysis of an old event (something similar to what I mentioned about the World Cup Cricket final in this post), whereas the model in the second post is dynamic, in that the model predictions are updated with the new data as the league progresses.

    Finally, here are two websites (I am sure there are more of these), which claim to contain stats related to soccer games: Squawka [link to TechCrunch coverage] and FTBPro [link to TechCrunch coverage]. None of these websites contain predictive modeling though, just stats and user generated contents.  

    Thursday, May 2, 2013

    New version of Oracle Crystal Ball (Release 11.1.2.3.000) is out

    Here is an excerpt from the official text:
    Crystal Ball Users,

    Crystal Ball 11.1.2.3 is released! The following is a summary of what’s new in Crystal Ball 11.1.2.3:

    • Redesigned Tornado Analysis Tool
    • Integrated Correlation Matrix Tool
    • Addition to Crystal Ball Developer Kit
    • Expanded OptQuest Efficient Frontier Results View
    • Support for Microsoft Excel 2013
    • Support for Microsoft Windows 8
    • Localization into Additional Languages
    • Documentation Now Certified on Apple Mobile Devices
    More information can be found in the online New Features Guide: http://docs.oracle.com/cd/E40248_01/epm.1112/cb_new_features/cb_new_features.html

    A trial version is downloadable from the Oracle Technology Network: http://www.oracle.com/technetwork/middleware/crystalball/downloads/index.html

    If you have not already done so, I also recommend visiting the Crystal Ball Solution Factory. Here you will find useful information about new releases in addition to presentations, discussions, and resources that cover different applications of Crystal Ball.

    Crystal Ball Solution Factory (http://launch.oracle.com Access URL/Page Token: cb4me)

    We appreciate your engagement and use of Crystal Ball in your business.
    If there are questions about the availability of the software or any other aspect, please get in touch.

    A clarification/update: The link I posted for downloading the new version of CB is not yet active - sorry for the inconvenience. Please use the following sites:

    - If you want to download the trial version, please use: http://www.oracle.com/technetwork/middleware/epm/downloads/crystal-ball-1112x-1939011.html

    - Upgrades are only available for customers on support. In those cases customers should use the Oracle Software Delivery Cloud (https://edelivery.oracle.com/) to download.

    Update (05/02/2013): Updated with more download links.

    Tuesday, April 16, 2013

    Demo video for Oracle Crystal Ball

    We have a new demo video out, and it looks fantastic. This would be a great way to introduce someone to the methodology of "thinking in ranges" espoused by Oracle Crystal Ball. Available from this link, it needs a quick registration. Enjoy !!

    Monte Carlo simulation example in transportation

    I used to work on transportation services procurement auction in my doctoral days. Since graduation, I have moved away from that sector. But, recently I had a chance to work on a technical research presentation in the transportation sector. 

    In my dissertation, I mostly used mixed integer programming formulations for solving bidding problems. Although there was a little bit of predictive analytics in the model, I did not really explore much of the Monte Carlo simulation aspect of it, except generating random numbers from normal distributions. This time though, I was able to use MC simulation quite a bit. The problem was on determining the safety stocks of tractors/trailers/drivers for a small trucking company which wishes to maintain certain service level.

    Although, network is an important part of transportation, I sidestepped that aspect by aggregating on the lanes in the transportation network. Agreed, that makes the model somewhat weak, but in my opinion, the model is still useful enough to get some mileage out of it.

    Following is the title and abstract of the presentation. Please get in touch using the comments section if you are working on something similar.

    Title: Determining Safety Stock for a Small Trucking Operation
    Abstract: In this presentation, we will determine the safety stock of trucks required by a small trucking operation to maintain a certain service level. We will start off with a simple model and use Monte Carlo simulation and stochastic optimization to determine the safety stock. Next we will extend the model to include more realistic situations and show that our approach still provides a fast, efficient and reliable way to calculate the variables and statistics of interest in the model.
    Presentation: Available here.

    My Ph.D. dissertation is also available on this page, just scroll to the 2006 entry. 

    Wednesday, March 13, 2013

    Displaying statistic in assumption cells

    This question often comes up in group discussions and support questions: although the assumptions and forecast cells in an Oracle Crystal Ball spreadsheet model change values while running a simulation, they revert back to the original values at the end of simulation. This often confuses new users. In this post, I will discuss the reasoning and some options to change this behavior (partially). For an example of such discussion, check this question in our LinkedIn group.

    First off, this is the default behavior of the software, and there is an explanation for this behavior. We can think about it this way: a simulation is a series of automated what-if analysis. We are trying out various input values in the assumption cells and then recording the output values from the forecast cell(s). The objective of the simulation is to get some statistical understanding of the output values (your forecasts) for a range of input values (your assumptions).

    At the end of simulation, we are done with the series of what-if analysis, and we just return back to the original value that was there in the cells before we started the analysis. We consider these original/starting values as base-case scenario. Since the modeler (you, in this case) have started off with these values, that is where we return to.

    But one can choose to see a different statistic in the assumption cells, extracted from the simulation results, after the simulation is complete. To do so, open the "Cell Preferences" dialog from the ribbon (it is the last one in the column left to the "Start" button, see Figure 1 below). There, choose your preferred statistic you wish to see after a simulation run for the assumptions in your model and apply this setting to your model using the 'Apply To..' button. Since the forecast cells are linked to one or more assumption cells by a formula, after the simulation they will automatically reflect the calculated values for the chosen statistic displayed in the assumption cells. 
    Figure 1: Cell Preferences
    For example, if you have chosen to show the mean statistic in the assumption cells after the simulation, the forecast cells will show the calculated value using the assumption means. Note that, depending on the formula, this final value shown in the forecast cell may or may not match with the corresponding statistic shown in  the assumption cell (mean in this case). If the forecast is non-linearly related to the assumption cells (i.e., the formula used in the forecast cell has nonlinear components like square, square root, log etc.), then the forecast mean would be different from the displayed value.

    Note, it is not possible to show certain statistic for a few assumption cells and certain other statistic or none for a few other ones, as that would lead to display problems. The same display preference has to be applied to all assumptions in the model.

    Update (3/15/2013): Corrected statement.

    Wednesday, February 6, 2013

    A praise on C#

    I am sure that there is no dearth of praises for the C# programming language, and you can say that I am a fan on the outset, but a paragraph I read today seem to summarize aspects of C# quite nicely. It was an article on testing C# (and Python) code appearing on drdobbs.com by Gigi Sayfan. The pragraph is quoted below:
    C# is a wonderful programming language. It started out as a better Java, and in each revision, it has added more and more good stuff (generics, anonymous functions, attributes, LINQ, async support) with great balance. For some reason (great language designers?), the power and richness of C# never gave me a feeling of bloat like other languages do. When you throw in the .NET framework and Visual Studio, you get a superb development and runtime environment.
    The only thing the author is missing here is mentioning the Mono engine, which makes C# cross-platform as well in the same sense as java is cross-platform, and that makes it really appealing. I hope to continue coding in C# for years to come.

    Wednesday, January 30, 2013

    Try Oracle Crystal Ball Free for 30 Days

    Breaking my long-time silence (have been really busy developing the next release) to bring a nice news. We have changed our software trial policy - our evaluation license now allows you to try out Oracle Crystal Ball for thirty days. We definitely hope that you are going to come back for more after the end of your month-long trial :-)


    Enjoy.