Wednesday, June 21, 2017

Digest for comp.programming.threads@googlegroups.com - 5 updates in 4 topics

rami18 <coco@coco.com>: Jun 20 04:06PM -0400

Hello,
 
 
I have just extended the readme file of Dijkstra and
Bellman-Ford-Moore's algorithms library, i forgot to document the edges
parameter:
 
edges: is the returned edges of the shortest path.
 
You can download again the zip file from:
 
https://sites.google.com/site/aminer68/dijkstra-and-bellman-ford-moore-s-algorithms
 
 
Thank you,
Amine Moulay Ramdane.
rami18 <coco@coco.com>: Jun 20 03:35PM -0400

Hello.....
 
 
I have just extended the readme file to clarify more how to use this CPM
library, please download again this CPM library from:
 
https://sites.google.com/site/aminer68/cpm-critical-path-method-for-delphi-and-freepascal
 
 
Here is what have changed:
 
Here is the arguments of the procedure to call:
 
The arguments are:
 
The filename: is the file to pass, it's organized as:
 
The first line is the number of jobs, the rest of the lines are the time
that takes the job and its precedence constraints that specify that the
job have to be completed before certain other jobs are begun.
 
info: is the returned information, you can get the job number and the
start and finish time of the job in info[i].job and info[i].start and
info[i].finish, please look at the test.pas example to understand.
 
finishTime: is the finish time.
 
 
Thank you,
Amine Moulay Ramdane.,
rami18 <coco@coco.com>: Jun 20 02:53PM -0400

Hello........
 
 
CPM (Critical Path Method) for Delphi and FreePascal
 
Version: 1.0
 
Authors: Robert Sedgewick, Kevin Wayne
and Amine Moulay Ramdane
 
Description:
 
The Critical Path Method or Critical Path Analysis, is a mathematically
based algorithm for scheduling a set of project activities, it is an
important tool for effective project management, commonly used with all
forms of projects, including construction, software development,
research projects, product development, engineering, and plant
maintenance, among others. Any project with interdependent activities
can apply this method of scheduling
 
CPM calculates:
 
- The longest path of planned activities to the end of the project
- The earliest and latest that each activity can start and finish
without making the project longer
- Determines "critical" activities (on the longest path)
- Prioritize activities for the effective management and to
shorten the planned critical path of a project by:
- Pruning critical path activities
- "Fast tracking" (performing more activities in parallel)
- "Crashing the critical path" (shortening the durations of critical
path activities by adding resources)
 
You have to have a java compiler, and you have first to compile the java
libraries with the batch file compile.bat, and after that compile the
Delphi and Freepascal test.pas program.
 
Here is the procedure to call:
 
procedure solveCPM(filename:string;var info:TCPMInfo;var
finishTime:system.double);
 
The arguments are:
 
The filename: is the file to pass, it's is organized as:
 
The first line is the number of jobs, the rest of the lines are the time
that takes the job and its precedences.
 
info: is the returned information, you can get the start and finish time
in info[i].start and info[i].finish, please look at the test.pas example
to understand.
 
finishTime: is the finish time.
 
Have fun with it !
 
You can download it from:
 
https://sites.google.com/site/aminer68/cpm-critical-path-method-for-delphi-and-freepascal
 
Language: FPC Pascal v2.2.0+ / Delphi 7+: http://www.freepascal.org/
 
Operating Systems: Windows,
 
Required FPC switches: -O3 -Sd -dFPC -dFreePascal
 
-Sd for delphi mode....
 
Required Delphi switches: -$H+ -DDelphi
 
For Delphi XE-XE7 use the -DXE switch
 
Please click on the small arrow on the right of the zip file bellow to
download...
 
 
Thank you,
Amine Moulay Ramdane.
rami18 <coco@coco.com>: Jun 20 12:41PM -0400

Hello..........
 
 
Dijkstra and Bellman-Ford-Moore's algorithms were updated to version 1.2
 
 
Dijkstra and Bellman-Ford-Moore's algorithms
Dijkstra's algorithm for Delphi and FreePascal. Computes the shortest
path tree. Assumes all weights are nonnegative.
 
and
 
Bellman-Ford-Moore's algorithm for Delphi and FreePascal, computes the
shortest path tree. The edge weights can be positive, negative or zero.
 
 
Version: 1.2
 
 
Authors: Robert Sedgewick, Kevin Wayne
and enhanced by Amine Moulay Ramdane
 
Email: aminer@videotron.ca
 
Description:
 
This project consists of this optimal implementation that uses
Dijkstra's algorithm with a binary heap that takes a time complexity of
E*log(V), V is the number of vertices and E is the number of edges. This
library can be used in parallel clusters manner by dividing your graph
in many parts to speed much your parallel algorithm, also i have added
an option to the algorithm that permits you to pass the edges of the
graph that you can substract from your graph to be able to give you
algorithm more control if you want for example to ignore congestions in
some roads...
 
You have to have a 32 bit or 64 bit java compiler and you have to
compile first the java library by running the compile1.bat batch file,
after that if you have compiled it with a 32 bit java compiler just
compile after that test1.pas with a 32 bit delphi or freepascal
compiler, but if you have compiled it with a 64 bit java compiler just
compile after that test1.pas with a 64 bit delphi or freepascal compiler.
 
This project also consists also of this optimal implementation that uses
Bellman-Ford-Moore's algorithm that takes a time complexity of V*E, V is
the number of vertices and E is the number of edges. This library can be
used in parallel clusters manner by dividing your graph in many parts to
speed much your parallel algorithm, also i have added an option to the
algorithm that permit you to pass the edges of the graph that you can
substract from your graph to be able to give you algorithm more control
if you want for example to ignore congestions in some roads...
 
The Bellman-Ford-Moore (BFM) algorithm which predates Dijkstra by 4 or 5
years. Better still, BFM is robust in the sense that it can handle
negative arc-weights and detect and find negative cycles. Dijkstra
cannot do this.
 
You have to have a 32 bit or 64 bit java compiler and you have to
compile first the java library by running the compile2.bat batch file,
after that if you have compiled it with a 32 bit java compiler just
compile after that test2.pas with a 32 bit delphi or freepascal
compiler, but if you have compiled it with a 64 bit java compiler just
compile after that test2.pas with a 64 bit delphi or freepascal compiler.
 
You have two procedures to call, here they are:
 
procedure solveDijkstra(filename:string;source:integer;
destination:integer;edgesToSustract:arr3;var edges:TDijkstraInfo;var
totalNumberOfVertices:integer;var distanceShortestPath:system.double);
 
procedure solveBellmanFord(filename:string;source:integer;
destination:integer;edgesToSustract:arr3;var edges:TDijkstraInfo;var
totalNumberOfVertices:integer;var distanceShortestPath:system.double);
 
The argements are the same, here they are:
 
Filename: is the filename to pass, the filename is organized as:
 
You write the number of vertices in the first line, and after that you
write the number of edges in the second line and after that you write
the edge and its weight in the each line.
 
source: is the source vertex.
 
destination: is the destination vertex.
 
edgesToSustract: is the edges to substract from the graph,
you can pass the edges that you want to substract by passing the edges
in an array, the edges must be arranged two by two in the array, the
first and the second element of the array is the first edge that you
want to substract etc., i have enhanced the algorithm with this new option.
 
totalNumberOfVertices: is the returned total number of vertices of the
graph.
 
distanceShortestPath: is the returned shortest path distance.
 
Have fun with it !
 
You can download it from:
 
https://sites.google.com/site/aminer68/dijkstra-and-bellman-ford-moore-s-algorithms
 
Language: FPC Pascal v2.2.0+ / Delphi 7+: http://www.freepascal.org/
 
Operating Systems: Windows,
 
Required FPC switches: -O3 -Sd -dFPC -dFreePascal
 
-Sd for delphi mode....
 
Required Delphi switches: -$H+ -DDelphi
 
For Delphi XE-XE7 use the -DXE switch
 
 
 
Thank you,
Amine Moulay Ramdane.
rami18 <coco@coco.com>: Jun 20 01:24PM -0400

On 6/20/2017 12:41 PM, rami18 wrote:
> destination:integer;edgesToSustract:arr3;var edges:TDijkstraInfo;var
> totalNumberOfVertices:integer;var distanceShortestPath:system.double);
 
> The argements are the same, here they are:
 
I mean arguments, not argements.
 
You received this digest because you're subscribed to updates for this group. You can change your settings on the group membership page.
To unsubscribe from this group and stop receiving emails from it send an email to comp.programming.threads+unsubscribe@googlegroups.com.

No comments: