1.0 ABSTRACT This paper presents some of the benefits of providing user-programmable logic in a pipeline simulator. A problem in using simulators is that accurate simulation of certain pipeline operations requires complex decision-making logic; logic which often is impossible to standardize. Examples of such decision-making operations include selection of compressor/pump units at stations, tank farm switching, and batched product schedules. To date there have really only been two choices in obtaining a simulator: buy an existing product or develop a customized simulator of your own. Traditional simulation products either make unsatisfactory simplifications or, at best, offer a few fixed options. Many companies have had to resort to customized simulators in order to achieve simulations which adequately fit their actual operations. Both of these options have serious drawbacks, and both lack the desired flexibility. A more recent solution to this problem has been to make this simulation logic accessible to the user. The term "user-programmable logic" is used to refer to this capability. Some of the implementation techniques which provide this in the industry are reviewed in this paper. In this paper the design, implementation, and practical results of one such system are examined in detail. Additionally, two actual applications of this system are described and the benefits of the feature are examined. Simulation of a gas transmission line containing several large, complex compressor stations, focusing on detailed unit start and stop decisions. Simulation of a batched liquid pipeline including associated tank farms, focusing on tank farm operations and batch transport decisions. 2.0 Introduction Pipeline simulators have made great strides in the last several years. They are more reliable and more powerful. They can solve more problems in wider fields of application. The advent of better MMI's (man-machine interfaces), such as graphical user interfaces (GUI's), is transforming simulators from "engineering use only" packages into tools which can be easily integrated into day-to-day operations. GUI's are also giving users information in forms that they can really use, and doing it with less thought and input on the user's part. Despite all of this, there are several hurdles that are yet to be cleared; problems which are limiting the benefits of pipeline simulation. Three of these are summarized as follows: 2.1 Problem 1: Standardized Software vs. Customized Software The user choosing a simulator faces a dilemma between standardized software vs. customized software. Factors to be considered in getting a simulator are benefits, initial cost, and maintenance costs. A user wants a simulator that performs as closely as possible to his specifications. However, the initial cost of the software and the cost of maintaining it are also extremely important. Standardized software packages acquired from vendors are usually the lower cost option, both in initial cost and maintenance cost. Most also have the benefit of ongoing development programs, more features, better user interfaces, and more general purpose applications.