Find Jobs
Hire Freelancers

Create an function/algorithm in C#

$10-30 USD

In Progress
Posted about 4 years ago

$10-30 USD

Paid on delivery
I need a algorithm or function in C# that plans and creates tasks with the least number of trucks based on these rules: 1. Each truck can take either a container of size 40 or two containers 20. 2. A task or a job is about a truck drop of one or more containers (based on capacity rule 1 ) and pickup one or more containers The following are the classes. public class TaskInfo { public TruckInfo Truck { get; set; } public List<ContainerInfo> Pickup { get; set; } public List<ContainerInfo> DropOff { get; set; } } public class TruckInfo { public var PlateNo { get; set; } } public class ContainerInfo { public string ContainerNo { get; set; } public string ContainerSize { get; set; } } Using this below test data, I need winner to create a function (createtasks) that takes a list of containers to drop-off and pickup and then comes up with the best plan (by creating tasks hence ) which allows the use of the least number of trucks. List<ContainerInfo> PickupContainers = new List<ContainerInfo>(); List<ContainerInfo> dropoffcontainers = new List<ContainerInfo>(); ContainerInfo pc1 = new ContainerInfo(); [login to view URL] = "BMOU4364018"; [login to view URL] = "20"; ContainerInfo pc2 = new ContainerInfo(); [login to view URL] = "PCIU8986471"; [login to view URL] = "20"; ContainerInfo pc3 = new ContainerInfo(); [login to view URL] = "PCIU1905035"; [login to view URL] = "20"; ContainerInfo pc4 = new ContainerInfo(); [login to view URL] = "PCIU1905035"; [login to view URL] = "40"; [login to view URL](pc1); [login to view URL](pc2); [login to view URL](pc3); [login to view URL](pc4); ContainerInfo drop_con1 = new ContainerInfo(); [login to view URL] = "MTY0000240"; [login to view URL] = "20"; ContainerInfo drop_con2 = new ContainerInfo(); [login to view URL] = "MTY0000241"; [login to view URL] = "40"; ContainerInfo drop_con3 = new ContainerInfo(); [login to view URL] = "MTY0000242"; [login to view URL] = "40"; [login to view URL](drop_con1); [login to view URL](drop_con2); [login to view URL](drop_con3); List<TaskInfo> tasks = new List<TaskInfo>(); createtasks(PickupContainers, dropoffcontainers, tasks);
Project ID: 23599145

About the project

5 proposals
Remote project
Active 4 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
5 freelancers are bidding on average $37 USD for this job
User Avatar
Thank you for your posting job. I read your project description and I'm very interested in this project. As you can see via my profile, I have expertise skills to build C#& C++. If you hire me for this project, you will have a chance to get to know another talent and trustworthy. I hope to work with you, sincerely.
$50 USD in 1 day
4.7 (16 reviews)
5.0
5.0
User Avatar
Hello, I have read your specifications and I think I understand the requirement correctly. Just one question: it can be assumed that all the drops and pickups occur at the same location and time right? If so, I can get this done in the next hour, provided you accept the bid and escrow the project.
$20 USD in 1 day
4.9 (13 reviews)
4.2
4.2
User Avatar
Hello, i am Rida ayesha i have around 5 years if experience in development, C# ,c++ are my cores. You can also check my review about programming. Jo just come in message box so we can discuss this problem and i will start working for you soon.
$35 USD in 3 days
0.0 (0 reviews)
0.0
0.0
User Avatar
I will deliver the optimal solution to your problem. I will actually start working on the project right away as I love these kind of algorithmic problems. I look forward to working with you.
$50 USD in 1 day
0.0 (0 reviews)
0.0
0.0
User Avatar
I read your project description and I can start working on it the next few hours and deliver you an efficient algorithm in a very short time..
$30 USD in 1 day
0.0 (0 reviews)
0.0
0.0

About the client

Flag of SOMALIA
Hargeisa, Somalia
5.0
108
Payment method verified
Member since Apr 13, 2015

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.