top of page

From Trial and Error to Math: A Smarter Approach to Tariffs and Supply Chain Decisions

  • Writer: Luis Alejandro Bernal
    Luis Alejandro Bernal
  • May 28
  • 4 min read

Updated: 6 days ago

Every supplier and manufacturing company experiences the same challenge in one way or another: how can I buy, transport and sell my raw materials and goods from point A to point B as fast and optimal as possible? Variables such as the price of the raw materials, source, target, lane, currency exchange, and lately one of the most influential the tariffs start to stack one over the other, making it very complex to answer this question. Usually what companies do is iterate over their options based on previous experience, in other words, by trial and error. This is a method that is not inherently bad, but it lacks a strong mathematical foundation, which is necessary to explore different questions inside the business and, most important of all, to run what-if scenarios that allow the customer to be on top of future events and have a more preventive than reactive strategy.


As mentioned before, a strong mathematical model allows to include all the major variables involved during the supply chain of a company and to test different configurations of the process. Questions like: what happens if I buy my raw materials from India instead of China? Or what if the Yuan experiences a sudden spike in exchange by the end of the year? Or even, what if the tariffs from China increase from 10% to 30%? We can see that not only the economic and geographical variables come into play, but also political events play a major role in the formulation of the phenomena.


A very simplified but powerful version of the mathematical model looks as follows:


Where  is the function we want to optimize, which means finding the maximum or minimum of the function. In this case it is finding the maximum revenue of the company, but in other cases it can be finding the minimum delivery time or even the shortest route.  is the weight for all the different possible factors that affect the function and  is the actual variable of the function.


So we can appreciate that we can basically add any type of event that can affect the revenue of the company and assign a specific weight to each of the events, so we can quantify its effect in the final outcome. This type of formulation is very common in many different areas of physics, economics and, in this case, also on supply chain modelling. With this flexible and powerful tool we can add parameters and constraints to the model and test what-if scenarios on the optimization model.


For this model to work we need to have the most up-to-date data. One example is the value of the currency exchange. This is one of the most fluctuating variables but, fortunately, one with the most available data. Having a real time API that connects to the values posted by the global market allows us to have the most precise exchange data down to the minute. More challenging variables such as the tariffs are more unpredictable and can change from one day to another based on the decision of one single person. One of the strategies to keep up with the tariff variation is being alert to the news to constantly monitor any type of developments. Of course, this cannot be done manually as it would take a great amount of effort; instead, web monitoring tools can be implemented to keep up with the latest developments from trusted news web sites and transfer the updated values of the tariffs into the model.


Now, if we wanted to find out what is the shortest possible route between a given list of geographical points that our raw materials need to cross before getting to their final destination, this is known as the travelling salesman problem (TSP), which is one of the simplest problems to describe but incredibly hard to solve optimally, as its total number of possibilities grows exponentially with the number of points the route needs to include. No exact solution exists for this problem, but many different algorithms offer approximations and heuristics like Nearest Neighbor, Dynamic Programming, Lin-Kernighan heuristic, etc.


Next, all of this formulation of the problem is worthless if there is no way to communicate it to the actual analysts and stakeholders of the company. That’s why having an Alerts and Exceptions section in a BI visualization platform is key to inform events such as "supplier late >2 shipments this month" or "Random inspection rate increase, clearance +0.3 days", to keep the relevant people inside the company informed and to understand why specific configurations of the supply chain are selected over others.


One of the best visualizations to appreciate most of the supply chain process is the following sankey chart:



The nodes represent the different suppliers, country of origin, materials, destination region and product family, while the thickness of the lines that connect each of the nodes represents the revenue.


In conclusion, we can see that the supply chain optimization problem is a complex challenge that involves many different variables, from raw materials and currency exchange to tariffs and political events. Instead of relying on trial and error, what companies can do is build a mathematical model based on weighted variables, which allows them to quantify the effect of each factor and run what-if scenarios so the business can be on top of future events instead of just reacting to them. Of course, the model is only as good as the data behind it, and that’s why having real time FX feeds and web monitoring tools for tariffs is so important to keep the values up to date. On top of this, algorithms like the ones used for the travelling salesman problem help to find good approximations for routing problems that are too complex to solve exactly.


Finally, all of this work is worthless if there is no way to communicate the results to the actual stakeholders of the company, and that’s where BI alerts, exceptions and visualizations like the sankey chart come into play to keep the relevant people informed and to understand why specific configurations are selected over others. With this approach companies can stop reacting and start anticipating, which is the real competitive advantage in a global market where tariffs, currencies and political events can change from one day to another. Talk to Pingahla's supply chain analytics team. We'll show you exactly where your tariff, FX, and sourcing exposure sits and what it's costing you per quarter (fill the form at the bottom of the page)


Or feel free to send a custom message to info@pingahla.com.


 
 
 

Recent Posts

See All
Tableau vs. Dash Plotly

Imagine you would like to do an analysis for your current job or business. For this analysis you would like to use graphs, tables, maps and add a layer of interactivity so the users can obtain differe

 
 
 

Comments


bottom of page