任务/活动优先级/依赖性

发布于 2024-09-08 22:42:49 字数 433 浏览 1 评论 0原文

我正在寻找一些基于 .net 的库/代码来实现任务/活动调度,例如在以下情况下的 Microsoft 项目调度...

  1. 完成到开始
  2. 完成到完成
  3. 开始到完成
  4. 开始到开始

请参阅了解我所处的上下文谈论... 关于链接任务 @ http://office.microsoft.com/en-us/project-help/link-tasks-within-your-project-HA010364282.aspx?CTT=1

i am looking for some .net based library/piece of code to implement task/activity scheduling like microsoft project scheduling in following cases...

  1. Finish to Start
  2. Finish to Finish
  3. Start to Finish
  4. Start to Start

please refer to understand in which context i am talking about...
About linking tasks @ http://office.microsoft.com/en-us/project-help/link-tasks-within-your-project-HA010364282.aspx?CTT=1

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

年华零落成诗 2024-09-15 22:42:49

您正在谈论 CPM - 关键路径方法。

评估每个条件类型(完成到开始,...)是一个简单的 Select - Case 。

您需要评估较早的日期,然后评估较晚的日期。这决定了关键路径。

如果您的算法包括针对某些任务的 ASAP - ALAP,您可以评估计划日期附加通道。

我对每个通道使用递归算法(早期日期、最新日期......)。这会发现条件循环并显示它们(任务 1 -> 任务 2 -> 任务 1)。

CPM 最复杂的任务是日历管理。
不过,该函数

Date1 = Calendar.Eval_DateFinish(Start, Duration)

成为基于资源日历间隔的函数。

这是我的早期约会功能。

Private Sub cpm_fmte(ByVal n As Int32)
    Dim a = Actividades(n), fi, f As FechaCpm, ncit As Integer = 0
    fi.value = Integer.MinValue
    Dim cal As Calend = a.Cal, dur As Integer = a.dur
    sw(n) = 255 : RaBucle.Add(a) 'Marco la actividad para detectar bucle condicionantes  

    For Each c In a.Predecesoras   '/* calcular predecesoras */                                
        If c._Act >= nHitos Then
           If c._Act < nTResumen Then Continue For
           Select Case sw(c._Act)
               Case 0 : cpm_fmte(c._Act)
               Case 255 : ShowBucle(c._Act) : Throw New Exception("Cpm_ftme: Error - Bucle Condicionantes")
              'case Else - 1 - Ya calculada anteriormente
           End Select
        End If

        Dim Pred = Actividades(c._Act)
        Select Case c.Tipo
            Case "D"c : f.value = Pred.ffmte.value + c.Demora
            Case "I"c : f.value = Pred.fimte.value + c.Demora : ncit += 1
            Case "T"c : f = cal.Calc_Fi(Pred.ffmte + c.Demora, dur) : ncit += 1
            Case Else : Throw New Exception(String.Format("Error condic.: {0} {1} {2} {3} {4}", _
                              a.Id, c.Tipo, Pred.Id, c.Demora))
        End Select
        If f > fi Then fi = f
    Next
    RaBucle.Count -= 1

    If fi.value = Integer.MinValue Then fi = Proyecto.Actprj.FechaPrj
    If dur > 0 Then fi = cal.Fecha_Jla_Av(fi)
    a.fimte.value = fi.value : a.ffmte = cal.Calc_Ff(fi, dur)
    a.Fip = a.fimte : a.Ffp = a.ffmte
    If a.ffmte.value > Fmax.value Then mfmax.value = a.ffmte.value
    If a.fimte.value < Fmin.value Then mFmin.value = a.fimte.value

    sw(n) = 1 'Actividad calculada
End Sub

笔记。那么我是西班牙人:

  • Fmte ->早期日期 (Fechas más Tempranas), Fmta ->最新日期,Fp - 已安排。
  • Fi->开始日期 (Fecha Inicio), FF - >完成日期 (Fecha Fín)
  • Actividades - 任务
  • “D”c -> (完成 - 开始),“Después”,
  • “I”c -> (开始 - 开始)“Inician...”
  • “T”c -> (完成 - 完成)“Terminan ...”
  • 从未使用过开始 - 完成条件。

我使用 FechaCpm 类型(结构),其评估为 Int32 类型(FechaCpm.Value)并解释为分钟时间间隔单位。

您可以在 SourceForge 上获取更多 CPM 代码,但我从未在 Net 上找到任何代码。
您可以看到“Open WorkBench”- Java 或“Planner”- C++。

我的代码是基于 CPM 的,大多数 Planification 程序都是基于支持 CPM 的资源。
我只使用一种资源(人力资源),那么日历是一个任务属性。

You are talking about CPM - Critical Path Method.

Eval each Condition Type (Finish to Start , ....) is a simple Select - Case .

You need eval early Dates then later dates. This determines the Critical Path.

If your algoritm includes ASAP - ALAP for some tasks, you can eval Scheduled Dates aditional pass.

I use Recursive algorhitm for each Pass (Early Dates, Latest Dates ...). This discover Condition Loop and Show them (Task1 -> Task2 -> Task1).

The most compless task for CPM is the calendar management.
Nothe that the function

Date1 = Calendar.Eval_DateFinish(Start, Duration)

Becomes a Function based on Resources calendar Intervals.

Here my Function for Ealy Dates.

Private Sub cpm_fmte(ByVal n As Int32)
    Dim a = Actividades(n), fi, f As FechaCpm, ncit As Integer = 0
    fi.value = Integer.MinValue
    Dim cal As Calend = a.Cal, dur As Integer = a.dur
    sw(n) = 255 : RaBucle.Add(a) 'Marco la actividad para detectar bucle condicionantes  

    For Each c In a.Predecesoras   '/* calcular predecesoras */                                
        If c._Act >= nHitos Then
           If c._Act < nTResumen Then Continue For
           Select Case sw(c._Act)
               Case 0 : cpm_fmte(c._Act)
               Case 255 : ShowBucle(c._Act) : Throw New Exception("Cpm_ftme: Error - Bucle Condicionantes")
              'case Else - 1 - Ya calculada anteriormente
           End Select
        End If

        Dim Pred = Actividades(c._Act)
        Select Case c.Tipo
            Case "D"c : f.value = Pred.ffmte.value + c.Demora
            Case "I"c : f.value = Pred.fimte.value + c.Demora : ncit += 1
            Case "T"c : f = cal.Calc_Fi(Pred.ffmte + c.Demora, dur) : ncit += 1
            Case Else : Throw New Exception(String.Format("Error condic.: {0} {1} {2} {3} {4}", _
                              a.Id, c.Tipo, Pred.Id, c.Demora))
        End Select
        If f > fi Then fi = f
    Next
    RaBucle.Count -= 1

    If fi.value = Integer.MinValue Then fi = Proyecto.Actprj.FechaPrj
    If dur > 0 Then fi = cal.Fecha_Jla_Av(fi)
    a.fimte.value = fi.value : a.ffmte = cal.Calc_Ff(fi, dur)
    a.Fip = a.fimte : a.Ffp = a.ffmte
    If a.ffmte.value > Fmax.value Then mfmax.value = a.ffmte.value
    If a.fimte.value < Fmin.value Then mFmin.value = a.fimte.value

    sw(n) = 1 'Actividad calculada
End Sub

Notes. I'am Spanish then :

  • Fmte -> Early Dates (Fechas más Tempranas), Fmta -> Latest Dates, Fp - Schedulded.
  • Fi -> Start Date (Fecha Inicio), FF - > Finish Date (Fecha Fín)
  • Actividades - Tasks
  • "D"c -> (Finish - start), "Después",
  • "I"c -> (Start - Start) "Inician..."
  • "T"c -> (Finish - Finish) "Terminan ..."
  • Never used Start - Finish condition.

I use FechaCpm type (structure) that evals as Int32 type (FechaCpm.Value) and interprets as minute time interval unit.

You can get more code for CPM on SourceForge, but I never find any code on Net.
You can see "Open WorkBench" - Java or "Planner" - C++.

My code is CPM based, most Planification programs are resources based supporting CPM.
I use only one resource (Human resource) then Calendar is a Task property.

空城缀染半城烟沙 2024-09-15 22:42:49

如果你想调度应用程序、任务、活动,你可以编写一个Windows服务

You can write a Windows Service, if you want to make scheduling applications,tasks,activities

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文