Find Jobs
Hire Freelancers

Intersection

$10-30 USD

In Progress
Posted 11 months ago

$10-30 USD

Paid on delivery
I am looking for a freelancer to help me create a simple student program in ADA language, because I don't have time but need it done to 23.06.23. Contents: At a certain intersection there are many collisions, so a special traffic organization has been introduced: cars can only enter from one side at a time (only one green light is on at the entrance to the intersection). There are two types of tasks in the program: a traffic light control system (Intersection type) and cars (Car type - a certain number of such tasks, not exceeding 100). The possible directions of entering the intersection are determined by the Direction type. Each of the cars has a unique id number ranging from 1 to 100. The cars' tasks work as follows: at some point they want to enter the intersection (waiting for a green light for the direction they are coming from), then they drive through the intersection and finally leave it. Overtaking is not allowed at the intersection, so the order in which cars leave the intersection must be the same as the order in which they entered - regardless of the direction they left the intersection. Complete the Intersection task code as defined in the [login to view URL] file and as described below. File [login to view URL] (must be in Polish) package Rozwiazanie is maxID: constant Integer:= 100; type Kierunek is (Polnoc, Poludnie, Wschod, Zachod); task type Skrzyzowanie is entry Wjedz(id: Integer; k: Kierunek); entry Opusc(id: Integer; k: Kierunek); private entry Kolejka(id: Integer; k: Kierunek); end Skrzyzowanie; end Rozwiazanie; Rozwiazanie means Solution Kierunek means Direction (North South East West) Skrzyrzowanie - Intersection Wjedz - Enter Opusc - Leave Kolejka - Queue As a solution, only the completed file [login to view URL] should be sent in accordance with the definition of the Rozwiazanie package - in particular, you cannot change/add an entry in the Crossing task and create additional tasks. The rozwiazanie should meet the following conditions: Each of the Car tasks is called (possibly multiple times) in the following order entry: Enter and Leave with the same id parameter but possibly different k parameters; between these calls and before each attempt to enter the intersection, the task can perform any actions not related to the intersection (but introducing some delays - shorter than 1 second), Tasks calling entry Enter should be blocked on this call, if the current direction of traffic at the intersection is not appropriate for them (the green light is on for a different direction of entry); if the direction is correct - the task can be blocked or not, but it is advisable to use the intersection for more cars coming from one direction, After calling entry Leave, the task should be blocked until all cars that have entered the intersection have left the intersection (i.e. they have called entry Enter for the current direction of traffic), Traffic lights control should be "fair" - a situation in which cars entering the intersection from a certain direction cannot be allowed to be privileged / disadvantaged, Intersection quest should exit when the intersection remains empty for 1 second Make sure that the entire program ends its operation (it can be assumed that tasks of the Car type end their execution after passing through the intersection several times), No Ada bundled with with packages can be used (best to remove/comment out Ada.Text_IO used during testing, etc.)
Project ID: 36776332

About the project

1 proposal
Remote project
Active 11 mos 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
Awarded to:
User Avatar
Hi, I have extensive experience on your project and can deliver you your ada code within 1 day max. For more details send me a message. Here is how i will work on your project: I will create a program that simulates an intersection with traffic lights control and cars that enter and leave the intersection based on the traffic lights and the order in which they arrived. I will use the provided [login to view URL] file as a starting point and complete the code in the [login to view URL] file, following the guidelines and requirements specified in the project description. I will ensure that the program meets all the requirements specified in the project description, including fair traffic light control, blocking tasks on entry if the direction is incorrect, waiting for all cars to leave before unblocking a task, and exiting the intersection quest if the intersection remains empty for 1 second. I will thoroughly test the program to ensure that it is working as expected and meets all requirements.
$30 USD in 1 day
5.0 (5 reviews)
2.9
2.9

About the client

Flag of POLAND
Krakow, Poland
0.0
0
Payment method verified
Member since Jun 21, 2023

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.