intelligent software agents : intelligent agents for the supply chain online research institute

Upload: fnadeau96

Post on 03-Apr-2018

227 views

Category:

Documents


1 download

TRANSCRIPT

  • 7/28/2019 Intelligent Software Agents : Intelligent Agents for the Supply Chain Online Research Institute

    1/35

    TME3Final Report

    COMP667Intelligent Software Agents

    by

    Marty BoogaartStudent ID: 9502090

    andFrancois Nadeau

    Student ID: 2517245

    Professor: Chunsheng YangAthabasca University

    July 31, 2006

  • 7/28/2019 Intelligent Software Agents : Intelligent Agents for the Supply Chain Online Research Institute

    2/35

    Table of Contents

    1 INTRODUCTION................................................................................................................................................1

    GOAL ...............................................................................................................................................................1o What did we try to do? .............................................................................................................................1o Who would benefit?..................................................................................................................................1

    PREVIOUS WORK.............................................................................................................................................1o What related work has other people done?..............................................................................................1o When do previous approaches fail/succeed? ...........................................................................................2

    APPROACH .......................................................................................................................................................2o What approach did we try? ......................................................................................................................2o Under what circumstances do we think it should work well? ..................................................................2o Why do we think it should work well under those circumstances?...........................................................2

    2 METHODOLOGY...............................................................................................................................................2

    WHAT PIECES HAD TO BE IMPLEMENTED TO EXECUTE OUR APPROACH?...........................................................2 FOR EACH PIECE... ............................................................................................................................................3

    o Were there several possible implementations? ........................................................................................3

    Agent......................................................................................................................................................................... 3User Interface............................................................................................................................................................ 3Simulation Wrapper .................................................................................................................................................. 3Data Store ................................................................................................................................................................. 3

    o If there were several possibilities, what were the advantages/disadvantages of each?...........................3Agent......................................................................................................................................................................... 3User Interface............................................................................................................................................................ 4Simulation Wrapper .................................................................................................................................................. 5Data Store ................................................................................................................................................................. 6

    o Which implementation(s) did we do? Why? .............................................................................................6Agent......................................................................................................................................................................... 6User Interface............................................................................................................................................................ 6Simulation Wrapper .................................................................................................................................................. 6Data Store ................................................................................................................................................................. 6

    o What did we implement?

  • 7/28/2019 Intelligent Software Agents : Intelligent Agents for the Supply Chain Online Research Institute

    3/35

    The Facts................................................................................................................................................................. 20A Simple Analysis - First Order Approximation..................................................................................................... 20An Empirical Estimate ............................................................................................................................................21

    WHAT EXPERIMENTS DID WE EXECUTE?.........................................................................................................22 PROVIDE QUANTITATIVE RESULTS. ................................................................................................................22

    ParanoidAgent......................................................................................................................................................... 22ConsiderateParanoidAgent...................................................................................................................................... 23RBPushAgent (Rules Based Push) .......................................................................................................................... 23RB_PullSpikeAgent ................................................................................................................................................23RB_PullRandomAgent............................................................................................................................................24RulesBasedAgent .................................................................................................................................................... 24

    WHAT DO OUR RESULTS INDICATE? ...............................................................................................................24o Introduction............................................................................................................................................25o Data Summary........................................................................................................................................25o ANOVA Results ......................................................................................................................................26o Means Comparison Results....................................................................................................................26

    4 DISCUSSION......................................................................................................................................................27

    OVERALL, IS THE APPROACH WE TOOK PROMISING?.......................................................................................27 WHAT DIFFERENT APPROACH OR VARIANT OF THIS APPROACH IS BETTER? ....................................................28

    WHAT FOLLOW-UP WORK SHOULD BE DONE NEXT? .......................................................................................28 WHAT DID WE LEARN BY DOING THIS PROJECT?.............................................................................................28

    5 CONCLUSION...................................................................................................................................................29

    APPENDIX A SOFTWARE PACKAGE..............................................................................................................A

    REFERENCES ...........................................................................................................................................................C

  • 7/28/2019 Intelligent Software Agents : Intelligent Agents for the Supply Chain Online Research Institute

    4/35

    Athabasca University COMP667, Tutor Marked Assignment 3 Final Project 27 July 2006

    Francois Nadeau & Marty Boogaart Page 1

    1 Introduction

    GoaloWhat did we try to do?

    The goal of our project was to research and develop a web-based application to allow

    software agents to interact with students while using the Supply Chain CollaborationOnline Research Institute (SCCORI) supply chain simulation. This application interactswith the simulation through the HTML user interface provided by SCCORI, andtherefore functions independently from this system and does not require anymodifications of the SCCORI site.

    oWho would benefit?The main purpose of the system is to allow students to use the SCCORI simulationwithout having four human players.

    Previous Worko

    What related work has other people done?Others have created the SCCORI Supply Chain Simulation, which challenges students tominimize product costs under varying scenarios.

    The SCCORI supply chain simulation tool allows its users to experience the constraintsand functioning of a business supply chain. All of the players in the simulation are givena role to play in the chain, and are able to purchase items in a turn-by-turn manner. Figure1 demonstrates the simulation flow.

    Figure 1 SCCORI Simulation Supply Chain

    The SCCORI supply chain penalizes players who are unable to deliver items to the nextplayer in the chain. Therefore, players are encouraged to keep items in inventory tominimize the chance of back-logs occurring. However, this strategy is not ideal since thesimulation associates a cost for the storage of items. Also, there is a fixed container-shipping cost, which penalizes small orders. Therefore, the best overall strategy is for thefour players to cooperate with each other in order to minimize the total amount of

    inventory, transport cost, and the occurrence of back-logs.

    Students are expected to form into groups of four in order to occupy each of the fourpositions in the supply chain (i.e., retailer, wholesaler, distributor, and manufacturer).

    To our knowledge, no one has attempted to provide intelligent agents to occupy one ormore of these positions. Our goal was to not only create agents that would perform aswell as knowledgeable human players, but to also to create agents that used simple andpredictable (albeit poor) strategies.

  • 7/28/2019 Intelligent Software Agents : Intelligent Agents for the Supply Chain Online Research Institute

    5/35

    Athabasca University COMP667, Tutor Marked Assignment 3 Final Project 27 July 2006

    Francois Nadeau & Marty Boogaart Page 2

    oWhen do previous approaches fail/succeed?Problems occur when one or more students are unavailable to occupy their assignedpositions. This forces other players to open two or more browser windows in order tooccupy the missing players position(s). This can be both confusing and time consuming.

    Another failure of the present system is that some users may not understand a particular

    strategy, or they may choose not to play a consistent strategy. This can be frustrating tothe student who is seriously trying to use the SCCORI simulation to test supply chainmanagement techniques.

    ApproachoWhat approach did we try?

    Our approach proceeded as follows:

    A) Create the infrastructure components.B) Create and document various agents with different supply-chain strategies.C) Analyze the results repetitive execution of the agents in the simulation.

    Workitem A in this list involved the creation of an Object Oriented application, and didnot present a significant challenge to the development of this project.

    Workitem B required us to develop agents capable of following various businessstrategies.

    The last work item, item C, required us to analyze the performance of our intelligentagents. The main purpose was to characterize our agents in order to provide a variety ofagents to serve different purposes. This task required us to retrieve the simulation resultsfrom the SCCORI simulation site and to analyze these results with Excel spreadsheetsand advanced statistical tests.

    oUnder what circumstances do we think it should work well?We believe that this system is capable of functioning along side other humans as long ashuman-to-agent is not required. This is because we did not have time to provide aninterface to allow the humans to interact with the agents.

    oWhy do we think it should work well under those circumstances?We designed it to work well under those circumstances, because these conditions werethe requirements for this project.

    2 Methodology

    What pieces had to be implemented to execute our approach?We desired to create four pieces, as shown in Figure 2 below, but time constraints limited

    us to the three critical ones: Agent, User Interface, and Simulation Wrapper. Due to thelack of the Historic Data piece, we had to rely on manually downloading the simulationresults from the SCCORI simulation site rather than simply pulling them from our owndatabase. This, however, did not diminish the projects success, since we were able toretrieve all of the required information from the SCCORI website.

  • 7/28/2019 Intelligent Software Agents : Intelligent Agents for the Supply Chain Online Research Institute

    6/35

    Athabasca University COMP667, Tutor Marked Assignment 3 Final Project 27 July 2006

    Francois Nadeau & Marty Boogaart Page 3

    Figure 2 System Architecture

    For each piece...oWere there several possible implementations?AgentSeveral implementations of Intelligent Agents were possible. Some that we consideredinclude:logical (rules based), fuzzy logicdecision-tree learning, genetic search social rules based (i.e., communicating)User InterfaceWe identified three possibilities for the implementation of the user interface; a server side

    web application, a client side application, or integrating it within the SCCORI web site.Simulation WrapperWe identified two possible implementations for allowing us to communicate with theSCCORI web site; the creation of a headless component which would be capable ofinterpreting the HTML code generated by the SCCORI web site, or the modification ofthe SCCORI web site to allow us to communicate with the use of XML based documents.

    Data StoreThe persistence layer would have been constructed with the use of anObject-to-Relational mapping tool, such as Hibernate. This is in accordance to industrialbest practices. Another less efficient implementation would have been to use JDBC.

    oIf there were several possibilities, what were the advantages/disadvantagesof each?Agentlogical (rules based), fuzzy logic

    Advantages of the logical agents are that they are relatively easy to program and theirbehaviour is immediately available for observation. A disadvantage of the logicalagents is that the rules can get complex if you allow them to.

  • 7/28/2019 Intelligent Software Agents : Intelligent Agents for the Supply Chain Online Research Institute

    7/35

    Athabasca University COMP667, Tutor Marked Assignment 3 Final Project 27 July 2006

    Francois Nadeau & Marty Boogaart Page 4

    decision-tree learning, genetic searchUpon discovering that in SCCORI simulations all spiked runs are identical, we realizedthat a genetic search agent could discover the best possible strategy for us. However,the disadvantage of this approach is that each SCCORI simulation takes roughly half-an-hour. With four agents playing each thirty-cycle simulation, there are 120 possible

    entries to consider. That many degrees of freedom would require more simulation runsthan we had time to for, and therefore we did not implement such a scheme.

    Neural networks suffer from the same problem as the genetic search agent.

    At first decision trees appeared attractive, but considering that an agent may order zeroto one-hundred (or more) items, their discrete nature would require too many leaves foreach possible situation. Furthermore, given our time constraints, the task of creating apedagogy to teach such a decision tree agent was too daunting.

    social rules based (i.e., communicating)Communicating agents also appeared initially attractive, and given sufficient time, wewould have liked to create one.

    A basic communication mechanism which used the Observer pattern was created, butunfortunately we were unable to complete specifications for an agent which would beable to be optimized through communication. The main problem with the constructionof such an agent was the need to create different agent logic for each of the SCCORIroles available.

    Two other issues dissuaded us from constructing agents which were able tocommunicate. (1) In push mode, the players can only see their own stocking levels andthey are not allowed to communicate with each other. In such a situation, our agentsshould live by the same rules. (2) In pull mode, the players (and our agents) can see allof the stock levels, so there is really no need to communicate, since our agents can

    deduce the same logic as what would be communicated. For instance, our rules-based-pull agents monitor the Retailers stock-on-hand and their suppliers stocking levels toenable them to act in ways that benefit both their own situation and that of the overallsupply chain.

    User InterfaceWe identified three possibilities for the implementation of the user interface; a server sideweb application, a client side application, or integrating it within the SCCORI web site.

    Web Application

    DescriptionThe creation of a server side application which would allow itsusers to control the agents from a web browser.

    Advantageso

    Students don't need to install an application.

    o Centralized control of the agents created.o Simple agent-to-agent communication mechanism can be

    used.

    Disadvantageso Limited number of concurrent agents.o Requires to be hosted on a server.

  • 7/28/2019 Intelligent Software Agents : Intelligent Agents for the Supply Chain Online Research Institute

    8/35

    Athabasca University COMP667, Tutor Marked Assignment 3 Final Project 27 July 2006

    Francois Nadeau & Marty Boogaart Page 5

    Client Side Application

    DescriptionThe construction of an application which would be executed bythe students computers.

    Advantages Un-limited number of concurrent agents can be created.

    Disadvantages

    o Requires a distributed agent-to-agent communicationplatform.

    o Students need to install an application on their owncomputers.

    o De-centralized control of the agents created.Integration with the SCCORI website

    Description

    The agents could have been integrated directly inside theSCCORI web site. This would of required modifications of theSCCORI source code to integrate agent-based methodologies.

    Advantageso Ease of use.o Greater control of agent use.

    Disadvantageso Dependence on the SCCORI web site source code.o The authors wanted to construct agents, not only an

    intelligent software component.

    Simulation Wrapper

    Headless Web Browser

    Description

    The creation of a component which is capable of parsing theHTML code from the SCCORI server, and enters inputs on ourbehalf.

    Advantageso Ease of implementation.o Independence from the SCCORI web site source code.

    Disadvantageso Requires the parsing of HTML code which was deign for

    human usability, and therefore contains formatting tagswhich are not needed by the wrapper.

    Modification of the SCCORI web site

    DescriptionThe addition of an XML based communication channel on theSCCORI web site.

    Advantages

    o Clear API definition for the agent-to-server communication.o The SCCORI server would be able to distinguish between

    human and agent players.

    Disadvantages

    o Future modification of the SCCORI server would need to bereplicated in both communication channels (the HTML andXML interface).

    o Students need to install an application on their owncomputers.

    o De-centralized control of the agents created

  • 7/28/2019 Intelligent Software Agents : Intelligent Agents for the Supply Chain Online Research Institute

    9/35

    Athabasca University COMP667, Tutor Marked Assignment 3 Final Project 27 July 2006

    Francois Nadeau & Marty Boogaart Page 6

    Data StoreThe use of database for persistent storage is a standard practice in software developmentprojects, and therefore will not be further discussed.

    oWhich implementation(s) did we do? Why?AgentWe implemented logical/non-social agents for the reasons stated above.They are relatively easy to program. By carefully studying the SCCORI simulations,

    we were able to deduce a number of rules of thumb that could be easily implementedin propositional logic.

    Their behaviour is immediately observable. Considering that each simulation takesroughly thirty minutes, errors in design need to be ferreted out early on.

    Communications is not allowed inpush simulations and not necessary inpullsimulations.

    User InterfaceWe decided to create a web-based user interface for two reasons. First we believed that

    some students may not be willing to download and install an application, but that theywill be more willing to try a web application. Secondly, we did not want to embed ourcode within the SCCORI web site because we wanted to make this project as independentas possible from this site. In this way, it was are goal to create agents who's behaviourcould not be distinguished from a human player.

    Simulation WrapperWe decided to create a communication wrapper because we believed that this would beeasier then modifying the SCCORI web site source code. Another reason can be found inthis project's philosophy, which was to construct a separate component which couldinterface with the SCCORI web server, without needing any modifications of the targetserver.

    Data StoreWe did nothing, and therefore introduced no bugs in this section.

    oWhat did we implement?

  • 7/28/2019 Intelligent Software Agents : Intelligent Agents for the Supply Chain Online Research Institute

    10/35

    Athabasca University COMP667, Tutor Marked Assignment 3 Final Project 27 July 2006

    Francois Nadeau & Marty Boogaart Page 7

    Cycle Cost

    This cost is calculated each time a player places an order, even an order of zero.

    tBackLogCosentoryBackLogInv

    stHandlingConHandInventoryO

    ostContainerCntainersNumberOfCo

    tProductCosderedQuantityOrCycleCost

    Total Cost

    The total cost is simply a running total of all cycle costs, plus the cost of the startinginventory.

    n

    tProductCosventoryStartingInCycleCostTotalCost1

    Unit Cost

    Unit cost is the price per unit ordered, based on your performance. With high costs, the

    cost per unit will be higher. To keep a good unit cost, maintain a low inventory, order fullcontainers, and never run into a backlog.

    ventoryStartingIndtoryOrdereTotalInven

    TotalCostUnitCost

    Transportation Information

    Type Container Size Container Cost Capacity

    Truck 20 feet $10 60 units

    Truck 40 feet $20 120 units

    Train 20 feet $20 60 units

    Train 40 feet $30 120 units

    Plane 20 feet $35 60 unitsPlane 40 feet $45 120 units

    Ship 20 feet $40 60 units

    Ship 40 feet $60 120 units

    Transportation Notes

    1. Although, the SCCORI simulation indicates the Type, it does not immediatelyindicate the Container Size.

    2. The default simulations all run with a 20 foot Truck.3. Given points 1 and 2, the Rules Based agent will always assume a 20 foot truck.

    Thus:oshipping charges for 60 units is $10 (16.7 cents per unit)oshipping charges for 61 units is $20 (32.8 cents per unit)oit is important to ship at or near capacity, but never just over capacity

    Per item shipping charges range from:oa minimum of 16.7 cents per unit tooa maximum of 10 dollars per unit

  • 7/28/2019 Intelligent Software Agents : Intelligent Agents for the Supply Chain Online Research Institute

    11/35

    Athabasca University COMP667, Tutor Marked Assignment 3 Final Project 27 July 2006

    Francois Nadeau & Marty Boogaart Page 8

    Variable Notations

    Not all agents use all these variables; but, the rules-based agents use most of them.

    supplier: is WHOLESALER, DISTRIBUTOR, MANUFACTURERforRETAILER,WHOLESALER, DISTRIBUTORrespectively.

    sp.SOH: the current stock on hand held by the agent's suppliersp.LTD1: the amount which was ordered one cycle ago by the suppliersp.LTD2: the amount which was ordered two cycles ago by the suppliersp.LTD3: the amount which was ordered three cycles ago by the suppliersp.Stock: the total stock in supplier's SOH and in transit to suppliermy.SOH: the current stock on hand inventory held by the agentmy.LTD1: the amount which was ordered one cycle ago by the agentmy.LTD2: the amount which was ordered two cycles ago by the agentmy.LTD3: the amount which was ordered three cycles ago by the agentre.SOH: the current retailer's stock on handre.orderReceived: the most recent order place on the retailerre.BO: is retailer seriously back logged? (TRUE or FALSE)invMax: maximum number of items which the agent can have in its supply chainmy.InvMax: maximum number of items that this position wants to stock up tosafetyLevel: SOH trigger level below which the agent needs to order productcontainerSize: maximum number of items in a shipment (assume 60 units)Order: the maximum amount that needs to be orderedminOrder: minimum order to keep down shipping costs (use half a container)remainder: Order modulo containerSize (remainder = Order % containerSize)

    isSpiked: is TRUE or FALSE if a spike has occurred

    ParanoidAgent

    Algorithm Definition

    The Paranoid Agent is a purely reactive agent (Wooldridge, 2002). Each turn, this agentorders the amount of items missing from its On Hand inventory in order to keep it100% full.

    Analysis

    Let

    my.SOH be the current On Hand inventory held by the agentmy.LTD1 be the amount which was ordered one cycle ago by the agentmy.LTD2 be the amount which was ordered two cycles ago by the agentmy.LTD3 be the amount which was ordered three cycles ago by the agentinvMax be the maximum number of items which the agent can have in the supply

    chain

  • 7/28/2019 Intelligent Software Agents : Intelligent Agents for the Supply Chain Online Research Institute

    12/35

    Athabasca University COMP667, Tutor Marked Assignment 3 Final Project 27 July 2006

    Francois Nadeau & Marty Boogaart Page 9

    Then we get

    3.2.1..

    00

    0

    LTDmyLTDmyLTDmySOHmyinvMaxremainder

    remainderOrder

    remainderremainderOrderAgent

    Assumptions

    The system does not allow agents to order more items than invMax. Thereforeremainder will always be greater than or equal to zero.

    Advantages

    Agent should minimize penalties from Back Logs.Cooperative agent since subsequent players can count on receiving items quickly

    from this agent.

    Disadvantages

    Does not consider the previous player in the chain. That is, this agent will order evenif the next player does not have the items On Hand, which will cause that player to bepenalized by Back Logs.

    Results

    Four ParanoidAgents played all positions on ten Random-Push simulations.

    The results are the average and standard deviations of cycle 30 of each run. To simplify comparisons to other agents:othe average unit cost is the simple average of all four agents' unit costsothe Total Costs is the sum of all four agents' total costs

    Back Order LogicTo simplify the logic and also to ensure robustness, the agents do not maintain amemory of previous orders. This allows agents to enter a simulation at any cycle, whichis good for stopping and restarting later.

    The SCCORI simulation does not provide data as to how many items are backloggedby the agent's supplier. Any backlogged item is considered in the agent's supply chaineven though it does not show up in the sum of SOH, LD1, LD2, and LD3. This is aproblem for the Paranoid agent which will order whatever it thinks that it still needs. Ina backlogged situation, this often causes the agent to order too much, causing theSCCORI simulation to announce an invalid order and then to wait for the agent to try

    again. This is captured by the agent's invalidOrder() method which employs the

    following logic to: first try to set the order placed equal to the order received, and in theevent that fails, to simply place an order of zero so that the SCCORI server can carryon. This logic is a compromise between placing a good order and providing a quickresponse.

    Antecedent Consequent Comments

    Order > orderReceived set Order = orderReceived Try to just replenish the last order.

    Order

  • 7/28/2019 Intelligent Software Agents : Intelligent Agents for the Supply Chain Online Research Institute

    13/35

    Athabasca University COMP667, Tutor Marked Assignment 3 Final Project 27 July 2006

    Francois Nadeau & Marty Boogaart Page 10

    ConsiderateParanoidAgent

    Algorithm Definition

    The Considerate-Paranoid Agent is a slightly improved Paranoid agent. Each turn,this agent will order the amount of items which is missing from its On Hand

    inventory in order to have it 100% full; but, it will not cause a considerate supplier topost a backlog.

    A considerate supplier is one that attempts to maintain adequate stock for itscustomers. A supplier that allows the inventory to drop below the Safety Stock level,has insufficient product in transit to recover to that level and still does not place anorder is considered inconsiderate.

    This agent does not need to be considerate when placed in the MANUFACTURERposition, because the factory can always deliver - it does not suffer backlog penalties.In the MANUFACTURER position the agent reverts to a simple Paranoid Agent.

    This agent is only effective in the Pull mode where it can see all of the other agentsstock and order numbers.

    Analysis

    Let

    supplier be WHOLESALER, DISTRIBUTOR, MANUFACTURER forRETAILER, WHOLESALER, DISTRIBUTOR respectively

    sp.Order be the amount just ordered by the agent's suppliersp.SOH be the current On Hand inventory held by the agent's suppliersp.LTD1 be the amount which was ordered one cycle ago by the suppliersp.LTD2 be the amount which was ordered two cycles ago by the suppliersp.LTD3 be the amount which was ordered three cycles ago by the suppliermy.SOH be the current On Hand inventory held by the agentmy.LTD1 be the amount which was ordered one cycle ago by the agentmy.LTD2 be the amount which was ordered two cycles ago by the agentmy.LTD3 be the amount which was ordered three cycles ago by the agentinvMax be the maximum number of items which the agent can have in the supply

    chain.

    theSafetyStock be the minimum amount of stock desired before an order must bemade

    Then we get

    3.2.1..

    3.2.1..

    00

    0

    LTDmyLTDmyLTDmySOHmyinvMaxremainder

    LTDspLTDspLTDspSOHsptalStocksupplierTo

    remainderOrder

    remainderremainderOrderAgent

    SOHspremainderremaindertocktheSafetyStalStocksupplierTo

    .,minreturnelse

    return)(if

  • 7/28/2019 Intelligent Software Agents : Intelligent Agents for the Supply Chain Online Research Institute

    14/35

    Athabasca University COMP667, Tutor Marked Assignment 3 Final Project 27 July 2006

    Francois Nadeau & Marty Boogaart Page 11

    Assumptions

    The system does not allow agents to possess more items than invMax. Thereforeremainder will always be greater than or equal to zero.

    Advantages

    Agent should minimize its own Backlog penaltiesAgent should minimize its supplier's Backlog penaltiesCooperative agent since subsequent players can count on receiving items quickly

    from this agent

    Disadvantages

    Does not minimize stocking charges in that it always tries to maintain maximumstock rather than sufficient stock

    Does not minimize shipping costs in that it will order small quantities rather than afull truck-load

    Consider three positions. A Considerate-Paranoid supplier may appear to beinconsiderate if that agent's supplier is backlogged (or had very little stock). The first

    agent does not look farther than its supplier and so may punish its supplier with abacklogging order even though that supplier is being considerate to the next supplier(who is already backlogged).

    Back Order Logic

    The Considerate Paranoid agent uses exactly the same back-order logic as Paranoidagent. Please see Paranoid agents back-order logic for details.

    The remaining four Rules Based agents are reasoning agents that use propositionallogic to choose the best course of action (Russell, 2003).

    RBPushAgent (Rules Based Push)

    ObjectivesDesigned for push runs, this agent cannot see the other agents' stock levels.It attempts to maintain adequate stocks while minimizing shipping costs.The Facts

    Order = my.InvMax my.SOH my.LD1 my.LD2 my.LD3my.InvMax = [ 90 | 45 | 80 | 80 ]

    for[ RETAILER | WHOLESALER | DISTRIBUTOR | MANUFACTURER ] respectively.

    safetyLevel = 55containerSize = 60minOrder = 30The Rules

    Antecedent Consequent CommentsOrder < 0 set Order = 0 Do not order negative quantities.

    my.SOH > safetyLevel set Order = 0 Is an order really needed?

    Order < minOrder set Order = 0 Avoid small shipments.

    Order > containerSize ANDremainder < minOrder

    set Order = remainder Is there enough for another container?

    Order > 90 set Order = 90Orders > 90 seem unreasonable, but blindagent may try, so force 90.

  • 7/28/2019 Intelligent Software Agents : Intelligent Agents for the Supply Chain Online Research Institute

    15/35

    Athabasca University COMP667, Tutor Marked Assignment 3 Final Project 27 July 2006

    Francois Nadeau & Marty Boogaart Page 12

    Back Order Logic

    To simplify the logic and also to ensure robustness, the agents do not maintain amemory of previous orders. This allows agents to enter a simulation at any cycle, whichis good for stopping and restarting later.

    The SCCORI simulation does not provide data as to how many items are backlogged

    by the agent's supplier. Any backlogged item is considered in the agent's supply chaineven though it does not show up in the sum of SOH, LD1, LD2, and LD3. This is not aproblem for a Pull simulation, because the Pull-aware agents are considerate and willnot order any more than the supplier can deliver. However, the RB_PushAgent willorder whatever it thinks that it still needs. In a backlogged situation, this often causesthe agent to order too much, causing the SCCORI simulation to announce an invalidorder and then to wait for the agent to try again. This is captured by the agent's

    invalidOrder() method which employs the following logic to step down to a valid

    order. This logic is a compromise between finding a good order and providing quickresponse.

    Antecedent Consequent Comments

    Order > 90 set Order = 90 An order greater than 90 is usually not necessary.

    Order > 60 set Order = 60 Orders between 60 and 90 are too expensive to ship.

    Order > 55 set Order = 55

    Order > 50 set Order = 50 Notice that this logic steps by five each time for a

    Order > 45 set Order = 45 maximum of eight attempts to find an acceptable value.

    Order > 40 set Order = 40 Otherwise it just capitulates to a zero order.

    Order > 35 set Order = 35

    Order > 30 set Order = 30

    Order

  • 7/28/2019 Intelligent Software Agents : Intelligent Agents for the Supply Chain Online Research Institute

    16/35

    Athabasca University COMP667, Tutor Marked Assignment 3 Final Project 27 July 2006

    Francois Nadeau & Marty Boogaart Page 13

    The Facts

    Order = my.InvMax my.SOH my.LD1 my.LD2 my.LD3sp.Stock = sp.SOH + sp.LD1 + sp.LD2 + sp.LD3 (not needed by MANUFACTURER)my.InvMax = [ 100 | 80 | 80 | 65 ]

    for[ RETAILER | WHOLESALER | DISTRIBUTOR | MANUFACTURER ] respectively.

    safetyLevel = 40containerSize = 60minOrder = 30re.BO = FALSEisSpiked = FALSEThe Rules

    Antecedent Consequent Comments

    re.OrderReceived > invMax set isSpiked = TRUEOnly one spike is everexpected.

    re.SOH < 15 set re.BO = TRUEThings are really bad ifretailer is this far in the hole.

    re.SOH > 15 set re.BO = FALSE Things are looking good sodon't overstock the supplychain.

    re.BO = TRUE ORisSpiked = FALSE

    set Order = (Order +invMax my.InvMax)

    Maximize the stocking levels.

    (I am not MANUFACTURER) AND(sp.Stock >= safetyLevel)

    set Order tomin(sp.SOH, Order)

    Be considerate of a supplierwho works to maintainadequate supplies.

    (I am the MANUFACTURER) ANDre.BO = TRUE

    set Order = invMax my.SOH my.LD1 my.LD2 my.LD3

    We may not let manufacturerexceed invMax.

    Order < 0 set Order = 0 zeroDo not order negativequantities.

    NOT(re.BO) AND isSpiked ANDmy.SOH > safetyLevel set Order = 0 Is an order really needed?

    NOT(re.BO) AND isSpiked ANDOrder < minOrder

    set Order = 0Avoid small shipments, unlessthe retailer is seriouslybacklogged.

    NOT(re.BO) AND isSpiked ANDOrder > containerSize ANDremainder < minOrder

    set Order = remainder Enough for another container?

    Back Order Logic

    The RB_PullSpike agent uses exactly the same back-order logic as RB_Push agent.Please see RB_Push agents back-order logic for details.

  • 7/28/2019 Intelligent Software Agents : Intelligent Agents for the Supply Chain Online Research Institute

    17/35

    Athabasca University COMP667, Tutor Marked Assignment 3 Final Project 27 July 2006

    Francois Nadeau & Marty Boogaart Page 14

    RB_PullRandomAgent

    Objectives

    Designed for pull runs.This agent is optimized to perform well on random runs; but, it does not perform well

    on spiked runs.It attempts to maintain adequate stocks, minimize shipping costs, and not backlog its

    supplier.

    The difference between this agent and the RulesBasedAgent is invMax versusmy.InvMax.

    The Facts

    Order = my.InvMax my.SOH my.LD1 my.LD2 my.LD3sp.Stock = sp.SOH + sp.LD1 + sp.LD2 + sp.LD3 (not needed byMANUFACTURER)my.InvMax = [ 100 | 80 | 80 | 65 ]

    for [ RETAILER | WHOLESALER | DISTRIBUTOR | MANUFACTURER] respectively.

    safetyLevel = 40containerSize = 60minOrder = 30re.BO = FALSEThe Rules

    Antecedent Consequent Comments

    re.SOH < 15 set re.BO = TRUEThings are really bad if retailer isthis far in the hole.

    re.SOH > 15 set re.BO = FALSEThings are looking good so don'toverstock the supply chain.

    re.BO = TRUE set Order = invMax Maximize stocking levels.

    (I am not MANUFACTURER)AND(sp.Stock >= safetyLevel)

    set Order tomin(sp.SOH, Order)

    Be considerate of a supplier whoworks to maintain adequatesupplies.

    (I am the MANUFACTURER)AND re.BO = TRUE

    set Order = invMax my.SOH my.LD1 my.LD2 my.LD3

    We may not let manufacturerexceed invMax.

    Order < 0 set Order = 0 zero Do not order negative quantities.

    NOT(re.BO) ANDmy.SOH > safetyLevel

    set Order = 0 Is an order really needed?

    NOT(re.BO) ANDOrder < minOrder

    set Order = 0Avoid small shipments, unless theretailer is seriously backlogged.

    NOT(re.BO) ANDOrder > containerSize AND

    remainder < minOrderset Order = remainder Enough for another container?

    Back Order LogicThe RB_PullRandom agent uses exactly the same back-order logic as RB_Push agent.Please see RB_Push agents back-order logic for details.

  • 7/28/2019 Intelligent Software Agents : Intelligent Agents for the Supply Chain Online Research Institute

    18/35

    Athabasca University COMP667, Tutor Marked Assignment 3 Final Project 27 July 2006

    Francois Nadeau & Marty Boogaart Page 15

    RulesBasedAgent

    Objectives

    Designed for pull runs.This is a generic agent that does reasonably well on both random and spiked runs.It attempts to maintain adequate stocks, minimize shipping costs, and not backlog its

    supplier.

    The Facts

    Order = my.InvMax my.SOH my.LD1 my.LD2 my.LD3sp.Stock = sp.SOH + sp.LD1 + sp.LD2 + sp.LD3 (not needed byMANUFACTURER)my.InvMax = 100safetyLevel = 50containerSize = 60minOrder = 30re.BO = FALSEThe Rules

    Antecedent Consequent Comments

    re.SOH < 15 set re.BO = TRUEThings are really bad if retailer isthis far in the hole.

    re.SOH > 15 set re.BO = FALSEThings are looking good so don'toverstock the supply chain.

    re.BO = TRUE set Order = invMax Maximize stocking levels.

    (I am not MANUFACTURER)AND(sp.Stock >= safetyLevel)

    set Order tomin(sp.SOH, Order)

    Be considerate of a supplier whoworks to maintain adequatesupplies.

    (I am the MANUFACTURER)AND re.BO = TRUE

    set Order = invMax my.SOH my.LD1 my.LD2 my.LD3

    We may not let manufacturerexceed invMax.

    Order < 0 set Order = 0 zero Do not order negative quantities.NOT(re.BO) AND

    my.SOH > safetyLevelset Order = 0 Is an order really needed?

    NOT(re.BO) ANDOrder < minOrder

    set Order = 0Avoid small shipments, unless theretailer is seriously backlogged.

    NOT(re.BO) ANDOrder > containerSize AND

    remainder < minOrderset Order = remainder Enough for another container?

    Back Order Logic

    The RulesBased agent uses exactly the same back-order logic as RB_Push agent. Pleasesee RB_Push agents back-order logic for details.

  • 7/28/2019 Intelligent Software Agents : Intelligent Agents for the Supply Chain Online Research Institute

    19/35

    Athabasca University COMP667, Tutor Marked Assignment 3 Final Project 27 July 2006

    Francois Nadeau & Marty Boogaart Page 16

    User Interface

    Our implementation solution was based on the use of Echo2, which is an Open SourceAJAX-based rendering Java framework (NextApp, 2005), and was deployed inside aJ2EE compliant Open Source server called JBoss. Figure 3 presents a UMLrepresentation of the user interface.

    Figure 3 - UML Representation of the User Interface

  • 7/28/2019 Intelligent Software Agents : Intelligent Agents for the Supply Chain Online Research Institute

    20/35

    Athabasca University COMP667, Tutor Marked Assignment 3 Final Project 27 July 2006

    Francois Nadeau & Marty Boogaart Page 17

    Simulation WrapperTo implement the wrapper, we used HtmlUnit which is an Open Source Java library usedprimarily for creating automatic test for web applications (Bowler, 2006). Figure 4presents a UML representation of the simulation wrapper.

    Figure 4 - UML Representation of the Simulation Wrapper

    Data StoreFigure 5 presents a UML representation of the data store.

    Figure 5 - UML Representation of the Data Store

    oWhat didn't we implement? Why not?

  • 7/28/2019 Intelligent Software Agents : Intelligent Agents for the Supply Chain Online Research Institute

    21/35

    Athabasca University COMP667, Tutor Marked Assignment 3 Final Project 27 July 2006

    Francois Nadeau & Marty Boogaart Page 18

    Agentfuzzy logic

    Due to their severe penalties, fuzzy backlog decisions are out of the question; but usingfuzzy rules for both stocking levels and container fill factors may have provided betterdecisions than our crisp (i.e., rules based) agents. The low costs of over stocking (i.e.,

    handling costs) do not really warrant a lot of extra computing power, but container fillfactors really are a fuzzy variable. Still, considering the excellent overall results ofour crisp-logic, rules-based agents, and due to our limited time, a fuzzy rules-basedagent was not implemented.

    decision-tree learning, genetic searchThe fact that each SCCORI simulation takes roughly half-an-hour severely restrictedour ability to create learning agents that would have time to learn. Four agents playingeach thirty-cycle simulation, requires 120 order decisions. That requires moresimulation runs than we have time to manage.

    Since an agent may order zero to one-hundred (or more) items, decision trees discrete

    nature would require too many leaves for each possible situation. Again, given our timeconstraints, the task of creating a pedagogy to teach such a decision tree agent was toodaunting.

    social rules based (i.e., communicating)Communication requirements were so meager that pursuit of such a social agents wasof small value and not worth our efforts at this time. Two reasons for this were: (1) inpush mode, the players can only see their own stocking levels and they are not allowedto communicate with each other. In such a situation, our agents should live by the samerules; (2) inpullmode, the players (and our agents) can see all of the stocking levels, sothere is really no need to communicate. Our rules-based-pull agents already keep aneye on the Retailers stock-on-hand and on their suppliers stocking levels to enable

    them to act in ways that benefit both their own situation and that of the overall supplychain.

    User Interface

    Unfortunately, we did not have enough time to implement a reporting system for the userinterface. This could have been completed with the use of JasperReport (JasperSoft,2006), and would have allowed us to better monitor our agents' performance.

    Simulation WrapperThis component was fully completed, and we do not believe that any further requirementsneed to be implemented.

    Data StoreWe did not have time to complete this component, and since we had access to the datafrom the SCCORI web site, we decided to focus our energy elsewhere.

    3 Results

    How did we measure success?There were three measures foragentsuccess:

  • 7/28/2019 Intelligent Software Agents : Intelligent Agents for the Supply Chain Online Research Institute

    22/35

    Athabasca University COMP667, Tutor Marked Assignment 3 Final Project 27 July 2006

    Francois Nadeau & Marty Boogaart Page 19

    1. All of our agents behave as expected.2. On random simulations, our better agents minimize the average per-unit costs at cycle

    30 to between 63 cents and 77 cents.3. On spiked simulations, our better agents minimize the average per-unit costs at cycle 30

    close to the empirically ideal value of 85 cents.

    Where did we get these numbers? We were unable to obtain historical data of typicalstudent runs, so instead we devised a mixture of mathematical and empirical analyses todetermine what the minimum per-unit costs of well-run simulations should be. An analysisof random simulations and then an analysis of spiked simulations follow.

    oBest Possible Random SimulationsThe FactsIn SCCORI random-run simulations, the Retailer receives random orders between0 and 22 items. The average order is 11 items.

    Four constants are the initial stock levels:Retailer Wholesaler Distributor Manufacturer

    40 50 60 80

    Cycle costs are calculated as follows:Purchase Cost SOH Handling Costs Backlog Costs Shipping Costs

    50 cents per unit3 cents per unit inSOH per cycle

    1 dollar per unitbacklogged per cycle

    $10 per container

    Note: a container can hold up to 60 units, but always costs the same no matter how fullor empty.

    All stock deliveries take three cycles. Thus if a position orders on cycle 1, then its SOH(stock on hand) inventory shows an increase at the start of cycle 4.

    A Simple Analysis - First Order ApproximationWhat is the least overall per-unit cost that we could possibly attain by cycle 30?

    As a first-order approximation, make the following assumptions:

    The average order is 11 units per cycle.Players/agents are considerate and do not backlog their suppliers.We may ignore backlog costs. A good player/agent can usually avoid backlogs.Only full containers (60 units) are ordered. This is not always advisable if one wants to

    avoid backlogs, but it simplifies the analysis.

    We may ignore handling costs. At three cents per unit per cycle, this is a small part oftotal costs.

    The following are based on the previous assumptions: By cycle 30, the Retailer has received orders for (30 11 =) 330 units. Since the agents do not know when the simulation stops, they must order to supply 330 units. Shipping costs are ($10 / 60 units =) 16.67 cents per unit. The Retailer needs to purchase and ship (330 - 40 = ) 290 units Retailer's costs are: (40 * 50 cents + 290 * 66.7 cents =) $213.33

    The Wholesaler needs to purchase and ship (330 - 50 = ) 280 units Wholesaler's costs are: (50 * 50 cents + 280 * 66.7 cents =) $211.67

    The Distributor needs to purchase and ship (330 - 60 = ) 270 units

  • 7/28/2019 Intelligent Software Agents : Intelligent Agents for the Supply Chain Online Research Institute

    23/35

    Athabasca University COMP667, Tutor Marked Assignment 3 Final Project 27 July 2006

    Francois Nadeau & Marty Boogaart Page 20

    Distributor's costs are: (60 * 50 cents + 270 * 66.7 cents =) $210.00 The Manufacturer needs to purchase and ship (330 - 80 =) 250 units Manufacturer's costs are: (80 * 50 cents + 330 * 66.7 cents =) $ 206.67

    Total unit costs are: (213.33 + 211.67 + 210.00 + 206.67 = ) $841.67 Total per unit costs are: ($841.67) / 333 = $2.53

    Total per unit cost per position is: $2.53 / 4 = 63 cents per unit.That cost makes a number of simplifying assumptions, but it certainly sets an absolutelower limit for cycle 30 costs.

    For another view of this approximation, consider a different container fill factor. Since it is not always advisable to wait for a full container-load before ordering, make the assumption

    that on average we order half a container, or thirty units.

    At thirty units per shipment, the shipping costs increase to 33.33 cents per unit. Using a similar analysis as above, this changes the final average cost to 77 cents per unit.The Rules-Based agents typically* never order less than 30 units and often order as manyas 60 units per container, so these two numbers form a nice per-unit cost goal-range with

    which to evaluate an agent's performance.*NOTE: - the RB_PullSpike agent is not concerned with shipping costs prior to the spikeand so will immediately order any quantity that it needs and that its supplier can deliver.

    In the final analysis, it is unreasonable to expect an average per-unit cost less than63 cents per unit by cycle 30; but, it may be possible to achieve a number between63 and 77 cents per unit.

    o Best Possible Spiked SimulationsThe FactsIn the SCCORI simulations used by COMP604 students, all spiked runs are identical.

    Orders on the retailer in SCCORI spiked run simulations:Cycle 1 2 3 4 5 6 7 8 9 10 11 121314 151617 181920 212223 242526 27 28 29 30 3132

    Order10 13 11 1514 9 20 22 15 20 140 1013111514 9 202215202015151416 11 20 14 13 6 5

    Four more constants are the initial stock levels:Retailer Wholesaler Distributor Manufacturer

    40 50 60 80

    Cycle costs are calculated as follows:Purchase Cost SOH Handling Costs Backlog Costs Shipping Costs

    50 cents per unit3 cents per unit inSOH per cycle

    1 dollar per unitbacklogged per cycle

    $10 per container

    Note: a container can hold up to 60 units, but always costs the same no matter how fullor empty.All stock deliveries take three cycles. Thus if a position orders on cycle 1, then its SOH

    (stock on hand) inventory shows an increase at the start of cycle 4.

    A Simple Analysis - First Order Approximation

    What is the least overall per-unit cost that we could possibly attain by cycle 30?

    As a first-order approximation, make the following assumptions:

  • 7/28/2019 Intelligent Software Agents : Intelligent Agents for the Supply Chain Online Research Institute

    24/35

    Athabasca University COMP667, Tutor Marked Assignment 3 Final Project 27 July 2006

    Francois Nadeau & Marty Boogaart Page 21

    We may ignore handling costs.All positions have 100 units in SOH when the spike hits.We may ignore backlog costs. A good player/agent can usually avoid backlogs.Only full containers (60 units) are ordered.Except for the spike, the average order is 11 units per cycle.It should be obvious that some of these assumptions are mutually exclusive; but then, thisis just a first approximation.

    The following are based on the above assumptions: At cycle 11, the retailer is backlogged by 40 units, and immediately orders 100 units. At cycle 12, the retailer is backlogged by (40 + 11 =) 51 units, but can order no more since the

    wholesaler's SOH = 0.

    At cycle 13, the retailer is backlogged by (51 + 11 =) 62 units, but can order no more since thewholesaler's SOH = 0.

    At cycle 14, the retailer has SOH equal to (100 - (62 + 11) =) 27 units, and now places another order. Ideally, the retailer should be able to maintain adequate stocks after this point.Total backlog costs are: (40 + 51 + 62 =) $153.

    Shipping costs are ($10 / 60 units =) 16.67 cents per unit. Total units required is (140 + 29 * 11 =) 459. The Retailer needs to purchase and ship (459 - 40 =) 419 units Retailer's costs are: (40 * 50 cents + 419 * 66.7 cents =) $299.33

    The Wholesaler needs to purchase and ship (459 - 50 =) 409 units Wholesaler's costs are: (50 * 50 cents + 409 * 66.7 cents =) $297.67

    The Distributor needs to purchase and ship (459 - 60 =) 399 units Distributor's costs are: (60 * 50 cents + 399 * 66.7 cents =) $296.00

    The Manufacturer needs to purchase and ship (459 - 80 = ) 379 units Manufacturer's costs are: (80 * 50 cents + 379 * 66.7 cents =) $ 292.67

    Total unit costs are: (299.33 + 297.67 + 296.00 + 292.67 =) $1185.67 Total per-unit costs are: ($153.00 + $1185.67) / 459 = $2.92

    Total per unit cost per position is: $2.92 / 4 = 73 cents per unit.

    That cost makes a number of simplifying assumptions, but it certainly sets an absolutelower limit for cycle 30 costs.

    It should also be noted that the average order for the other cycles is 15 units, whereasmost random runs average out at 11 units. The spiked simulation appears to be designedto punish the participants.

    Can we get a better estimate?

    An Empirical EstimateWe put the orders that the retailer receives into a copy of the RB_PullSpiked spreadsheetin the SCCORI Fast Simulation workbook. Then, using our knowledge of the exactordering sequence, we over-rode the logic in selected cells to force the lowest possibleper-unit costs. We could not find any combination of orders that would lower this below85 cents per unit.

    Thus, our empirical lower limit is 85 cents per unit. We feel that this is a reasonable goalfor our RB_PullSpiked agent, who must operate without the benefit of knowing theRetailer's received-order sequence.

  • 7/28/2019 Intelligent Software Agents : Intelligent Agents for the Supply Chain Online Research Institute

    25/35

    Athabasca University COMP667, Tutor Marked Assignment 3 Final Project 27 July 2006

    Francois Nadeau & Marty Boogaart Page 22

    Note: The Ideal Spiked Run spreadsheet may be viewed in the SCCORIModel.xlsworkbook provided with the COMP667 project submission.

    What experiments did we execute?In order to characterize our agents, we attempted to run each agent on thirty random

    simulations. Unfortunately early versions of the framework suffered some problems whichrequired constant monitoring and precluded simultaneous and multiple overnight runs. Thetesting time took so long that some agents had to be cut back to ten simulations in order tomeet our deadlines. Fortunately from a statistical point of view we were still able toconsider those samples large enough to represent their populations, since we always pooledall four positions into one average per-unit cost. This increased the overall standarddeviations, but in the end that did not hurt our final data analyses.

    Since all SCCORI simulation spiked runs are identical, we only characterized each agentagainst a singlespikedsimulation.

    Provide quantitative results.The raw quantitative data are available in the spreadsheets provided with the COMP667project submission. There are seven sub-directories which contain the raw dataspreadsheets. In the main spreadsheet directory there are also seven Excel workbook fileswith similar names. These workbooks contain the individual spreadsheets of theirnamesake directories, plus a summary worksheet at the front that shows the average andstandard deviations of each cycle across all of the spreadsheets. These spreadsheets arecalled:

    Another spreadsheet called: Paranoid PullRandom.xls, Considerate PullRandom.xls,RB_PullRandom PullRandom.xls, RB_PullSpiked PullRandom.xls,RB_Push PullRandom.xls, RulesBased PullRandom.xls, and AllSpikedRuns.xls.

    One other spreadsheet of interest here, is called StatisticalAnalysis.xls, which automatesthe tedious mathematics required for the F and t tests. We only had to verify one set of datato ensure that all of our calculations were consistent.

    The numerical results for each of the four agents are shown below. The following generalnotes apply in all six cases:

    The results are the average and standard deviations of cycle 30 of each run.To simplify comparisons to other agents:othe average unit cost is the simple average of all four agents' unit costsothe grand total cost is the sum of all four agents' total costs

    All spiked runs are the same, so there is no point in more than one run.ParanoidAgent

    Four Paranoid Agents played all four positions on ten Random-Pull simulations.

    Random Pull Runs $CostsPosition Unit Cost SD Total Cost SD Avg. Unit Cost 149.5 cents

    RETAILER 1.30 0.0607 575.41 22.97 Total Costs $3129.92WHOLESALER 1.45 0.1185 722.01 57.34DISTRIBUTOR 1.67 0.1166 918.43 60.23MANUFACTURER 1.56 0.0783 914.07 39.85

  • 7/28/2019 Intelligent Software Agents : Intelligent Agents for the Supply Chain Online Research Institute

    26/35

    Athabasca University COMP667, Tutor Marked Assignment 3 Final Project 27 July 2006

    Francois Nadeau & Marty Boogaart Page 23

    Four ParanoidAgents played all positions on a single Spiked-Push simulation.

    Spiked Push Run $CostsPosition Unit Cost Total Cost Average Unit Cost 151 centsRETAILER 1.38 934.84 Total Costs $4583.78WHOLESALER 1.48 1085.58

    DISTRIBUTOR 1.65 1295.47MANUFACTURER 1.54 1267.89

    ConsiderateParanoidAgent

    Four Considerate Paranoid Agents played all four positions on twenty-eight Random-Pull

    simulations.

    Random Pull Runs $CostsPosition Unit Cost SD Total Cost SD Avg. Unit Cost 111.5 centsRETAILER 1.22 0.0634 539.82 13.50 Total Costs $2324.47WHOLESALER 1.12 0.0521 565.43 12.51DISTRIBUTOR 1.08 0.0455 599.60 12.45MANUFACTURER 1.04 0.0406 619.62 12.45

    Four ConsiderateParanoidAgents played all positions on a Spiked-Pull simulation.

    Spiked Pull Run $CostsPosition Unit Cost Total Cost Average Unit Cost 102 centsRETAILER 1.31 887.00 Total Costs $3053.21WHOLESALER 0.94 692.09DISTRIBUTOR 0.93 727.06MANUFACTURER 0.90 747.06

    RBPushAgent (Rules Based Push)

    Four RB_PushAgents played all four positions on ten Random-Push simulations.

    Random Pull Runs $CostsPosition Unit Cost SD Total Cost SD Avg. Unit Cost 89.75 centsRETAILER 0.80 0.0179 331.47 19.73 Total Costs $1566.04WHOLESALER 1.09 0.1163 454.71 58.13DISTRIBUTOR 0.86 0.0552 385.85 31.35MANUFACTURER 0.84 0.0467 394.01 27.57

    Four RB_PushAgents played all positions on a single Spiked-Push simulation.

    Spiked Pull Run $Costs

    Position Unit Cost Total Cost Avg. Unit Cost 181.75 centsRETAILER 2.00 1279.41 Total Costs $4791.16WHOLESALER 2.19 1412.62

    DISTRIBUTEOR 1.76 1186.48MANUFACTURER 1.32 912.65

    RB_PullSpikeAgent

    Four RB_PullSpikeAgents played all positions on ten Random-Pull simulation runs.

    Random Pull Runs $CostsPosition Unit Cost SD Total Cost SD Avg. Unit Cost 108.75 centsRETAILER 1.17 0.0493 523.39 12.00 Total Costs $2261.52

  • 7/28/2019 Intelligent Software Agents : Intelligent Agents for the Supply Chain Online Research Institute

    27/35

    Athabasca University COMP667, Tutor Marked Assignment 3 Final Project 27 July 2006

    Francois Nadeau & Marty Boogaart Page 24

    WHOLESALER 1.09 0.0387 551.58 11.80DISTRIBUTOR 1.05 0.0336 586.44 11.87MANUFACTURER 1.02 0.0300 606.44 11.87

    Four RB_PullSpikeAgents played all positions on a single Spiked-Pull simulation.

    Spiked Pull Run $Costs

    Position Unit Cost Total Cost Avg. Unit Cost 86.5 centsRETAILER 1.16 739.03 Total Costs $2310.99WHOLESALER 0.77 518.33DISTRIBUTOR 0.77 538.79MANUFACTURER 0.73 514.84

    RB_PullRandomAgent

    Four RB_PullRandomAgents played all positions on thirty Random-Pull simulations.

    Random Pull Runs $CostsPosition Unit Cost SD Total Cost SD Avg. Unit Cost 71 centsRETAILER 0.75 0.0184 302.35 33.05 Total Costs $1203.48WHOLESALER 0.70 0.0113 294.62 27.72

    DISTRIBUTOR 0.69 0.0103 299.14 27.50MANUFACTURER 0.70 0.0113 307.37 27.33

    Four RB_PullRandomAgents played all positions on a single Spiked-Pull simulation.

    Spiked Pull Run $CostsPosition Unit Cost Total Cost Avg. Unit Cost 100.75 centsRETAILER 1.93 1213.14 Total Costs $2585.36WHOLESALER 0.70 455.57DISTRIBUTOR 0.70 462.70MANUFACTURER 0.70 453.95

    RulesBasedAgent

    Four RulesBasedAgents played all positions on thirty Random-Pull simulations.Random Pull Runs $Costs

    Position Unit Cost SD Total Cost SD Avg. Unit Cost 72 centsRETAILER 0.76 0.0133 312.05 27.99 Total Costs $1292.27WHOLESALER 0.71 0.0128 318.37 27.62DISTRIBUTOR 0.69 0.0144 317.08 30.35MANUFACTURER 0.72 0.0116 344.77 29.76

    Four RulesBasedAgents played all positions on a single Spiked-Pull simulation.

    Spiked Pull Run $CostsPosition Unit Cost Total Cost Avg. Unit Cost 97.5 centsRETAILER 1.80 1191.09 Total Costs $2802.06WHOLESALER 0.70 505.13DISTRIBUTOR 0.70 539.92MANUFACTURER 0.70 565.92

    What do our results indicate?An Excel workbook called StatisticalAnalysis.xls is included with the COMP667 projectsubmission. This workbook contains spreadsheets to automate the tedious mathematicsrequired for the F and t tests. We only had to verify one set of data to ensure that all of ourcalculations were consistent. An analysis of our results is presented below, followed by a

  • 7/28/2019 Intelligent Software Agents : Intelligent Agents for the Supply Chain Online Research Institute

    28/35

    Athabasca University COMP667, Tutor Marked Assignment 3 Final Project 27 July 2006

    Francois Nadeau & Marty Boogaart Page 25

    ranking of our agents.

    oIntroductionIn order to characterize our six agents, we ran each of them through multiple simulations.For comparison purposes, we averaged the per-unit cost of all four positions and recordedthat along with the standard deviation.

    We performed ANOVAs on the results and found that most of the fifteen populationcomparisons almost certainly did not share similar variances, which forced us to use thet-test to compare means rather than z-tests against the normal distribution (Mason, 1991).The results of the ANOVA F-tests are shown below.

    We paired the means tests against each other in order; reasoning that if the two highestmeans were significantly different, then the first and third need not be tested, and so weonly needed to test the second highest mean against the third, and so on. To keep thingssimple, we did the t-test on all five pairs; the t-test is harder to pass than a z-test, so thisdid not seem unreasonable.

    The null hypothesis states that one mean is less than or equal to the other. In four cases,our t-tests indicated that there was only a 0.05% chance that this could be so. Thus werejected the null hypothesis.

    In the two cases that our rejection rate was not as good, the F-tests were also less certainabout the differences in variances, so we applied the z-tests. In both cases the z-testprovided a better indication that the means were different (as expected).

    All results are summarized below. The calculations may be viewed in theStatisticalAnalysis.xls spreadsheet provided with the COMP667 project submission.

    oData SummaryNote that since we pool the averages and standard deviations of all four positions, we use

    four times the number of simulations for n.Agents ordered by SD. Costs in cents.

    Agent Avg SD SD2

    n 4n

    Paranoid 149.3 16.6 275 10 40

    RB_Push 89.7 13.1 170 10 40

    Considerate 111.8 8.24 67.9 28 112

    RB_PullSpike 108.4 6.95 48.3 10 40

    RulesBased 72.0 2.98 8.88 30 120

    RB_PullRandom 71.2 2.66 7.08 30 120

    Agents ordered by Avg. Costs in cents.

    Agent Avg SD SD2

    n 4

    nParanoid 149.3 16.6 275 10 40

    Considerate 111.8 8.24 67.9 28 112

    RB_PullSpike 108.4 6.95 48.3 10 40

    RB_Push 89.7 13.1 170 10 40

    RulesBased 72.0 2.98 8.88 30 120

    RB_PullRandom 71.2 2.66 7.08 30 120

  • 7/28/2019 Intelligent Software Agents : Intelligent Agents for the Supply Chain Online Research Institute

    29/35

    Athabasca University COMP667, Tutor Marked Assignment 3 Final Project 27 July 2006

    Francois Nadeau & Marty Boogaart Page 26

    oANOVA ResultsRather than doing linear regressions on lookup tables, we used Professor Lowry's on-lineF-calculator to compare all of the variances against each other (Lowry). The results of thefifteen comparisons are shown below.

    Probability that the sample populations have the different variances.

    RB_Push Considerate RB_PullSpike RulesBased RB_PullRandomParanoid 93.2% >99.99% >99.99% >99.99% >99.99%

    RB_Push - >99.99% >99.99% >99.99% >99.99%

    Considerate - - 92.2% >99.99% >99.99%

    RB_PullSpike - - - >99.99% >99.99%

    RulesBased - - - - 88.8%

    oMeans Comparison ResultsWe used the t-test for all five means-comparison tests. In the two cases where 99.95%certainty was not possible, the F-test was also less certain that the variances weresignificantly different, so we applied the z-test and reported them too. In the finalanalysis, we believe that the comparison of agents performance shown below is fair and

    reasonable. Appropriate t and z tables were found in the CRC handbook (Beyer, 1978).Probability that these agents truly do have different means.

    Agents ComparedRespective

    Means

    t-test

    confidence

    z-test

    confidence

    Paranoid vs Considerate 149.3 versus 111.8 99.95% na

    Considerate vs PB_PullSpike 111.8 versus 108.4 99% 99.5%

    RB_PullSpike vs RB_Push 108.4 versus 89.7 99.95% na

    RB_Push vs Rules Based 89.7 versus 72.0 99.95% na

    RulesBased vs RB_PullRandom 72.0 versus 71.2 95% 99.97%

    The last comparison, RulesBased versus RB_PullRandom, is somewhat questionable. Asthe ANOVA shows, we are almost 89% sure that the variations are different, so that

    precludes using the z-test 89% of the time. The t-test shows only 95% confidence that theRules Based mean is larger than the RB_PullRandom mean, which tells us that we wouldbe wrong 1 time out of 20 in accepting the conclusion that the means are different. Inother words, their performance may be the same on random runs; but, they are probablynot. The other means-comparisons are so high (99% or better) that we may confidentlyorder the random-run results as shown next.

    The agent performances are ranked in three tables below:

    A higher rank number indicates better performance.The first table ranks the agents according to their performance in the random-run

    simulations.

    The second table ranks them according to their performance in the spiked-runsimulations.

    The third table combines the rank numbers of the previous two tables to identify thebest overall performers.

    The performance parameter is the average unit cost. All costs are reported at cyclethirty.

    In the combined rankings table, the ties are decided by giving the agent with theminimum spread between its performances the higher ranking.

  • 7/28/2019 Intelligent Software Agents : Intelligent Agents for the Supply Chain Online Research Institute

    30/35

    Athabasca University COMP667, Tutor Marked Assignment 3 Final Project 27 July 2006

    Francois Nadeau & Marty Boogaart Page 27

    Random Simulation Ranking Spiked Simulation Ranking

    Rank Agent NameAverageUnit Cost

    Rank Agent NameAverageUnit Cost

    6 RB_PullRandom 71 cents 6 RB_PullSpike 87 cents

    5 RulesBased 72 cents 5 RulesBased 98 cents

    4 RB_Push 90 cents 4 RB_PullRandom 101 cents3 RB_PullSpike 108 cents 3 ConsiderateParanoid 102 cents

    2 ConsiderateParanoid 112 cents 2 Paranoid 152 cents

    1 Paranoid 150 cents 1 RB_Push 182 cents

    Combined Ranking

    Agent Name Rank

    RulesBased 10

    RB_PullRandom 10

    RB_PullSpike 9

    ConsiderateParanoid 5

    RB_Push 5

    Paranoid 3

    4 DiscussionAlthough ConsiderateParanoid is a simpler agent than the RB_Push agent, it outperforms itbecause it operates in Pull mode which enables it to prevent propagating backlogs down theline.

    The RulesBased agent is the best overall agent because it ranks in second place on bothtypes of runs. Also RB_PullRandom beats RulesBased by only a narrow margin in theRandom Runs (1 cent), while RulesBased beats RB_Random by a wider margin in theSpiked Runs (3.25 cents).

    For Spiked Runs, RB_PullSpike outperforms all the rest by a wide margin; but, this is at agreat price, because even the "blind" RB_Push agent outperforms it on Random runs.Comparing the two "blind" agents (RB_Push and Paranoid) performances on the Spikedrun, we see that even the simple Paranoid agent outperforms the RB_Push agent. Thereason is that the Paranoid agent's raison d'etre is to prepare for spikes, and it when a spikecomes, Paranoid is as ready as it can possibly be. To its credit, on Random runs, RB_Pushcan deliver product for less than 2/3 of Paranoid's cost.

    If we had to choose just one agent, it would be the RulesBased agentOverall, is the approach we took promising?

    We feel that our supply chain management agent approach is very promising. Not onlydoes our range of agents allow students of supply chain management to test against

    different types of players; but, our best performing agents approach the limits ofperformance as indicated by our mathematical and empirical analyses of the SCCORIsimulation.

    To recap our best performing agent results:

    The best average random per-unit cost of 71 cents falls well within the estimated range of63 to 77 cents per unit. The lower end of that range made conservative simplifyingassumptions that could never be realized in actual simulations.

    Also the best spiked per-unit cost of 87 cents is very close to the empirical best of 85

  • 7/28/2019 Intelligent Software Agents : Intelligent Agents for the Supply Chain Online Research Institute

    31/35

    Athabasca University COMP667, Tutor Marked Assignment 3 Final Project 27 July 2006

    Francois Nadeau & Marty Boogaart Page 28

    cents, which was achieved through pre-knowledge of the spiked order sequence. Ouragent had no such knowledge when it achieved its value of 87 cents.

    What different approach or variant of this approach is better?The two cent difference in our RB_PullSpike agents performance versus the empirical-

    best can be attributed to a single order of one-unit made by the retailer-agent during cyclefive of the simulation. That additional ten-dollar cost averages out over 419 units to 2.4cents per unit. Additional logic could be added to that agent to avoid single orders, but theextra logic and processing hardly seems worth the trouble.

    What follow-up work should be done next?We would encourage future agent developers to create a genetic search agent that coulddetermine the best possible set of one-hundred-twenty order-placements in order tominimize the per-unit cost of SCCORI spiked runs to its absolute minimum. This, ofcourse, would require a considerable number of simulation runs.

    Another area that can use some improvement is to convert the web-based interface into a

    more robust Swing application.

    What did we learn by doing this project?Marty Boogaart

    I learnt (and also re-learnt) much more than the scope of the COMP667 course originallyintended. Of course the project was a powerful motivator to understand the variousintelligent agent options to choose from so that we could make good choices. Also, I nowrealize that I was exposed to a broad over-view of the artificial intelligence landscape,which until now always seemed a bit mystical and out-of-reach. I now appreciate that thetools in the field of AI are available to me; that I can understand and make use of them.

    Other learning that I experienced includes:

    A more thorough understanding of the Java programming language. To allow us to testour agents, a sophisticated agent framework needed to be created. Although this didinvolve the use of agent-based techniques, this framework was created with the use ofObject Oriented techniques, which reinforced many of the concepts that were introducedin COMP308.

    Extensive experience with Wiki programming (Wikipedia, 2003). We documented ourwork on a Wiki server, and I can now document in a Wiki almost as fast as I can type inWord (almost).

    Understanding and appreciation of Concurrent Versions Systems (CVS, 2006). To easedevelopment, we setup and used a code repository.

    ANT (Davidson, 2000) is the Java way to automate routine maintenance and compilationtasks. I have long used DOS batch files for such chores, but this project forced me tolearn about ANT. ANT is like batch files on steroids!

    A better understanding of how Windows help files and HTML help files are created. Ouruser manual was created using Help Scribble (Goyvaerts, 2006). The program itself doesnot compile the Windows help file, but uses compilers that are downloadable fromMicrosoft and Borland.

    It has been a few years since I have done any statistical analysis. This was a niceopportunity to refresh my skills.

  • 7/28/2019 Intelligent Software Agents : Intelligent Agents for the Supply Chain Online Research Institute

    32/35

    Athabasca University COMP667, Tutor Marked Assignment 3 Final Project 27 July 2006

    Francois Nadeau & Marty Boogaart Page 29

    An appreciation and understanding of JBoss (JBoss, 2006). I am still not fluent with ityet, but I at least understand its purpose and how it is used.

    A better appreciation of the challenges in supply-chain-management. There are nowuniversities offering bachelor degrees in SCM!

    Francois NadeauThis project provided me with a good exercise for learning the manner in which agents areable to solve business needs. It also removed my previous image of AI as a mystical black-art-like field, and made me realized that many of its techniques are simply mathematicalalgorithms.

    The following is a short list of what I learned during this project:

    Appreciation for the Agent-based pattern, and a better understanding of how it can beused to provide additional web services.

    Coordination skills from working in a distributed team whose members live in time zonesfifteen hours apart.

    This was the first time that I used Echo2, which is the AJAX framework library that weused to create the user interface. Unfortunately, I did not like it and probably won't use itagain.

    5 ConclusionAs stated in the Introduction and paraphrased here, our goal was to create intelligent agentsto interact with the supply-chain-management simulations available at the SCCORI web site.Those agents would be available to students via a SCCORI agent web site so that they couldparticipate in simulations with less than four human players. That site, complete with a usermanual, is now available at http://219.33.28.36:8080/sccoriAgentClient/index.html. Ouragents provide a range of skills and the performance of our best agents approach the limits ofachievement that are possible in the SCCORI simulations. In short, we have succeeded inaccomplishing our objectives.

  • 7/28/2019 Intelligent Software Agents : Intelligent Agents for the Supply Chain Online Research Institute

    33/35

    Athabasca University COMP667, Tutor Marked Assignment 3 Final Project 27 July 2006

    A

    Appendix A Software PackageThe SCCORI-Agent source code is separated into two directories.

    04_Client : This project contains the User-Interface which needs to be deployed in a webcontainer such as Tomcat or JBoss.

    05_Server: This project contains the Agents, simulation wrapper, and data storecomponents.

    Both of these projects have an Apache Ant build script, and the libraries required for theircompilation and execution. All third party libraries used in this projects are Open Sourcelibraries. Listings of teh software directory structures follow.

    Directory structure for the 05_Server project:05_Server/|-- build.xml|-- doc| |-- allclasses-frame.html| |-- allclasses-noframe.html| |-- ...| |-- index.html

    | `-- stylesheet.css|-- lib| |-- commons-beanutils-1.7.0.jar| |-- ...

    | `-- xmlParserAPIs-2.2.1.jar`-- src

    |-- java| |-- ca| | `-- athabascau| | `-- sccori| | |-- agent| | | |-- AgentFactory.java| | | |-- ConsiderateParanoidAgent .java| | | |-- ParanoidAgent.java| | | |-- RB_PullRandomAgent.java| | | |-- RB_PullSpikeAgent.java| | | |-- RB_PushAgent.java| | | `-- RulesBasedAgent.java| | |-- comm| | | |-- ErrorNotifier.java| | | |-- EternalThreadedRefreshHandler.java| | | |-- Simulation.java| | | |-- TurnAdapter.java

    | | | |-- TurnListener.java| | | `-- comm.cdf| | |-- data| | | |-- SimulationInfo.java| | | |-- TurnEvent.java| | | |-- TurnInfo.java| | | `-- data.cdf| | `-- message| | |-- Message.java| | |-- MessageChannel.java

    | | `-- MessageModule.cdf| `-- log4j.properties`-- resources

    `-- WEB-INF

    35 directories, 124 files

    The Ant Build script

    The JavaDoc generated for the User Interface (directorystructure shortened to ease reading).

    There are 20 Open Source libraries in this project,

    shortened here to ease reading.

    Source code for the various Agents

    Source code for the Simulation wrapper component

    Source code for the Data Store component

    Source code for the Message mechanism

  • 7/28/2019 Intelligent Software Agents : Intelligent Agents for the Supply Chain Online Research Institute

    34/35

    Athabasca University COMP667, Tutor Marked Assignment 3 Final Project 27 July 2006

    B

    Directory structure for the 04_Client project:

    _Client/|-- build.xml|-- doc| |-- allclasses-frame.html| |-- ...| |-- index.html

    | `-- stylesheet.css|-- lib| |-- Echo2_App.jar| |-- ...| `-- xstream-1.1.jar`-- src

    |-- java| `-- ca| `-- athabascau| `-- sccori| `-- client| |-- AgentPanel.java| |-- ClientApplication.java| |-- ClientServlet.java| |-- SimulationPool.java| |-- SystemPanel.java

    | `-- user-interface.cdf`-- resources|-- WEB-INF| |-- classes| | |-- ca| | | `-- athabascau| | | `-- sccori| | | `-- client| | | `-- icon.png| | `-- hibernate.properties| |-- jboss-web.xml| `-- web.xml|-- images| |-- icon.png| `-- sccoriagent.png|-- index.html|-- sccoriAgents.chm

    `-- usermanual|-- Rankings.png|-- SCCORIAgentLogin.png|-- SCCORIAgentLoginComplete.png|-- SCCORIAgentWebSite.png|-- SCCORIAgentsWorking.png|-- SCCORIsite.png|-- cnt.htm|-- hs10.htm|-- hs100.htm|-- hs110.htm|-- hs120.htm|-- hs130.htm|-- hs20.htm|-- hs30.htm|-- hs40.htm|-- hs50.htm|-- hs60.htm|-- hs70.htm|-- hs80.htm|-- hs90.htm|-- idx.htm|-- sccoriAgentHelp.htm`-- sccoriAgentLogo_Help.png

    39 directories, 153 files

    The Ant Build file

    The JavaDoc generated for the User Interface (directory structureshortened to ease reading).

    There are 44 Open Source libraries in this project, shortened here toease reading.

    The User Interface source code (written for the Echo2 framework).

    The web container descriptor

    The On-line user manual

  • 7/28/2019 Intelligent Software Agents : Intelligent Agents for the Supply Chain Online Research Institute

    35/35

    Athabasca University COMP667, Tutor Marked Assignment 3 Final Project 27 July 2006

    References

    Beyer, W. H. (1978). CRC Standard Mathematical Tables (25 ed.). Boca Raton: CRC Press.

    Bowler, M. (2006). HtmlUnit (Version 1.9): Gargoyle Software.

    CVS. (2006). Concurrent Versions System.

    Davidson, J. D. (2000). ANT - Another Neat Tool.

    Goyvaerts, J. (2006). HelpScribble (Version 7.6.1): JG Software.

    Gregoire, D. (2003). SCCORI User Manual [Electronic Version]. Retrieved 26 July 2006 fromhttp://www.sccori.com/sim/products/sccoriUsermanual.doc.

    JasperSoft. (2006). JasperReports.

    JBoss. (2006). JBoss: Red Hat.

    Lowry, R. F Calculator [Electronic Version]. Retrieved July 2006 fromhttp://faculty.vassar.edu/lowry/tabs.html#f.

    Mason, L., Marchal. (1991). Statistics an Introduction (third ed.). Orlando: Harcourt BraceJonanovich Inc.

    NextApp, I. (2005). Echo2 (Version 2.0.0).

    Russell, S. N., Peter. (2003).Artificial Intelligence a Modern Approach (second ed.). UpperSaddle River: Prentice Hall.

    Wikipedia. (2003). MediaWiki Handbook [Electronic Version]. Retrieved July 2006 fromhttp://meta.wikimedia.org/wiki/MediaWiki_User's_Guide.

    Wooldridge, M. (2002).An Introduction to MultiAgent Systems. West Sussex: John Wiley &Sons, Ltd.