Examples
Examples of Constraints are listed below:

This example shows a Coal Constraint that allows for 1,000,000 units of Source Quantity per year.
Requires a Range called All and a Process called Coal.
-
Capacity Type: Manually Specified
-
Constraint Type: Source
-
Source Range: All
-
Processes: Coal
-
Equipment: Include All Equipment
-
Value: SourceQuantity
-
Capacities Start #1: 01/01/2021 12:00 AM
-
Capacities End #1: 01/01/2022 12:00 AM
-
Quantity #1: 1000000
-
Capacities Start #2: 01/01/2022 12:00 AM
-
Capacities End #2: 01/01/2023 12:00 AM
-
Quantity #2: 1000000
Copy and paste into the application:
<Constraint Name="Coal Constraint EXAMPLE" Class="CapacityConstraint" Active="true" Type="Source" CapacityConstraintType="ManuallySpecified" SourceRange="All" IncludeBlankDestinations="false" IncludeAllProcesses="false" IncludeAllEquipment="true" ValueExpression="SourceQuantity" CapacityField="Coal Constraint" AggregationLevel="Month" StartDateLimit="0001-01-01T00:00:00" EndDateLimit="0001-01-01T00:00:00"> <Processes> <Process Name="Coal" /> </Processes> <TimeCapacities> <TimeCapacity StartDateLimit="2021-01-01T00:00:00" EndDateLimit="2022-01-01T00:00:00" QuantityExpression="1000000" /> <TimeCapacity StartDateLimit="2022-01-01T00:00:00" EndDateLimit="2023-01-01T00:00:00" QuantityExpression="1000000" /> </TimeCapacities> </Constraint>

This example shows a Proximity Constraint that only allows one Equipment per Leaf.
Requires a Range called All.
-
Constraint Type: Source
-
Source Range: All
-
Processes: Include All Processes
-
Equipment: Include All Equipment
-
Grouping Expression: None
-
Value Expression: 1
-
Maximum Expression: 1
Copy and paste into the application:
<Constraint Name="Source Proximity Constraint EXAMPLE" Class="ProximityConstraint" Active="true" Type="Source" SourceRange="All" IncludeAllProcesses="true" IncludeAllEquipment="true" GroupingExpression="" ValueExpression="1" MaximumExpression="1" StartDateLimit="0001-01-01T00:00:00" EndDateLimit="0001-01-01T00:00:00"> </Constraint>

This example demonstrates a Proximity Constraint that allows either one big piece or two small pieces of Equipment per strip. It uses a Grouping Expression to group strips together and a Value Expression that changes depending on the Equipment (big or small).
This is unlikely to work without customisation and is designed only to provide an example of the Grouping and Value Expression syntax required.
-
Constraint Type: Source
-
Source Range: All
-
Processes: Include All Processes
-
Equipment: Include All Equipment
-
Grouping Expression: Text(SourcePit)+Text(SourceStrip)
-
Value Expression: If(Equipment=EquipmentBig,2,1)
-
Maximum Expression: 2
Copy and paste into the application:
<Constraint Name="Source Proximity Constraint Strip Complex EXAMPLE" Class="ProximityConstraint" Active="true" Type="Source" SourceRange="All" IncludeAllProcesses="true" IncludeAllEquipment="true" GroupingExpression="Text(SourcePit)+Text(SourceStrip)" ValueExpression="If(Equipment=EquipmentBig,2,1)" MaximumExpression="2" StartDateLimit="0001-01-01T00:00:00" EndDateLimit="0001-01-01T00:00:00"> </Constraint>

This example shows an Inventory Constaint that controls the amount of Coal that can be processed before a ROM Pad limit is hit. If the Coal Process pushes the Constraint to 50,000 then it will be unable to be worked until the Rom Processing Process removes some.
This is unlikely to work without some customisation.
-
Capacity Type: Manually Specified
-
Initial Value: 5000
-
Adding
-
Constraint Type: Source
-
Source Range: All
-
Processes: Coal
-
Equipment: All
-
Value: SourceQuantity
-
Removing
-
Constraint Type: Source
-
Source Range: All ◦Processes: Coal ◦Equipment: All
-
Value: SourceQuantity
-
Capacities
-
Start: Before Start
-
End: After End
-
Quantity: 50000
Copy and paste into the application:
<Constraint Name="New Inventory Constraint" Class="InventoryConstraint" Active="true" AddType="Source" RemoveType="Source" CapacityConstraintType="ManuallySpecified" InitialValueExpression="5000" AddingSourceRange="All" RemovingSourceRange="All" AddIncludeAllProcesses="false" RemoveIncludeAllProcesses="false" AddIncludeAllEquipment="true" RemoveIncludeAllEquipment="true" ConstraintAddValueExpression="SourceQuantity" RemoveValueExpression="SourceQuantity" StartDateLimit="0001-01-01T00:00:00" EndDateLimit="0001-01-01T00:00:00"> <AddProcesses> <Process Name="Coal" /> </AddProcesses> <RemoveProcesses> <Process Name="Rom Processing" /> </RemoveProcesses> <AddEquipmentSet /> <RemoveEquipmentSet /> <TimeCapacities> <TimeCapacity StartDateLimit="2022-08-14T00:00:00" EndDateLimit="2023-08-14T00:00:00" QuantityExpression="50000" /> </TimeCapacities> </Constraint>