diff --git a/src/appTools.ml b/src/appTools.ml index e92d24f..3a4dd07 100644 --- a/src/appTools.ml +++ b/src/appTools.ml @@ -34,9 +34,9 @@ let getMaximumNodeId g = node toward the desired node(s). This function also completes the graph by adding a starting node*) let addChildren xxs g = (*the id of the start is the maximum id + the number of added nodes + 1 to get the next maximum id *) - let startId = (getMaximumNodeId g) + (List.length xxs) + 1 in + let sourceId = (getMaximumNodeId g) + (List.length xxs) + 1 in (*We create the node*) - let g2 = new_node g startId in + let g2 = new_node g sourceId in (*goes over all the activities of a children*) let rec activitiesIterator childNode acc = function @@ -47,7 +47,7 @@ let addChildren xxs g = (*tool function to create the node for said children and create the edge from the start to this node*) let addChildrenNode g a = let g1 = (new_node g a) in - add_arc g1 startId a 1 + add_arc g1 sourceId a 1 in (*goes over all the children of the list*) diff --git a/src/fordFulkerson.ml b/src/fordFulkerson.ml index 8d54bd4..26b7665 100644 --- a/src/fordFulkerson.ml +++ b/src/fordFulkerson.ml @@ -14,8 +14,8 @@ let rec way g n1 n2 = | a, b -> let findNext x (arcId, arcCapa) = match x with - | None -> inner g (arcId :: xs, (min capa arcCapa)) (arcId :: visited) arcId n2 (*If we are returned a non then this branch - is empty --> we need to serach in the others*) + | None -> inner g (arcId :: xs, (min capa arcCapa)) (arcId :: visited) arcId n2 (*If we are returned a none then this branch + is empty --> we need to search in the others*) | Some a -> Some a in