When it comes to production planning, a full use of the available capacity is a key objective. A typical production process requires a multi machine routing, and typically there are different machine types with multiple machines per machine group. Hence the planner, while scheduling production orders at the various machines, faces the challenge of avoiding idling machines taking into account the different machine capacities. Here an intelligent Gantt chart provides valuable assistance to the planner and ideally should offer the following functions:
a) Provide a clear overview of the machines and the scheduled production orders.
b) Support the planner in shifting the orders by automatically arranging them seamlessly and in chronological order so that they will be worked off at the machines without a break.
c) Take into consideration different machine capacities while orders are being shifted.
This blog post is one of a series of Gantt best practice samples and presents an application having been developed with the Java Gantt component VARCHART JGantt and exactly meeting the above mentionend demands. It also provides concrete guidance for Java developers how to achieve the described functionality.
The Gantt chart aiming at full use of the capacity of a machine pool has to fulfill complex requirements in terms of functionality:
- Drag&drop functionality: Orders are shifted horizontally and vertically.
- Marking: Not only selected tasks but also the possible shifting positions during mouse interactions are highlighted.
- Automatical moving: The start-end data of the succeeding orders are re-scheduled and applied automatically .
- Taking into account the machine capacity: The length of the node changes in dependence of the machine capacity.
- Stopping interactions: Started orders cant't be moved any more.
Watch Gantt chart live
See how all these functions are combined in one Gantt chart:
How-to in VARCHART JGantt
# 1 Marking the node:
An inner rectangle with thick line marks the node.
jGantt1.getGanttGraph().setNodeMarkLineStyle(new NeLineStyle(Color.red, 100, 1));
# 2 Special phantom nodes for visualizing the new position
The node that is to be moved will be marked in the OnPhantomModify event and the phantom node (indicates the place where the node will be inserted) will be made visible (the self-written filter for the layer definition of the node phantom accesses an instance variable of the main class.).
# 3 Recalculating the node order and adapting the layer length to capacity
The recalculaton of the node order will be carried out in the objectModified-Event. For this, each node has an attribute containing its group index. On dropping (or also when the node is deleted, e.g.) the index will be recalculated. The node order of a group, the node duration and the machine capacity are the factors for calculating the chronological order of all nodes.
# 4 Preventing a node currently being processed from being moved
The node that is to be moved will be marked in the OnPhantomModify event and the node phantom (indicates the place where the node will be inserted) will be made visible (the self-written filter for the layer definition of the node phantom accesses an instance variable of the main class.).
At the same time, a NeVetoException will be thrown if the node to be moved is already being processed and so moving the node will be prevented.
Your next steps
Contact us if you have any questions about this sample application - we will be glad to answer them.
See also our blog post about key features an industry-proof Java Gantt Control should offer.If you want to test our Java Gantt component, you are welcome to download a trial version of VARCHART JGantt valid 30 days. This includes free support as well.