Click here to Skip to main content
15,894,180 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello friends,

I want to simulate PERT network. I am referring System simulation with digital computer.
But I m not getting what input it has to be take and how to start my project. I want to develope this project graphically in C or C++.

If you have project than please give me or please help me in above mentioned query.
Posted
Updated 31-Aug-10 7:29am
v3
Comments
Richard MacCutchan 31-Aug-10 17:50pm    
Try Googling "Dijkstra's Algorithm".

If you really do not know how to do this then you should perhaps step back and learn the basics of the subject, or the computer language first. I am afraid that people here do not have the time to write your application for you.
 
Share this answer
 
Comments
vai_rajput 31-Aug-10 14:10pm    
I know c programming language very well... but i m not understanding that how to take input of graphs like which has number of nodes and number of edges...
i want to draw graph like this http://www.google.co.in/imgres?imgurl=http://lcm.csa.iisc.ernet.in/dsa/img324.gif&imgrefurl=http://lcm.csa.iisc.ernet.in/dsa/node162.html&usg=__ISrYnVuabzvWs2UcNCmSC_RJTGs=&h=332&w=692&sz=5&hl=en&start=3&sig2=W-ZvEkaVqaBQX-14rqmvIg&zoom=1&tbnid=15cnOtXlLgEKSM:&tbnh=67&tbnw=139&ei=gER9TN_GM4OavAOZ6Mxk&prev=/images%3Fq%3Ddijkstra%2527s%2Balgorithm%26um%3D1%26hl%3Den%26client%3Dfirefox-a%26sa%3DN%26rls%3Dorg.mozilla:en-US:official%26biw%3D1366%26bih%3D576%26tbs%3Disch:1&um=1&itbs=1
so how this is posible pliz give me logic behind this...
Nobody is going to give you code.

Here is what is expected by enquirers:
1. TRY first what you want to do!
2. Formulate what was done by you that looks like an issue/not working.

Try them and tell if you face issues.
Members will be more than happy to help like this.
 
Share this answer
 
Comments
vai_rajput 31-Aug-10 14:11pm    
I want to draw a graph which has number of node and number of edges selected by user so how this is posible to do in c with graphics???any logic pliz...
Quote: "so how this is posible pliz give me logic behind this."

Sorry, but I don't have the logic, you need to find a book or internet site that explains it. Try the articles here on CodeProject, you may find something that helps you.
 
Share this answer
 
The basic input for graph algorithms programs is Adjacency (for simple graphs) or Distance (for graph with weights) matrix which can be represented by two diemnsional array.

Here's the example of graph and corresponding matrix:

http://en.wikipedia.org/wiki/Adjacency_matrix

Any graph operation are very simple when youre working on arrays only. You can also easy draw graph having such matrix. Moreover, doing some matrix algebra you can optimize your code pretty well. Good luck.
 
Share this answer
 
Comments
vai_rajput 1-Sep-10 11:05am    
ok i used matrix for storing nodes and edges...how i simulate it in the graphically..as node and edges....
helianthus87 6-Sep-10 8:07am    
You need to figure out how to place nodes and edges on scene to avoid colliscion and make the graph clear and easy to understand. There are plenty algorithms to draw trees, graphs, etc. But everything depends on certain type of graph youre going to draw, its complexity, number of edges, nodes. The easiest way i found (perfect for learning purpose, works fine for graphs with about 20-40 nodes, with more nodes even with large circle edges edges ovarlaying and cant really see there) is to draw nodes over the circle with straith lines between nodes. Easy to implement, animate or do anything you want.
vai_rajput 6-Sep-10 12:29pm    
can u pliz give more hint or some lines of code to do it...

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900