Is the fastest route always the best? This article may give you a different perspective if your answer is yes.
Normally there are multiple ways to tackle a given problem or task, and the optimization field is no different, as there are different approaches we can take to find an optimal solution. The choice of the best path to take may depend on the variables we are considering, the available data, the system’s complexity, the time required to reach the best solution, etc.
In this article, we explore two well-known approaches when it comes to optimization, Local Optimization e Global Optimization.
Besides discussing how they differ in terms of ideology, pros, and cons, we will check their application in a real use case scenario: allocating real estate agents to apartments for sale.
Local optimization vs. Global optimization
Local and global optimization techniques try to find the best possible solution using different routes.
Local optimization techniques normally are more “greedy”, as they prefer to follow the most promising path known until now instead of exploring other search spaces. This type of optimization should be more suitable for simple systems where the number of variables to optimize is only a few, and they are clearly identified. Furthermore, it can be used when we pretend to have an acceptable solution as quickly as possible.
On the other hand, global optimization focuses on finding the path to the best possible solution in the entire search space, even though it can take more time. This allows the creation of more reliable solutions, although it can take a bit more time to get there. This can be a good approach to follow if there is an unknown relationship between the different variables in the system or we have a more complex or black-box system.
When training a machine learning model in AI, typically, we try to prevent reaching a local optima (which can be a good solution, but not the best one) as we hope to reach the global optima, which translates into a more robust and generalizable model. Although, in some cases where time is an important factor, a greedy approach can be enough.
Next, we will apply both approaches to a specific use case: allocating real estate agents to apartments for sale.
Use Case
Assuming you are a real estate company, how could you optimize the allocations of apartments to the available real estate agents?
The first important aspect to consider is what variable(s) we want to optimize. Is it time? Profit? The number of visits required? Diversity in the sales? A good assumption is to consider that we want to generate the maximum profit in the lowest time possible. Thus, a good metric to optimize might be the price per day (ratio between the profit and days required for sale).
Data
In terms of available data, we assume we have the following information:
Apartment:
Number of rooms
Area (M2)
…
Purchase price
Location
Features regarding infrastructures in the surrounding area
Real Estate Agent:
Inventory:
Number of apartments to sell in total, based on location, price range, typology, area, etc
Historical sells:
Sells made in the past (for a specific time window) based on location, price range, typology, area, etc
Apartment vs. Agent:
Predicted days in the market for a given (apartment, agent). That is, in how many days a given agent is capable of selling a given apartment.
As this a more tricky information to have, an alternative can be to train a machine learning algorithm (based on the remaining data), that can predict the days in the market for a particular (apartment, agent)
Market:
Number of apartments sold in the past (x days)
Apartments currently available for sell
Applying Local optimization
Following the local optimization ideologies, a likely approach would be to start with the best matches between real estate agent and apartment, this means start by allocating the most suitable agents to the respective apartment first.
As we saw before, dollars/day is a good metric to take in consideration in the allocations, so the step 1 is to compute the dollars per day for every pair <Agent, Apartment>. Next, as this is a greedy approach, we rank the allocations (in descending order) by dollars per day value and start allocating the agents to the apartments with higher dollars_per_day metric.
Thus, the approach can be defined as follows:
Compute dollars per day:
Margin = agent valuation for a specific apartment – purchase price
dollars per day = margin / prediction of days in market for (apartment, agent)
Allocation process: ranking dollars per day (in descending order)
Applying Global optimization
Using a global optimization approach, besides dollars per day, we can think of other metrics that may be relevant when measuring how suitable it is to allocate a given apartment to an agent.
Selling_speed: if a given agent is good at selling a specific type of apartment, we should give him more apartments of that type
Inventory: if a given agent already has similar apartments to sell, we should probably not allocate more apartments with those characteristics to him. An alternative is to define a maximum number of apartments assigned to a single agent.
(In this context, we assume that similar apartments have the same price range, area range, and the same typology.)
Thus, there are 3 aspects to consider in the allocation model:
[maximize] dollars per day: profit/days, same as in the local optimization approach
[maximize] Selling speed: percentage of similar apartments sold in the last X days
[minimize] Inventory: percentage of similar apartments in inventory
Using this information, we can define an objective function that our allocation model will try to maximize, assuming we want to allocation n apartments to real estate agents.
This function corresponds essentially to a weighted average, in which our allocation model will learn the best parameters for maximizing the objective function.
Curso
Metaheuristics: Theory and Applications
Check out this course to learn more about Optimization approaches!
Considering this specific use case, using a local optimization approach, we would be making the allocations sequentially (allocation by allocation), starting from the best allocations, without considering the impact of each allocation on the overall set of allocations. Therefore, we cannot assure that, in the end, we will reach the best solution, although we can get an acceptable solution in less time. If we apply a global optimization technique, globally, the allocations should be more accurate as we are thinking about the overall set of allocations and not thinking about allocation by allocation. This means that the performance should be better, although the time to get the solution may be longer.
The fact that we may have multiple variables to optimize, depending on how we pretend to “measure” how good a given allocation is, is another factor that benefits the global approach instead of a local approach in this specific use case.
The amount of data available can also be an important decision factor when deciding the best approach. Typically, global optimization approaches require more data than local optimization approaches.
Finally, the type of data processing is also important. If the allocations are performed in batches, then a global approach would determine the best allocations considering the entire system (set of all allocations). On the other hand, if the allocations are supposed to be delivered in a streaming fashion, then a greedy approach would be useful, as it does not need to consider allocations of multiple apartments.
Going back to the first question, in the optimization field, the fastest and most promising path may not be the best to take after all, especially if it involves making several decisions along the way.
A local optimization approach may be more greedy in the way to find the best solution, which translates into a good solution, but not the best one. Using a more global optimization approach, it can take more time, and the obtained solution should be more trustable.
Did you use any of these approaches recently? Which one do you think is more appropriate to use? Feel free to get in touch with us, we would be happy to know your thoughts on this topic!
We also have a pre-order available for a Metaheuristics course on our website, where you can get practical skills in combinatorial optimization using Metaheuristics, and learn more about alternative methods to solving issues such as allocations!
Like this story?
Subscribe to Our Newsletter
Special offers, latest news and quality content in your inbox.
Signup single post
Recommended Articles
Article
Descubra o significado do «Ai First»: Guia estratégico para 2026
22 de junho de 2026 in
Guia: Explicação
Descubra o verdadeiro significado da abordagem «AI First» para a sua empresa. Obtenha um roteiro estratégico para 2026, exemplos práticos e evite erros comuns.
IA para o Crescimento Empresarial: O Seu Guia Prático de Estratégia
17 de junho de 2026 in
Guia: Explicação
Descubra como a IA para o crescimento empresarial pode aumentar a eficiência, melhorar a tomada de decisões e criar laços mais fortes com os clientes. Obtenha agora estratégias práticas.
Automatização de faturas: otimize o seu departamento de contas a pagar em 2026
15 de junho de 2026 in
Guia: Explicação
Otimize o processo de contabilidade de fornecedores através da automatização das faturas. Conheça as tecnologias e as melhores práticas e avalie o valor real para a sua organização.
Utilizamos cookies no nosso website para lhe proporcionar a experiência mais relevante, lembrando as suas preferências e visitas repetidas. Ao clicar em “Aceitar Tudo”, concorda com a utilização de TODOS os cookies. No entanto, pode visitar as "Definições de Cookies" para fornecer um consentimento controlado.
Este website utiliza cookies para melhorar a sua experiência enquanto navega no website. Desses, os cookies categorizados como necessários são armazenados no seu navegador, pois são essenciais para o funcionamento das funcionalidades básicas do website. Também utilizamos cookies de terceiros que nos ajudam a analisar e compreender como utiliza este website. Estes cookies serão armazenados no seu navegador apenas com o seu consentimento. Tem também a opção de recusar estes cookies. No entanto, a recusa de alguns destes cookies pode afetar a sua experiência de navegação.
Os cookies necessários são absolutamente essenciais para que o website funcione corretamente. Estes cookies garantem funcionalidades básicas e recursos de segurança do website, de forma anónima.
Cookie
Duration
Description
cookielawinfo-checkbox-analiticas
11 meses
Este cookie é definido pelo plugin de Consentimento de Cookies do RGPD. O cookie é usado para armazenar o consentimento do utilizador para os cookies na categoria "Análise".
---
O seu texto é uma etiqueta ou nome de campo, provavelmente de um sistema de gestão de cookies ou de um formulário web, e não uma frase completa que necessite de tradução contextual.
No entanto, se o objectivo for manter a clareza e a funcionalidade para um utilizador de língua portuguesa, sugiro a seguinte tradução e explicação:
**"Checkbox Funcional"**
**Explicação:**
* **Checkbox:** Refere-se ao elemento gráfico de marcação (uma caixa que pode ser seleccionada ou desmarcada).
* **Funcional:** Indica que esta caixa de seleção está relacionada com funcionalidades essenciais do website, como o login, a gestão do carrinho de compras ou outras características que tornam o site utilizável.
Se esta etiqueta pertencer a um contexto onde se refere especificamente a cookies, a tradução poderia ser ajustada para ter mais clareza:
**"Aceitação de Cookies Funcionais"**
ou
**"Cookies Essenciais (Funcionais)"**
Esta última opção é comum em avisos de cookies para indicar que estes são estritamente necessários para o funcionamento do site.
---
11 meses
O cookie é definido pelo consentimento de cookies GDPR para registar o consentimento do utilizador para os cookies na categoria "Funcional".
cookielawinfo-checkbox-necessary
11 meses
Este cookie é definido pelo plugin GDPR Cookie Consent. O cookie é usado para armazenar o consentimento do utilizador para os cookies na categoria "Necessário".
cookielawinfo-checkbox-outros
11 meses
Este cookie é definido pelo plugin GDPR Cookie Consent. O cookie é usado para armazenar o consentimento do utilizador para os cookies na categoria "Outros".
checkbox-performance-cookielawinfo
11 meses
Este cookie é definido pelo plugin GDPR Cookie Consent. O cookie é usado para armazenar o consentimento do utilizador para os cookies na categoria "Desempenho".
política_de_cookies_visualizada
11 meses
O cookie é definido pelo plugin GDPR Cookie Consent e é utilizado para armazenar se o utilizador consentiu ou não com a utilização de cookies. Não armazena quaisquer dados pessoais.
Os cookies funcionais ajudam a realizar certas funcionalidades como partilhar o conteúdo do website em plataformas de redes sociais, recolher feedback e outras funcionalidades de terceiros.
Os cookies de desempenho são usados para compreender e analisar os principais índices de desempenho do website, o que ajuda a proporcionar uma melhor experiência ao utilizador para os visitantes.
Os cookies analíticos são usados para entender como os visitantes interagem com o website. Estes cookies ajudam a fornecer informações sobre métricas como o número de visitantes, taxa de rejeição, fonte de tráfego, etc.
Os cookies de publicidade são usados para fornecer aos visitantes anúncios relevantes e campanhas de marketing. Estes cookies rastreiam os visitantes em diferentes websites e recolhem informações para fornecer anúncios personalizados.