From c89f3621804824967770e721743fb3da4b85ede6 Mon Sep 17 00:00:00 2001 From: Jason Marechal Date: Tue, 24 Oct 2023 13:55:52 +0200 Subject: [PATCH] Add new sequence diagram: full run cpp --- .../SequenceDiagrams/FullRunCPP/README.md | 7 + .../SequenceDiagrams/FullRunCPP/diagram.svg | 858 ++++++++++++++++++ .../SequenceDiagrams/FullRunCPP/diagram.txt | 94 ++ 3 files changed, 959 insertions(+) create mode 100644 conception/SequenceDiagrams/FullRunCPP/README.md create mode 100644 conception/SequenceDiagrams/FullRunCPP/diagram.svg create mode 100644 conception/SequenceDiagrams/FullRunCPP/diagram.txt diff --git a/conception/SequenceDiagrams/FullRunCPP/README.md b/conception/SequenceDiagrams/FullRunCPP/README.md new file mode 100644 index 000000000..cb7ab5208 --- /dev/null +++ b/conception/SequenceDiagrams/FullRunCPP/README.md @@ -0,0 +1,7 @@ +# Sequence diagram of full run (cpp part) + +This diagram show the different calls and objects occurring during a full run. +Some non-significant calls have been omitted + +This diagram is not automatically generated, meaning it is an image at some point in time and some evolution in the +project may not have been passed on this document \ No newline at end of file diff --git a/conception/SequenceDiagrams/FullRunCPP/diagram.svg b/conception/SequenceDiagrams/FullRunCPP/diagram.svg new file mode 100644 index 000000000..72e913d99 --- /dev/null +++ b/conception/SequenceDiagrams/FullRunCPP/diagram.svg @@ -0,0 +1,858 @@ + + + title%20CPP%20Full%20run%0Aparticipant%20Main%0Aparticipantgroup%20%23lightblue%20LPNamer%0Aparticipant%20ProblemGeneration%0Aparticipant%20WeightsFileReader%0Aparticipant%20YearlyWeightsWriter%0Aparticipant%20LpFilesExtractor%0Aparticipant%20LinkProblemsGenerator%0Aparticipant%20ZipProblemsProviderAdapter%0Aparticipant%20MPSFileWriter%0Aparticipant%20IProblemVariablesProviderPort%0Aparticipant%20ProblemModifier%0Aend%0AMain-%3EProblemGeneration%3ARunProblemGeneration()%0AProblemGeneration-%3EProblemGeneration%3AValidateMasterFormulation%0Agroup%20ProcessWeight%0AProblemGeneration-%3EWeightsFileReader%3AReadWeights()%0AWeightsFileReader-%3EProblemGeneration%3A%3Aweights_vector%0AProblemGeneration-%3EYearlyWeightsWriter%3AWriteActiveYears()%0Aend%0Adestroyafter%20WeightsFileReader%0Adestroy%20YearlyWeightsWriter%0Agroup%20ExtractUtilsFiles%0AProblemGeneration-%3ELpFilesExtractor%3AExtractArea%0AProblemGeneration-%3ELpFilesExtractor%3AExtractInterco%0AProblemGeneration-%3ELpFilesExtractor%3AExtractTSNumbers%0Aend%20%0Adestroyafter%20LpFilesExtractor%0AProblemGeneration-%3EProblemGeneration%3AGetLinks()%0AProblemGeneration-%3EProblemGeneration%3AReadConstraintsFile()%0A%0A%0Agroup%20getXpansionProblems%0Acreate%20ZipProblemsProviderAdapter%0AProblemGeneration-%3EZipProblemsProviderAdapter%3AprovideProblems()%0AZipProblemsProviderAdapter-%3EProblemGeneration%3AList%20of%20Problem%0Aend%0Adestroy%20ZipProblemsProviderAdapter%0A%0Acreate%20LinkProblemsGenerator%0Acreate%20MPSFileWriter%0Aloop%20Par%0Acreate%20IProblemVariablesProviderPort%0AProblemGeneration-%3ELinkProblemsGenerator%3Atreat()%0ALinkProblemsGenerator-%3EIProblemVariablesProviderPort%3AProvide()%0AIProblemVariablesProviderPort-%3ELinkProblemsGenerator%3AProblemVariables%0Acreate%20ProblemModifier%0ALinkProblemsGenerator-%3EProblemModifier%3AChangeProblem()%0Aloop%20link%0Aloop%20candidates%0ALinkProblemsGenerator-%3EProblemGeneration%3ACouplings%5Bcandidate_name%2C%20problem_name%5D%0Aend%0Aend%0ALinkProblemsGenerator-%3EMPSFileWriter%3AWriteProblem()%0Adestroyafter%20ProblemModifier%0Aend%0Adestroy%20IProblemVariablesProviderPort%0A%0A%0Adestroy%20MPSFileWriter%0Adestroy%20ZipProblemsProviderAdapter%0Adestroy%20LinkProblemsGenerator%0A%0AProblemGeneration-%3EProblemGeneration%3Amaster_generation()%0Adestroyafter%20ProblemGeneration%0A%2F%2F%2F%2F%2F%0Aparticipantgroup%20%23pink%20Benders%0Acreate%20BendersFactrory%0AMain-%3EBendersFactrory%3ARunBenders%0Acreate%20Benders%0ABendersFactrory-%3EBenders%3ALaunch()%0Agroup%20build_input_map()%0ABenders-%3EBenders%3Aget_master_variable_map()%0ABenders-%3EBenders%3AGetCouplingMap()%0Aend%0Agroup%20InitializeProblem%0ABenders-%3EBenders%3AMatchProblemToId%0ABenders-%3EBenders%3ABuildMasterProblem()%0Aloop%20coupling_map%0ABenders-%3EBenders%3AAddSubproblem()%0ABenders-%3EBenders%3AAddSubproblem()%0Aend%0Aend%20%0Agroup%20Run%0Aloop%20CriterionNotReach%0ABenders-%3EBenders%3Asolve_master%0ABenders-%3EBenders%3Asolve_subproblems_and_build_cuts%0ABenders-%3EBenders%3Aupdate_best_solution%0Aend%0Aend%20%0ABenders-%3EBenders%3Apost_run_actions%0Aend%0Adestroyafter%20Benders%0Adestroyafter%20BendersFactrory + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + CPP Full run + + + + + + + LPNamer + + + + + + Benders + + + + + + + + + + + + + + + + + + + + + + + + Main + + + + + + + + ProblemGeneration + + + + + + + + WeightsFileReader + + + + + + + + YearlyWeightsWriter + + + + + + + + LpFilesExtractor + + + + + RunProblemGeneration() + + + + + + + + + ValidateMasterFormulation + + + + + + + + + ReadWeights() + + + + + + + + + :weights_vector + + + + + + + + + WriteActiveYears() + + + + + + + + + + + + + + + ExtractArea + + + + + + + + + ExtractInterco + + + + + + + + + ExtractTSNumbers + + + + + + + + + + + + GetLinks() + + + + + + + + + ReadConstraintsFile() + + + + + + + + + + + + + + ZipProblemsProviderAdapter + + + provideProblems() + + + + + + + + + List of Problem + + + + + + + + + + + + + + + + + LinkProblemsGenerator + + + + + + + + MPSFileWriter + + + + + + + + IProblemVariablesProviderPort + + + treat() + + + + + + + + + Provide() + + + + + + + + + ProblemVariables + + + + + + + + + + + + + + ProblemModifier + + + ChangeProblem() + + + + + + + + + Couplings[candidate_name, problem_name] + + + + + + + + + WriteProblem() + + + + + + + + + + + + + + + + + + + + + + + + master_generation() + + + + + + + + + + + + + + + + + BendersFactrory + + + RunBenders + + + + + + + + + + + + + + Benders + + + Launch() + + + + + + + + + get_master_variable_map() + + + + + + + + + GetCouplingMap() + + + + + + + + + MatchProblemToId + + + + + + + + + BuildMasterProblem() + + + + + + + + + AddSubproblem() + + + + + + + + + AddSubproblem() + + + + + + + + + solve_master + + + + + + + + + solve_subproblems_and_build_cuts + + + + + + + + + update_best_solution + + + + + + + + + post_run_actions + + + + + + + + + + + + + + + + + + ProcessWeight + + + + + + ExtractUtilsFiles + + + + + + getXpansionProblems + + + + + + loop + + + + [Par] + + + + + + loop + + + + [link] + + + + + + loop + + + + [candidates] + + + + + + build_input_map() + + + + + + InitializeProblem + + + + + + loop + + + + [coupling_map] + + + + + + Run + + + + + + loop + + + + [CriterionNotReach] + + + + + + + + + \ No newline at end of file diff --git a/conception/SequenceDiagrams/FullRunCPP/diagram.txt b/conception/SequenceDiagrams/FullRunCPP/diagram.txt new file mode 100644 index 000000000..47a5b0eb7 --- /dev/null +++ b/conception/SequenceDiagrams/FullRunCPP/diagram.txt @@ -0,0 +1,94 @@ +title CPP Full run +participant Main +participantgroup #lightblue LPNamer +participant ProblemGeneration +participant WeightsFileReader +participant YearlyWeightsWriter +participant LpFilesExtractor +participant LinkProblemsGenerator +participant ZipProblemsProviderAdapter +participant MPSFileWriter +participant IProblemVariablesProviderPort +participant ProblemModifier +end +Main->ProblemGeneration:RunProblemGeneration() +ProblemGeneration->ProblemGeneration:ValidateMasterFormulation +group ProcessWeight +ProblemGeneration->WeightsFileReader:ReadWeights() +WeightsFileReader->ProblemGeneration::weights_vector +ProblemGeneration->YearlyWeightsWriter:WriteActiveYears() +end +destroyafter WeightsFileReader +destroy YearlyWeightsWriter +group ExtractUtilsFiles +ProblemGeneration->LpFilesExtractor:ExtractArea +ProblemGeneration->LpFilesExtractor:ExtractInterco +ProblemGeneration->LpFilesExtractor:ExtractTSNumbers +end +destroyafter LpFilesExtractor +ProblemGeneration->ProblemGeneration:GetLinks() +ProblemGeneration->ProblemGeneration:ReadConstraintsFile() + + +group getXpansionProblems +create ZipProblemsProviderAdapter +ProblemGeneration->ZipProblemsProviderAdapter:provideProblems() +ZipProblemsProviderAdapter->ProblemGeneration:List of Problem +end +destroy ZipProblemsProviderAdapter + +create LinkProblemsGenerator +create MPSFileWriter +loop Par +create IProblemVariablesProviderPort +ProblemGeneration->LinkProblemsGenerator:treat() +LinkProblemsGenerator->IProblemVariablesProviderPort:Provide() +IProblemVariablesProviderPort->LinkProblemsGenerator:ProblemVariables +create ProblemModifier +LinkProblemsGenerator->ProblemModifier:ChangeProblem() +loop link +loop candidates +LinkProblemsGenerator->ProblemGeneration:Couplings[candidate_name, problem_name] +end +end +LinkProblemsGenerator->MPSFileWriter:WriteProblem() +destroyafter ProblemModifier +end +destroy IProblemVariablesProviderPort + + +destroy MPSFileWriter +destroy ZipProblemsProviderAdapter +destroy LinkProblemsGenerator + +ProblemGeneration->ProblemGeneration:master_generation() +destroyafter ProblemGeneration +///// +participantgroup #pink Benders +create BendersFactrory +Main->BendersFactrory:RunBenders +create Benders +BendersFactrory->Benders:Launch() +group build_input_map() +Benders->Benders:get_master_variable_map() +Benders->Benders:GetCouplingMap() +end +group InitializeProblem +Benders->Benders:MatchProblemToId +Benders->Benders:BuildMasterProblem() +loop coupling_map +Benders->Benders:AddSubproblem() +Benders->Benders:AddSubproblem() +end +end +group Run +loop CriterionNotReach +Benders->Benders:solve_master +Benders->Benders:solve_subproblems_and_build_cuts +Benders->Benders:update_best_solution +end +end +Benders->Benders:post_run_actions +end +destroyafter Benders +destroyafter BendersFactrory \ No newline at end of file