Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RAMP_SY_35 #28

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 0 additions & 16 deletions README.md

This file was deleted.

38 changes: 38 additions & 0 deletions ReadMe.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
TEAM RAMP

Theme:Digital Society

Project Theme:Parking Management System

Project Name:RAMP PARKING SOLUTIONS

Team Members:

Madhavi Dewalkar-SY ENTC

Anushka Desai-SY ENTC

Riya Barne-SY ENTC

Purva Bhosale-SY ENTC


Project Description:

RAMP is one stop solution for solving all your parking needs!
It helps you find the best possible parking spot according to type of vehicle, proximity to current loaction, government dating system(even/odd parking),etc.

Project Drive link: https://drive.google.com/drive/folders/1DyMzXsDtXPRPtQ-dLy2_VAP7h9JpjBqR?usp=sharing
(Video Explanation and Reports)

Sample Website:https://madhavidewalkar.github.io/RAMP_SY/

Data Structures Used:
Hash Maps
Graphs
Arraylist
Arrays




Binary file added bufferproject-java/bin/Final/Sitch.class
Binary file not shown.
Binary file added bufferproject-java/bin/garrage/dijkstra.class
Binary file not shown.
Binary file added bufferproject-java/bin/module-info.class
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added bufferproject-java/src/Final/Sitch.class
Binary file not shown.
52 changes: 52 additions & 0 deletions bufferproject-java/src/Final/Sitch.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
package Final;
import java.util.*;
import weightedgraph.*;

public class Sitch {

static String name;
private static Scanner sc;

public static void main(String[] args)
{
String str;
Maingraph m=new Maingraph();
sc = new Scanner(System.in);
do
{ System.out.println("*************WELCOME TO RAMP PARKING SOLUTIONS***********");
System.out.println("\nEnter your name");
name=sc.next();
System.out.println("\nHello "+ name + "!");
System.out.println("\nChoose your current location");
System.out.println("\n1.Bavdhan\n2.Kothrud\n3.Karvenagar\n4.Warje");
int ch=sc.nextInt();

switch(ch)
{
case 1:
System.out.println("\nYou are at Bavdhan");
m.NodeA();
break;

case 2:
System.out.println("\nYou are at Kothrud");
m.NodeB();
break;
case 3:

System.out.println("\nYou are at Karvenagar");
m.NodeC();
break;
case 4:
System.out.println("\nYou are at Warje");
m.NodeD();
break;
}
System.out.println("\nDo you want to continue using the app?(Y/N)");
str=sc.next();
}while(str.equalsIgnoreCase("Y"));

System.out.println("THANKYOU FOR USING OUR APP!" );
}

}
Binary file added bufferproject-java/src/garrage/dijkstra.class
Binary file not shown.
182 changes: 182 additions & 0 deletions bufferproject-java/src/garrage/dijkstra.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,182 @@
package garrage;
import java.util.*;


import java.util.function.*;
import java.util.stream.Collectors;

import weightedgraph.Maingraph;
import weightedgraph.firstgraph;;


public class dijkstra
{
Scanner sc=new Scanner(System.in);
int whirl;
int source;
int two;
static final int totalVertex = 8;

int minimumDistance(int distance[], Boolean spSet[])
{
int m = Integer.MAX_VALUE, m_index = -1;

for (int vx = 0; vx < totalVertex; vx++)
{
if (spSet[vx] == false && distance[vx] <= m)
{
m = distance[vx];
m_index = vx;
}
}
return m_index;
}
void conditions(int source,int distance[], int n, firstgraph g,String a,String b)
{
this.source=source;
List<Integer> list=new ArrayList<Integer>();
for(int j=0;j<n;j++)
{

if(a.equalsIgnoreCase("E"))
{
if( j%2==0 && distance[j]!=0 && g.getNodes().get(j).isAvail()==true)

{
list.add(distance[j]);
}
}
else
{

if(j%2!=0 && distance[j]!=0 && g.getNodes().get(j).isAvail()==true )

list.add(distance[j]);

}

}

if(b.equalsIgnoreCase("F"))
{
Predicate<Integer> Fourwheeler = four->four%3==0;
List<Integer> Streamlist=list.stream().filter(Fourwheeler).collect(Collectors.toList());
spot(Streamlist, distance, g);

}
else

spot(list, distance, g);

}

public void dij(int s, int graph[][],firstgraph g,String a,String b)
{
this.source=s;
int distance[] = new int[totalVertex];

Boolean spSet[] = new Boolean[totalVertex];

for (int j = 0; j < totalVertex; j++)
{
distance[j] = Integer.MAX_VALUE;
spSet[j] = false;
}
distance[s] = 0;
for (int cnt = 0; cnt < totalVertex - 1; cnt++)
{
int ux = minimumDistance(distance, spSet);
spSet[ux] = true;
for (int vx = 0; vx < totalVertex; vx++)
if (!spSet[vx] && graph[ux][vx] != -1 && distance[ux] != Integer.MAX_VALUE && distance[ux] + graph[ux][vx] < distance[vx])
{
distance[vx] = distance[ux] + graph[ux][vx];

}

}


conditions(source,distance, totalVertex,g,a,b); //call to function conditions
}

public void avail(int a,firstgraph g,int k)
{

if(a==1)
{
g.getNodes().get(k).setAvail(false);
displayavailability(g,k);
}

}

void displayavailability(firstgraph g,int k)
{
if(g.getNodes().get(k).isAvail()==false)
{
System.out.println("This spot is filled now");

}

}

public void spot(List<Integer> list,int distance[],firstgraph g)
{
int ch=0,nearestSpot=99;
if(list.isEmpty())
{
System.out.println("Sorry!No spots are available right now");

}
else

{
Collections.sort(list);

do
{

for(int i=0;i<list.size();i++)
{
for(int j=0;j<distance.length;j++)
{
if(list.get(i)==distance[j])
{
System.out.println("\nYour Nearest Parking spot is " + g.getNodes().get(j) + " At a distance of " + distance[j] + "kms");
nearestSpot=j;
System.out.println("\nPress 1 to confirm your parking spot\nPress 2 for other parking spot\nPress 3 to exit the app");
ch=sc.nextInt();

}
}

if(ch==1)
{
avail(ch,g,nearestSpot);
break;

}

else if(ch==3)
{
exit(1);
}


}

}while(ch==2);
}
}
private void exit(int i)
{

if(i==1)
{
System.out.println("\nTHANKYOU FOR USING OUR APP!");
System.exit(i);
}
}
}

Binary file added bufferproject-java/src/module-info.class
Binary file not shown.
9 changes: 9 additions & 0 deletions bufferproject-java/src/module-info.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/**
*
*/
/**
* @author anushka
*
*/
module garrage {
}
Binary file not shown.
Loading