Dispatch

Revision as of 03:50, 3 April 2010 by Lchrisman (talk | contribs)

New to Analytica 4.3

Dispatch( demand, capacity, Resource, active, minimum, increment)

Allocates capacity from a set of resources to satisfy a demand, consuming capacity from the first resources in the order they appear in the «Resources» index. «Demand» is the amount of demand that is to be filled . «Capacity» is an array indexed by the «Resource» index, with the amount of capacity provided by each resource. The optional «active» flag, if specified, is also indexed by «Resource» and is true when the indicated «Resource» can be used to fill the demand, false if it cannot be applied to the demand.

The result is an array indexed by «Resource», containing for each resource the amount of the available capacity consumed in order to fulfill the demand. The sum of the elements in the result will equal «demand» provided that there is sufficient capacity to fulfill the demand. All the non-zero elements in the result, except for the final non-zero element, will equal the corresponding value in «capacity». The last non-zero element in the result will usually be less than the available capacity, since only the amount of that last resource required to fill the last part of the demand is consumed, leaving the remaining part available.

The optional «minimum» or «increment» parameters, which may also be indexed by «Resource», specify that the given resources must be dispatched in fixed increments, with at least «minimum» capacity dispatched. When «increment» is specified, partial increments are not allowed. When the same value is passed to «capacity» and «increment» (or «minimum»), then Resources must be allocated fully or not at all. Null or zero values in «increment» (or «minimum») for specific projects specify that no increment (or minimum) applies. Preceding resources take precedence, so the amount of remaining demand carried forward is only the demand that could not be allocated to the previous resource, either because there wasn't enough to meet the «minimum», was more than «capacity», or wasn't enough to complete an «increment». Even if «minimum» is not a multiple of «increment», the result will always be a multiple of «increment».

Example Uses

Electrical power dispatch

A certain region has a set of electrical power plants (the Resources). Each power plant has a maximum amount of power that it can supply (its capacity), and supplies its power at a given marginal cost per KWh. The region must satisfy a certain known electric power demand, dispatching first from those plants with the lowest marginal cost. Plants have already been sorted by ascending marginal cost, then Dispatch is used to compute how much power to utilize from each plant.

Dispatch( Demand, Plant_Capacity, Plants )

In a variation on this problem, the region is divided into counties. Each county has its own demand (so Demand_by_county is indexed by County), and each county can only consume power from plants located in that county. Plant_county is indexed by Plant and evaluates to the county that the Plant is located in.

Dispatch( Demand_by_county, Plant_Capacity, Plants, active: Plant_County=County )

Investment Allocation

An investor creates a model that ranks possible investment by quality (perhaps MIrr, for example). He has a fixed budget to invest, and has limits on the maximum amount that can be allocated to any given investment (the maximum varies by investment). He's already sorted his investments by ascending quality. He uses Dispatch to determine how much money to place in each investment.

Dispatch( investment_amount, allocation_maximum, Investments )

Project Budgeting

A company has a set of potential projects, sorted by expected ROI. They have a fixed budget to invest. Each project undertaken must be funded at a minimum level, or not at all. However, once funded, a project with a better ROI should receive as much funding as possible, up to the full project_cost.

Dispatch( Budget, Project_cost, Project, minimum:Project_minimum )

See Also

Comments


You are not allowed to post comments.