Effacer les filtres
Effacer les filtres

Truck logistics system for delivering cargo to industry

15 vues (au cours des 30 derniers jours)
Erik Edlund
Erik Edlund le 6 Mar 2024
Réponse apportée : Nihal le 22 Mar 2024
I'm doing my master thesis in trying to simulate a truck transport system. I've started coding it in both simulink and matlab but the problem is that I haven't used simulink that much. The system I'm trying to simulate is one where trucks are generated according to some distribution and they are then loading cargo at one place of many. Then the idea is to simulate them delivering cargo to an off load place and then showing how much fuel they spent and how much cargo they managed to deliver. One important factor is how much cargo they managed to fill their truck with, ie how close to the maximum allowed limit they fill it.
My question is if anyone has a good idea about how this would best be modelled? I've started trying with an entity generator in simulink and created different classes in matlab as an alternative but I'v gotten stuck on the resources being taken from the loading places onto the trucks. Any idea or tips/ tricks would be greatly appreciated.

Réponse acceptée

Nihal
Nihal le 22 Mar 2024
Hi Erik,
Modeling a truck transport system, especially focusing on the aspects of cargo loading, fuel consumption, and delivery, can be quite complex. Here are some tips and strategies to consider for modeling your system in Simulink, especially if you're incorporating elements like entity generation and class definitions in MATLAB:
1. Use SimEvents® for Discrete-Event Simulation
For modeling and simulating the logistics and operations of a truck transport system, SimEvents® in Simulink provides a powerful platform. It allows you to model the discrete flow of trucks (entities) through your system, including the processes of loading, transporting, and unloading cargo.
  • Entity Generation: Use the Entity Generator block to simulate the arrival of trucks according to a specified distribution. This can mimic the real-world scenario of trucks arriving at random intervals.
  • Attributes: Assign attributes to your entities (trucks) to represent their characteristics, such as maximum cargo capacity, current load, fuel consumption rate, etc.
  • Queues and Servers: Utilize Queue blocks to represent loading and unloading stations. Trucks can wait in queues if the loading/unloading resources are busy. Server blocks can simulate the process of loading and unloading cargo, where the amount of cargo loaded/unloaded and the time taken can be based on the truck's attributes and the available resources.
2. Modeling Cargo Loading
  • Resource Allocation: Use Resource Pool blocks to represent the loaders or docks available for loading cargo onto trucks. You can control how resources are allocated to trucks based on priority or other criteria.
  • Dynamic Cargo Amounts: To model the variability in cargo amounts and the decision-making process for how much cargo to load onto each truck (aiming to maximize but not exceed capacity), you can use MATLAB Function blocks within your SimEvents model to implement custom logic based on the truck's current load and the available cargo.
3. Tracking Fuel Consumption and Cargo Delivery
  • Fuel Consumption: Model fuel consumption as a function of the truck's load and distance traveled. This can be implemented using MATLAB Function blocks or custom S-functions, where you calculate the fuel consumed based on the truck's attributes and update the truck's state accordingly.
  • Data Collection: Use Signal Logging or To Workspace blocks to collect data on cargo delivered and fuel spent. This data can then be analyzed in MATLAB for insights into system efficiency, average load capacity utilization, etc.
4. Visualization and Analysis
  • Scope Blocks: Use Scope blocks to visualize key metrics in real-time, such as the number of trucks in queues, fuel consumption rates, and cargo delivery rates.
  • MATLAB Analysis: Export simulation data to MATLAB for more detailed analysis, such as calculating average fuel efficiency, total cargo delivered, and how closely trucks are filling to their maximum allowed limit.
5. Iterative Development and Modular Design
  • Modular Design: Break down your system into modular components (e.g., loading stations, transport routes, unloading stations) to simplify development and debugging.
  • Iterative Testing: Start with a simple model and gradually add complexity. Validate each component's behavior with test inputs to ensure accuracy before integrating it into the larger system.
6. Leverage MATLAB Classes
  • If you're comfortable with object-oriented programming in MATLAB, you can define classes for trucks, cargo, and stations. These can be used to manage the logic and data associated with each entity more cleanly. However, integrating these directly with Simulink models requires careful planning, often using MATLAB Function blocks to bridge the Simulink and MATLAB environments.
By following these strategies, you can create a detailed and functional model of your truck transport system in Simulink and MATLAB. Remember, the complexity of the model can grow quickly, so focus on building and validating one component at a time. I hope this helps.

Plus de réponses (0)

Catégories

En savoir plus sur Simulink Functions dans Help Center et File Exchange

Produits


Version

R2023b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by