4-page Case Study
Posted: 4/12/2010
525
Rate This Evidence:

ORElogy Mine-Planning Software Uses Parallelization to Deliver Powerful New Capabilities

In developing its own mine-planning software, consultancy ORElogy needed to capitalize on the performance gains enabled by multicore processors and multiprocessor servers, but it wanted to avoid having to write a lot of low-level threading code. The company used the parallel-programming aids provided in the Microsoft Visual Studio 2010 development system and the .NET Framework 4 to achieve the performance needed to support geologic models consisting of millions of individual blocks of earth—an order of magnitude more than the practical limits imposed by many competing products. Through its use of parallel programming, the company is delivering compelling new capabilities for customers. And because ORElogy is using familiar tools, virtually no additional learning was required to parallelize its code.

Situation

Established in March 2005, ORElogy is a mine-planning consultancy based in Perth, Australia. With extensive operational and consulting experience throughout the world in a range of different

*
* We were able to parallelize our code very quickly and easily—and the parallel-programming tools we used are built into Visual Studio 2010 and the .NET Framework 4, so that code will be easy to maintain and enhance. *

Christie Myburgh
Mine Planning Consultant and .NET Software Developer, ORElogy

*
commodities, ORElogy personnel apply a global understanding of the mining industry to help clients develop practical solutions for maximizing the value of their operations.

For ORElogy, the decision to develop its own mine-planning software was a natural progression in the company’s growth. “Whether clients are bringing grade forward, pushing waste out, chasing a blend, minimizing capital, or any number of other objectives, mine planners face a huge range of potentially crucial decisions,” says Christie Myburgh, Mine Planning Consultant and .NET Software Developer at ORElogy. “There are several mine-planning packages on the market, each with its own strengths and weaknesses. In 2007, we decided that the time had come to develop our own software—a solution developed by mining engineers for mining engineers.”

ORElogy’s vision for its software, named evORElution, was an application that supports the entire mine-planning spectrum—from strategic planning through life-of-mine schedules to short-term scheduling—using the same data. The company also envisioned an intuitive, streamlined graphical user interface for defining potential schedules and assessing results. Just as important, to deliver what it saw as lacking in other mine-planning software, ORElogy envisioned supporting block-by-block scheduling of the mining process for geographic mine models consisting of millions of individual blocks of earth.
 
“The process starts with geo-statisticians creating a 3-D model that represents the ore body, after which a pit optimizer is used to produce an ultimate economical pit shell,” Myburgh explains. “Mining of the blocks of ore body inside this shell are then scheduled, subject to various constraints. Most commercially available mine-planning packages support a practical maximum of a few hundred thousand blocks before the model gets too large to manipulate effectively. Our approach takes advantage of the latest genetic algorithms to support millions of blocks, thereby giving mine planners greater accuracy in predicting the outcome of various scheduling tradeoffs.”

To achieve the performance required for models that large, ORElogy needed to fully take advantage of today’s modern computer hardware. More specifically, the company needed to parallelize its software, so that calculations are distributed across the multiple processing cores in today’s microprocessors. “The linear analysis techniques used by many of our competitors don’t lend themselves well to parallelization, which is why they’re limited in the number of blocks that can be analyzed,” says Myburgh. “However, our approach is fundamentally different—and lends itself nicely to parallelization.

*
* Our algorithm is embarrassingly parallel, so the use of PLINQ has given us near-linear performance gains as the number of processor cores increases—with all cores typically pegged at 100 percent utilization. *

Cameron MacFarland
Software Engineer, ORElogy

*
Given that multicore processors and multi-processor servers are common today, we needed a way to easily capitalize on the potential performance gains enabled by that trend—without having to write a lot of low-level code to handle threads, locks, and so on.”

Solution

ORElogy used the parallel-programming tools provided in the Microsoft Visual Studio 2010 development system and the Microsoft .NET Framework 4 to achieve the required level of application performance—specifically, enabling the company’s new software to support millions of blocks with rapid calculation times. “I had read about the work that Microsoft Research was doing in parallel computing before joining ORElogy,” recalls Cameron MacFarland, Software Engineer. “We had a design of our algorithm and needed to maximize its performance, so Microsoft’s decision to support parallel programming in its products was definitely a case of the right solution at the right time.”

New Parallel-Programming Aids
ORElogy parallelized its application by using the new parallelization libraries in the .NET Framework 4, which are often referred to as “Parallel Extensions to the .NET Framework” and are supported by new features in Visual Studio 2010. Key capabilities for parallelism provided in the .NET Framework 4 include:

  • Task Parallel Library (TPL), which includes parallel implementations of for and foreach loops (For and For Each in the Visual Basic language), in addition to rich support for coordinating the asynch-ronous execution of individual tasks. Implemented as a set of public types and APIs in the System.Threading.Tasks namespace, TPL relies on an extensible task-scheduling system that is integrated with the .NET ThreadPool and that scales the degree of concurrency dynamically so that all available processors and processing cores are used most efficiently.
  • Parallel Language-Integrated Query (PLINQ), a parallel implementation of LINQ to Objects that combines the simplicity and readability of LINQ syntax with the power of parallel programming. PLINQ implements the full set of LINQ standard query operators as extension methods in the System.Linq namespace, along with additional operators to control the execution of parallel oper-ations. As with code that targets the Task Parallel Library on top of which PLINQ is built, PLINQ queries scale in the degree of concurrency according to the capabilities of the host computer.
  • New data structures for parallel programming, which include concurrent collection classes that are scalable and thread-safe, lightweight synchronization primitives, and types for lazy initialization and producer/consumer scenarios. Developers can use these new data structures with any multithreaded application code, including that which uses the Task Parallel Library and PLINQ.

x
x
 

So far, PLINQ has proven to be the most useful to ORElogy. “We’re using LINQ to Objects very heavily, so PLINQ gave us a very easy way to increase performance,” says MacFarland. “Our approach is to create a list of ‘job’ structures and then use PLINQ to process the ‘job’ object and return a result. Our algorithm is embarrassingly parallel, so the use of PLINQ has given us near-linear performance gains as the number of processor cores increases—with all cores typically pegged at 100 percent utilization.”

Figure 1 provides an example of how ORElogy is using PLINQ in its code.

ORElogy also is taking advantage of the new parallel diagnostic tools in Visual Studio 2010 Professional, Visual Studio 2010 Premium, and Visual Studio 2010 Ultimate, which include the new Parallel Stacks and Parallel Tasks windows for debugging code. Visual Studio 2010 Premium and Ultimate also have a new Concurrency Visualizer, which is integrated with the profiler to provide graphical, tabular, and numerical data about how a multithreaded application interacts with itself and other programs. Developers can use these tools to quickly identify areas of concern and navigate through call stacks and to relevant call sites in the source code.

*
* Between the support for parallel programming in the .NET Framework 4 and the fact that it runs natively in a 64-bit environment, we have everything we need to eclipse the performance of competing solutions. *

Christie Myburgh
Mine Planning Consultant and .NET Software Developer, ORElogy

*
“I’m using the Parallel Stacks window heavily,” says MacFarland. “I haven’t used the new profiling tools much yet because I haven’t really needed them—PLINQ did exactly what we expected, in a way that didn’t introduce any new coding problems to solve.”

How It Works
ORElogy’s new application uses the raw block model data from existing mine-planning packages in the form of an exported text file, with that data stored internally using a custom file format. The export can consist of an unlimited number of block model items. After analysis is complete, an import file containing scheduling information can be generated for import back into the original planning system.

Mine planners use a simple, intuitive interface that combines flowchart and calendar paradigms to easily design schedules; logic built into evORElution highlights errors or inconsistencies. After a schedule is designed, the application uses genetic—or evolutionary—algorithms that apply the concepts of Darwinian theory to produce a range of viable solutions. “In essence, evORElution starts with a population of physically correct schedules and then recombines the ‘genetic makeup’ of these schedules over a number of generations,” says Myburgh. “Over time, the population migrates towards an optimum solution through a ‘survival of the fittest’ process.”

The output of that algorithm is a sequence of blocks, which can easily be “drilled into” for further detail, within a shorter time period. For example the blocks mined in a particular year from an annualized life-of-mine (LOM) schedule can be isolated and assessed on a monthly basis to check their validity or for potential variations. In a year scheduled by month for budgeting purposes, mine planners can isolate a single month and schedule it by day (or by 12-hour interval, depending on the block size). In this way, planners can develop monthly mine plans using the same tool they used for the LOM plan.

Benefits

By taking advantage of the support for parallel programming provided in Visual Studio 2010 and the .NET Framework 4, ORElogy is delivering a new mine-planning package that delivers unmatched performance and capabilities. And by building that solution using Microsoft software, the company was able to do so quickly and cost-effectively, with a minimal developer learning curve and a high level of confidence that the company’s new software will have a long life span.

d
d
“Parallel programming has enabled us to achieve far superior performance, which we’ve taken advantage of to deliver some very powerful new planning capabilities,” says Myburgh. “We were able to parallelize our code very quickly and easily—and the parallel-programming tools we used are built into Visual Studio 2010 and the .NET Framework 4, so that code will be easy to maintain and enhance.”

Significant Performance Gains
By building its solution using the latest Microsoft software, ORElogy has all it needs to ensure superior performance. “Between the support for parallel programming in the .NET Framework 4 and the fact that it runs natively in a 64-bit environment, we have everything we need to eclipse the performance of competing solutions,” says Myburgh. “Even the

*
* The Parallel Extensions for the .NET Framework mask a great deal of the complexity inherent in parallelizing an applica-tion, making it as easy as changing a few dozen lines of code. *

Cameron MacFarland
Software Engineer, ORElogy

*
user interface for our application is highly responsive because it takes full advantage of the support for vector graphics provided by Windows Presentation Foundation.”

Test results show that performance scales linearly with the number of cores in a system, up to about 20 cores, says MacFarland. “On our 24-core server, we’re seeing a 19- to 20-times performance gain, with memory bottlenecks causing processor utilization to peak at about 80 percent. We could mitigate this by copying the flyweight design pattern used to feed the algorithm, but that would further increase complexity, so we’ve decided against it for now.”

ORElogy also is considering the use of the Windows HPC Server 2008 R2 operating system as a path to additional performance gains. “The application was initially envisioned as a desktop application, but we’ve since moved to a client/server approach, where the algorithm runs on a server and the client application connects to a server over the network,” says MacFarland. “This allows us to protect our intellectual property more effectively without having to deal with obfuscation of the code. Because we’re now using a server back end, we plan on rewriting the algorithm for a more distributed environment, and we’ll be using Windows HPC Server for those machines.”

Powerful New Capabilities for Customers
Although the performance gains that the company is realizing are impressive on their own, the new capabilities enabled by that performance are what have ORElogy clients excited. “Most operators use mine models consisting of a few hundred thousand blocks because that’s what their software can support,” says Myburgh. “Users of evORElution will have the ability to work with larger data sets, in excess of a million blocks, which will provide a clearer estimate of the ore body. We’re seeing strong interest from clients that operate five or six mines because evORElution will enable them to group those mines together and optimize them as a single unit.”

The ability to support millions of blocks and generate multiple planning scenarios reduces surprises and operational risk. “Today, with the practical limit of a few hundred thousand blocks, companies often

*
* Most operators use mine models consisting of a few hundred thousand blocks because that’s what their software can support. Users of evORElution will have the ability to work with larger data sets, in excess of a million blocks, which will provide a clearer estimate of the ore body. *

Christie Myburgh
Mine Planning Consultant and .NET Software Developer, ORElogy

*
have to make tradeoffs, such as using data averaging to work with larger block sizes than they would otherwise,” says Myburgh. “By supporting the analysis of more, smaller blocks, we can deliver a more accurate simulation of the ore body and improved visibility into variability on a day-to-day basis.”

In addition, evORElution enables the optimization of multiple objectives in a single calculation run—for example, as required to minimize tradeoffs between chasing a particular grade of ore and a particular ratio of ore to waste. “If the objectives are conflicting, which is invariably the case, a tradeoff curve is developed, with schedules on the curve representing those schedule options that provide an optimal tradeoff between the conflicting objectives,” explains Myburgh. “Because the planner is provided with a range of possible schedules rather than one or two, a number of operating scenarios can be assessed quickly, their relative merit and risk evaluated, and a higher level of decision making used to choose an appropriate solution.”

Ease of Adoption and Software Development
ORElogy was able to parallelize its appli-cation quickly and easily, using familiar tools and technologies. “Although parallelization may be easy to describe at a high level, when you start thinking about the thread management and other low-level stuff that needs to happen behind the scenes, it can get very complex,” says MacFarland. “The Parallel Extensions for the .NET Framework mask a great deal of the complexity inherent in parallelizing an application, making it as easy as changing a few dozen lines of code. We’re very happy with the new parallel-programming support provided by Microsoft, and encourage the people behind those efforts to keep up the good work.”


Microsoft Visual Studio 2010
Microsoft Visual Studio 2010 is an integrated development system that helps simplify the entire development process from design to deployment. Unleash your creativity with powerful prototyping, modeling, and design tools that help you bring your vision to life. Work within a personalized environment that helps accelerate the coding process and supports the use of your existing skills, and target a growing number of platforms, including Microsoft SharePoint Server 2010 and cloud services. Also, work more efficiently thanks to integrated testing and debugging tools that you can use to find and fix bugs quickly and easily to help ensure high-quality solutions.

For more information about Visual Studio 2010, go to 
www.msdn.microsoft.com/vstudio


Microsoft Parallel Computing Platform
Developers today face an unprecedented opportunity to deliver new software experiences that take advantage of multicore and many-core systems. Microsoft is taking a comprehensive approach to simplifying parallel pro-gramming, working at all levels of the solution stack to make it simple for both native-code and managed-code developers to safely and productively build robust, scalable, and responsive parallel applications.

For more information on the Microsoft Parallel Computing Platform, go to:
http://msdn.microsoft.com/en-us/concurrency/default.aspx

For More Information
For more information about Microsoft products and services, call the Microsoft Sales Information Center at (800) 426-9400. In Canada, call the Microsoft Canada Information Centre at (877) 568-2495. Customers in the United States and Canada who are deaf or hard-of-hearing can reach Microsoft text telephone (TTY/TDD) services at (800) 892-5234. Outside the 50 United States and Canada, please contact your local Microsoft subsidiary. To access information using the World Wide Web, go to:
www.microsoft.com

For more information about ORElogy products and services, visit the Web site at:
www.orelogy.com


This case study is for informational purposes only. MICROSOFT MAKES NO WARRANTIES, EXPRESS OR IMPLIED, IN THIS SUMMARY.

Document published March 2010

Solution Overview



Organization Size: 15 employees

Organization Profile
ORElogy is a mine-planning consultancy and software developer. The company has 15 employees and is based in Perth, Australia.

Business Situation
ORElogy needed to parallelize its mine-planning application to achieve the required performance but wanted to avoid writing a lot of low-level threading code.

Solution
The company took advantage of the support for parallel programming in Microsoft Visual Studio 2010 and the .NET Framework 4.

Benefits
  • Significant performance gains (up to 20 times on a 24-core server)
  • Powerful new capabilities for customers
  • Ease of adoption and software development

Software and Services
  • Microsoft Visual Studio 2010 Ultimate
  • Microsoft .NET Framework 4
  • Windows Presentation Foundation

Vertical Industries
Manufacturing & Resources

Country/Region
Australia

Languages
English

RSS