Package: cheche-pm
cheche_pm - Project Scheduling ToolkitA Python package for project scheduling, designed to simplify project management tasks.Table of ContentsInstallationUsageCreate projectfrom_csvCPMPriority ListScheduling methodsGenetic AlgorithmRisk AnalysisContributorLicenseInstallationTo installcheche_pm, you can use pip:pipinstallcheche_pmUsageTo use cheche_pm, import the Project class and start utilizing its methods. Here are some of the key methods provided by the package:Create projectcreates an empty project. Activities can be added manually.fromcheche_pmimportProjectp=p.Project()p.add_activity(activity_name='A',activity_duration=2,activity_precedence=[None],activity_resources=[2,4,5])p.add_activity(activity_name='B',activity_duration=3,activity_precedence=['A'],activity_resources=[3,7,8])p.add_activity(activity_name='C',activity_duration=4,activity_precedence=['B'],activity_resources=[3,2,2])p.add_activity(activity_name='D',activity_duration=3,activity_precedence=['A'],activity_resources=[4,5,6])Activities can be also deleted.p.delete_activity('D')Once the activities are created the user, can add the terminal dummy nodes. "Start" and "End" by using the following methods.p.add_dummies_create_project_network()from_csv or from_excelA project can be created from a .csv file or .xlsx file. Imagine that we have an MS EXCEL file with the data belowActivityDescriptionDurationPrecedenceCostBulbasaurCharizardSquirtleAF.House51000100BF.Pool22000100CWalls5A3500010DPool6B4500001ERoof5C2600010FWindows2C7000010GElectricity3C8000001HS.Panels2E1000001IPlumbing4F5600001JFinishings3H, I12000001A project can be created using the following methods:.csv filep=Project.from_csv(filename='data_project.csv',rcpsp_format=True,n_resources=3,max_resources=[1,1,1]).xlsx filep=Project.from_excel(filename='data_project.xlsx',rcpsp_format=True,n_resources=3,max_resources=[1,1,1])CPMThis method allows the generation of project schedule using the critical path methodp.CPM()the user can ask for the critical pathp.get_critical_path()priority_listThis method allows the user to generate a priority list from a given priority rule:LPT:Longest processing timeSPT:Shortest processing timeLIS:Least immediate successorsMIS:Most immediate successorLTS:Least total successorsMTS:Most total successorssEST:Smallest Earliest Start TimegEST:Greatest Earliest Start TimesEFT:Smallest Earliest Finish TimegEFT:Greatest Earliest Finish TimesLST:Smallest Latest Start TimegLST:Greatest Latest Start TimesLFT:Smallest Latest Finish TimegLFT:Greatest Latest Finish TimeMINF:Minimum floatMAXF:Maximum floatGRPW:Greatest GRPWLRPW:Lowest GRPWFCFS:First comes first servedLCFS:Last comes first servedGRD:Greatest resource demandLRD:Lowest resource demandGCRD:Greatest cumulative resource demandLCRD:Lowest cumulative resource demandThe user can ask for an individual priority list.PL=p.get_priority_list(priority_rule='FCFS',verbose=True,save=True)Scheduling_methodsOnce the user has a priority list it can decide to produce an schedule from it. The user can generate a serial schedule (SSG) or a parallel one (PSG)Serial (SSG)ssg=p.SSG(PL,max_resources=[1,1,1],verbose=False)Parallel (PSG)psg=p.PSG(PL,max_resources=[1,1,1],verbose=False)The user can also decide to run all priority list heuristics, and schedule each one via the two methods. This method will return the best schedule obtained.p.run_all_pl_heuristics()Visualizations of schedulesOnce an schedule is produced, the user can ask for a datetime schedule by providing the date for the project start.w_sche=p.generate_datetime_schedule(solution=ssg,start_date="2023-09-03",weekends_work=False,max_resources=[1,1,1],verbose=True)The user can then ask for a gantt chart of this datetime schedulep.plot_date_gantt(w_sche)The user can ask for the critical chain of this schedulep.get_critical_chain(ssg,max_resources=[1,1,1])The user can perform resource vistualizationsp.plot_resource_levels(ssg)p.RCPSP_plot(ssg,resource_id=0)Genetic_AlgorithmThe user can use the genetic algorithm optimization method to find the optimal schedule.p.genetic_algorithm_optimization(popSize=40,elite_percentage=0.2,crossover_rate=0.5,mutationRate=0.5,generations=100,show=True)Risk analysisThese methods offers a collection of monte carlo simulation methods, that can be used to evaluate project makespan uncertainty as well as the effectivenes of activity buffers.Simple Monte Carlo simulationp.monte_carlo_cpm_simple(optimistic=0.25,pessimistic=1)Detailed Monte Carlo simulationpessimistic={'A':7.5,'B':3.5,'C':7.5,'D':9,'E':7.5,'F':3,'G':4.5,'H':3,'I':6,'J':4.5}optimistic={'A':2.5,'B':1,'C':2.5,'D':3,'E':2.5,'F':1,'G':1.5,'H':1,'I':2,'J':1.5}p.monte_carlo_cpm_detailed(optimistic=optimistic,pessimistic=pessimistic,NumberIterations=1000)Buffer analysispessimistic={'A':7.5,'B':3.5,'C':7.5,'D':9,'E':7.5,'F':3,'G':4.5,'H':3,'I':6,'J':4.5}optimistic={'A':2.5,'B':1,'C':2.5,'D':3,'E':2.5,'F':1,'G':1.5,'H':1,'I':2,'J':1.5}buffer={'A':2,'C':2,'E':3,'H':2,'F':2,'I':1,'J':2}p.monte_carlo_detail_buffer_analysis(optimistic=optimistic,pessimistic=pessimistic,buffer=buffer,NumberIterations=2000)ContributorsAuthor:Luis Fernando Perez ArmasEmail:luisfernandopa1212@gmail.comLinkedIn:LinkedIn ProfileLicenseThis project is licensed under the MIT License - see the LICENSE file for details.MIT LicenseCopyright (c) 2023, Luis Fernando PÃ©rez ArmasPermission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.=======History=======0.1.0 (2023-09-03)First release on PyPI.+++++++++++++++++++0.1.4 (2023-09-04)+++++++++++++++++++0.1.5 (2023-09-04)+++++++++++++++++++0.1.6 (2023-09-29)+++++++++++++++++++0.1.7 (2023-09-29)BugfixesError with MTS,LTS, MIS and LIS priority rules fixed.Bug related to incorrect choosing of activities under the condition of a priority rule tie, was fixed.+++++++++++++++++++0.1.8 (2023-10-03)Weak forbidden set function addedMinimum forbidden set function addedSimple monte carlo buffer analysis addedPossibility to create a project from a .rcp file and from instances of the CV dataset+++++++++++++++++++0.1.9 (2023-10-03)Extra information added to the monte carlo buffer analysis methodsCritical Path Method returns a dataframe with the basic outputs ES,EF,LS,LF,F+++++++++++++++++++0.1.10 (2023-10-03)Bug fix with the monte carlo buffer analysis methods+++++++++++++++++++0.1.11 (2023-10-03)+++++++++++++++++++0.1.12 (2023-10-08)Feasible subset function addedFunction that calculate naive bounds for each activity, based on a time horizon+++++++++++++++++++0.1.13 (2023-10-08)Bug fix with the outputs of forbidden sets and feasible set.