Design Goals

We intend for the library to be:

  • Easy to use and configure
  • Extensible
  • Modular
  • Fast

NOTE: POM does not replace the base Preactor API. You can use both in the same project. You can switch from POM to the Preactor API very easily.

Who is this for?

Mainly developers programming against the Preactor API (Preactor APS 400 and above)

What does it do?

POM allows you to interact with Preactor data in an Object Oriented manner. For example you will be able to write code like this:

Operation op = pom.GetOperation(3); // This will return an operation object corresponding to record number 3 in he Orders table

if(op.IsScheduled)
{
    Console.Writeline("Operation 3 is scheduled on resource {0}", op.ResourceName);
}

// It is simple to query the operation for data with:
var startTime  = op.StartTime;
var endTime = op.EndTime;
var productName = op.ProductName;

// Setting values is also simple
op.EarliestStartTime = new DateTime(...);
op.Priority = 100;

// You can also Schedule or Unschedule 
op.Unschedule(); 
op.Schedule("Resource1", new DateTime(...));

// Or you can also use the QuickSchedule() method and pom will look at the resource group
// and find the resource that will complete the operation the fastest
op.QuickSchedule(new DateTime(...));

// You can also use LINQ to object to get the data you need. For example:
// Find all the operations that are not scheduled but have a required resouce equal to ABC, and the sort them by priority, and then by due date
var ops = pom.GetAllOperations().Where(op => !op.IsScheduled)
                                .Where(op => op.RequiredResource == "ABC")
                                .OrderBy(op => op.Priority)
                                .ThenBy(op => op.DueDate);

// You can then schedule all these operations like this:
ops.Foreach(op => op.QuickSchedule(TerminatorTime));
// You can also do the same for Products, Resources, ResourceGroups, Secondary Constraints

Product prod = pom.GetProduct(5);
Resource res = pom.GetResource(12);
ResourceGroup resGroup = pom.GetResourceGroup(2);
SecondaryConstraint sc = pom.GetSecondaryConstraint(7);

// You can also get all the the resource names associated with a given resource group

var resourceNames = resGroup.ResourceNames;

// Or retrieve an IEnumerable of Resource objects

var resources = resGroup.Resources; // resources.ToList() will return a List<Resource>

As you can see you are able to query for information and manipulate Preactor data which ever way you like.

Last edited Aug 24, 2012 at 2:41 AM by mtravan, version 2

Comments

No comments yet.