anyLogistix
Expand
Font size

Phase 4. Export the Updated Calculator and Use It

In the previous phase we customized the product&distance-based calculator by adding the additional cost parameter that is applied to each vehicle involved in shipping. Now we want to make sure that this calculator works well. In this phase we will export it from the anyLogistix Extensions Editor and test it in our scenario.

Export the cost calculator

  1. Double-click the Export to ALX item in the extension tree of the Projects view to open the Export anyLogistix Extension dialog box.

    By default the path to the anyLogistix extensions folder is specified in the Extension file name field. Leave the default path unless you want to save this extension to some other folder.

    If you specify any other folder to save the extension to, you will have to manually add it to anyLogistix, while it will be added automatically if you save it to the default folder.

  2. Click Finish. You will see a message in the anyLogistix interface informing you that the extension was successfully added.

  3. Click OK to close the notification.

anyLogistix allows you to instantly use the imported cost calculator. It is already available for all scenarios of this project, but we need to clearly specify where to use it.

Update the supply chain configuration and set up the new calculator

  1. Click Data at the top of the experiments view, then open the Paths table.
  2. Select the Phase 3 Additional cost for each from the Cost Calculation drop-down list for both table records.
    The Cost Calculation Parameters cell now shows the description that we updated in the getDescription() method.

  3. Double-click the Cost Calculation Parameters cell of the first record.
  4. In the opened dialog set the parameters to:
    • Amount unit to ft3
    • Cost per unit parameter to 0.005
    • Additional cost parameter to 10
  5. Now double-click the Cost Calculation Parameters cell of the second record, and set:
    • Amount unit to ft3
    • Cost per unit parameter to 0.01
    • Additional cost parameter to 10

That's it. We may run the experiment and compare results

Run the experiment and compare results

  1. Click the Simulation experiment item in the Experiments section.

  2. Click Run in virtual time mode without animation to run the experiment at max speed without displaying the GIS map.
  3. Click the Stop toolbar button to stop the experiment when it completes. A dialog box will pop up asking if you would like to save the results. Click Yes.
  4. Examine the gathered statistics. Open the P&L tab for details on the expenses within the supply chain and the received profit.
    We can see that the received profit is less this time because of the increased Transportation cost. It constitutes $43,607,259.242 as compared to the original $43,499,949.242.

Now, let us check if the calculations are correct.

The additional cost per vehicle is added to the cost calculated by the product&distance-based calculator. We did not change this part. We can assume, that the transportation cost calculated by the default policy and the cost calculated by the modified policy will differ only in the additional cost.

To prove that the calculations are correct we need to check that the following expression is true: Transportation cost with the default policy + Additional cost parameter value * Number of vehicles involved = Transportation cost with the customized policy.

Let us get all the values we need.

  • The transportation costs for both the default and the modified calculators are available in the Profit and Loss pages of the experiment results
  • The Additional cost is defined in the calculator's parameters
  • The number of vehicles used for shipping is available in the Shipped Vehicles statistics.

Let's add the Shipped Vehicles statistics to the dashboard to get the number of vehicles that were used to deliver the products.

Add new statistics

  1. Click Add new page to create a new dashboard page
  2. Right-click the empty spot in the dashboard area and select Add item from the shortcut menu.
  3. In the opened dialog expand the Vehicles section in the list of statistics, and check the Shipped vehicles item.
  4. Click OK to close the dialog box and add the statistics to the dashboard, which will instantly show data. As you can see, 10731 vehicles were required to fulfill the deliveries:

Now that we know all the numbers, we can check the calculator's estimations:
$43,499,949.242 + $10 * 10,731 = $43,607,259.242.
As you can see the numbers match. The modifications we made to the calculator work the way we wanted.

Let us move on to the next phase.

How can we improve this article?