Package org.libreplan.business.common

Examples of org.libreplan.business.common.ProportionalDistributor$FractionWithPosition


        AllocationInterval interval = new AllocationInterval(
                getIntraDayStartDate(), end);

        List<DayAssignment> nonConsolidatedAssignments = interval
                .getNoConsolidatedAssignmentsOnInterval();
        ProportionalDistributor distributor = ProportionalDistributor
                .create(asSeconds(nonConsolidatedAssignments));

        EffortDuration[] effortsPerDay = asEfforts(distributor
                .distribute(effortForNotConsolidatedPart.getSeconds()));
        allocateTheWholeAllocation(
                interval,
                assignmentsForEfforts(nonConsolidatedAssignments, effortsPerDay));
    }
View Full Code Here


            }
            return cannotSatisfy;
        }

        private List<EffortDuration> divideEffort(EffortDuration toBeDivided) {
            ProportionalDistributor distributor = ProportionalDistributor
                    .create(createShares());
            int[] secondsDivided = distributor.distribute(toBeDivided
                    .getSeconds());
            return asDurations(secondsDivided);
        }
View Full Code Here

    }

    public static ResourcesPerDayDistributor distributor(
            ResourcesPerDay... resourcesPerDay) {
        ProportionalDistributor distributor = ProportionalDistributor
                .create(asInts(resourcesPerDay));
        return new ResourcesPerDayDistributor(distributor);
    }
View Full Code Here

        };
    }

    private void activatingRecommendedAllocation() {
        allocationRowsHandler.removeAll();
        ProportionalDistributor distributor = resourceAllocationModel
                .addDefaultAllocations();
        boolean recommendAllocationSuccessful = distributor != null;
        if (recommendAllocationSuccessful) {
            hoursDistributorForRecommendedAllocation = distributor;
            resourcesPerDayDistributorForRecommendedAllocation = ResourcesPerDay
View Full Code Here

TOP

Related Classes of org.libreplan.business.common.ProportionalDistributor$FractionWithPosition

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.