In the previous phase we created a custom Rate Matrix calculator. In this phase we will use the original Simulation scenario to check if the calculator estimates the transportation costs correctly.
Export the extended calculator
- Double-click the Export to ALX item in the extension tree of the Projects view to open the Export anyLogistix Extension dialog box.
- Change the name of the extension file, to prevent conflicts with the previously exported calculator.
- Click Finish. You will see a message in the anyLogistix interface informing you that the extension was successfully added.
- Click OK to close the notification.
We will proceed with the Simulation scenario type, so open the SIM tab to modify the scenario data
Update the supply chain configuration and set up the new calculator
- Navigate to the Paths table.
- Select the Phase 7 Rate matrix calculator for regions 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.
- Select both Cost Calculation Parameters cells by Ctrl + clicking them, then press
Space, a dialog box will open:
- Amount unit to ft3
- Select the only available external table from the External table name drop-down list
The external table is available in this scenario from the very beginning, so we don't need to import anything.
Observe the structure of the external table
- Click the External tables item at the bottom of the experiments section.
The dashboard below the map will now show the available external tables.
As we can see the table contains certain data. Each number represents the transportation cost of one product unit from the source location (the first column) to the destinations (see the rest of the column headers). These values should be multiplied by the number of delivered products to get the transportation cost.
We are ready now to check the calculator's output by using the simulation results.
Run the Simulation experiment, and add statistics to the dashboard
- Click the Simulation experiment item in the Experiments section.
- Click Run in virtual time mode without animation to run the experiment at max speed without displaying the GIS map.
- 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.
- Click Add new page in the statistics dashboard.
- Right-click the empty spot in the dashboard area and select Add item from the shortcut menu.
- In the Properties dialog box expand the Products section and check the Fulfillment Shipped (Products) statistics.
- In the additional settings section enable the Per item toggle button for Object and
- In the same way add the Transportation cost statistics from the Finances section, showing data per each Object and Destination items.
The transportation cost is supposed to be calculated by multiplying the rate from the external table by the amount of the shipped products. The Fulfillment Shipped (Products) statistic shows the exact amount of product shipped between the source and the destination locations.
Let us now check the transportation cost from the DC Baltimore to the Akron customer (the first row). As you can see, we shipped 17,437.875 ft3 of products between these locations.
We also need the rate for this source-destination pair in the external table. Akron is located in the Ohio region, and in case of DC Baltimore the rate constitutes 2.793.
Now we can use the acquired values to check the calculations:
17,437.875 * $2.793 = $48,703.985
As you can see, it is the same value that the statistics show for the Baltimore – Akron locations, which means that out calculator did a great job.
That's it. We have successfully completed this tutorial.
Now you have a better understanding of how to adjust the default policies if required.
How can we improve this article?