{ Analytica Model Seq_Dispatch_Library, encoding="UTF-8" } SoftwareVersion 5.3.3 LinkLibrary Seq_Dispatch_Library Title: Sequential dispatch library Description: This library contains the function SequentialDispatch, which generalizes the Dispatch function by adding time-like index, over which unmet demand and/or unallocated capacity can be carried over to the next time period. Author: Lonnie Chrisman, Ph.D.~ Lumina Decision Systems NodeSize: 56,32 WindState: 2,658,86,720,350 FontStyle: Arial,15 FileInfo: 0,LinkLibrary Seq_Dispatch_Library,2,2,0,0,Sequential dispatch library.ana Function SequentialDispatch(demand : NonNegative OrNull [ T ] ;~ capacity : NonNegative OrNull [Resource, T] ;~ Resource : recommended WarnDynamic Index,~ T : Index,~ active : optional boolean[Resource,T] ; ~ minimum : optional named NonNegative[Resource,T] ; ~ increment : optional named NonNegative[Resource,T] ; ~ method : optional named atom number,~ rolloverDemand : optional boolean atom,~ rolloverCapacity : optional boolean atom~ ) Description: This function generalizes the Dispatch( ) function by adding a time-like index, «T», with the feature that either unsatisfied «demand» or unallocated «capacity» in each time period rolls over to the next time period. The optional flags «rolloverDemand» and «rolloverCapacity» determine whether these roll over. If neither is specified, then only demand is carried over. Definition: if IsNotSpecified(rolloverDemand) and IsNotSpecified(rolloverCapacity) then ~ rolloverDemand:=true;~ ~ Local cap := 0;~ Local dem:=0;~ ~ For ti[] := T, d_t[]:=demand, c_t[Resource]:=capacity,~ actv_t[Resource]:=active, min_t[Resource]:=minimum, ~ inc_t[Resource]:=increment Do~ (~ cap := cap + c_t;~ dem := dem + d_t;~ ~ Local alloc := Dispatch( dem, cap, Resource, actv_t, min_t, inc_t, method );~ ~ cap := if rolloverCapacity then cap-alloc else 0;~ dem := if rolloverDemand then dem-sum(alloc,Resource) else 0;~ ~ alloc~ ) NodeLocation: 128,48,1 NodeSize: 80,24 WindState: 2,323,5,1068,695 Close Seq_Dispatch_Library