Animal pricing
CLEM.Resources.AnimalPricing
Sets the pricing schedule for individuals.

Many activities require the current price of individuals to calculate value, sales and purchases. The pricing schedule is set using the Animal pricing component that holds a list of Animal price group components and one instance of this component is required for each Ruminant type that requires pricing in the Ruminant herd of the Resources. Prices are set in the resource type (e.g. Ruminant type) so that any activity can find and even modify prices throughout the simulation.
This component allows for detailed pricing rules to be applied to the herd and for this reason may take a bit of thought to set up, but you should find it easy enough for simple pricing. The Animal pricing component contains a list of Animal price group, each defining the purchase and sale price for a group of individuals. The individuals for the price group are set using filters (see Filtering and sorting individuals). When the price of an individual is required, CLEM steps through the price groups from the top of the list downward until it finds a filter that matches. This is the easiest way to test how well your pricing structure works. It is best to put the most specific groups at the top of the list and it is suggested youngest individuals.
Note: All values used in the following examples are for illustrative purposes only and may not reflect actual values.
Single price for all individuals
The simplest pricing structure involves a single price used for both purchases and sales of all individuals (such as $3 per kg live weight). For this example a single Animal price group (named "All" in this example) is added to the Animal Pricing component with no filters provided. This will apply this pricing to the entire population. You could add two such Animal price groups one for purchases and one for sales to apply different purchase and sales pricing to the herd.
Breeding sire purchase price
Often you will require specific pricing for certain individuals. This is best supplied at the top of the list to ensure it is used before applying another more general pricing groups that may also be applicable to the individual. In this example we want to define a special purchase price of $1000 each for breeding sires. To achieve this we add an additional Animal price group (named "Breeding bulls" in this example) at the top of the Animal Pricing component group list. For this price group we specify that pricing relates to purchases only (set to Buy) and the style is perHead rather than by weight. This Animal price group is then supplied with an Filter by property with the property set to "BreedingSire" and the value set to "True". This property is a special case only available for males and so any female will report false. If we were to try and sell a breeding sire, the first price group would not be considered as it is buy only and we would move to the second group provided, which would match our individual, and it would be sold at $3 per kg live weight.
Age based pricing.
In this example we present how you use the ordered list of Animal price group to set the pricing rules for age based pricing. In this example we start with the special Animal price group defining the purchase price of breeding sires. We next specify a Animal price group for weaners regardless of their gender. The Weaner property determines if an individual is weaned and less than 12 months old. We then move though a list of Animal price groups pricing females from oldest to youngest. Each of these four Animal price groups has a Filter by property with the Gender property set to "Female". As each group has an age specified by GreaterThansOrEqualTo and a set age in months, we catch every younger females as we move down the list with increasing price. We next specify the price of any male sold greater than or equal to 36 months old. The final Animal price group catches all unspecified individuals. This includes all males <36 months and females <30 months that aren't weaners and so includes a pricing for suckling calves. You may notice that the weaner Animal price group is the same as the All individuals Animal price group and so the "Weaner" group could be removed from this list without influencing the price structure.
Detailed specifications
It is possible to use multiple Filtering and sorting individuals to identify specific individuals. An example of this would be to provide special pricing for a particular group of individuals (e.g. Jap ox pricing) where a sale price is offered for individuals in a particular weight band at time of sale (e.g. 300-440kg). This example does not have any age or gender requirement, but these could be added to only include steers (males) under 2 years of age.

The following parameters are used to define this activity

The following components are required to set up this component

The Animal price group is a filtering group with parameters for sale and purchase prices. It requires filters and sorts to set the rules defining which individuals are included in its group.
See also