Examples of SalsaTrajectoryException


Examples of fr.soleil.salsa.exception.SalsaTrajectoryException

        double e0 = trajectoryK.getE0();
        double edgeWidth = trajectoryK.getE2() - trajectoryK.getE1();
        double kMax = trajectoryK.getKMax();

        if (deltaK == 0) {
            throw new SalsaTrajectoryException("Kdelta can't be equals to 0");
        }

        final double constant1 = 0.26246845;

        ArrayList<Double> kGrid = new ArrayList<Double>();
View Full Code Here

Examples of fr.soleil.salsa.exception.SalsaTrajectoryException

        System.out.println("e2=" + e2);
        System.out.println("kMax=" + kMax);
        */
        // Check condition
        if (kDelta == 0) {
            throw new SalsaTrajectoryException("Kdelta can't be equals to 0");
        }
        if (eDeltaPreEdge == 0) {
            throw new SalsaTrajectoryException("EDeltaPreEdge can't be equals to 0");
        }
        if (e0 == 0) {
            throw new SalsaTrajectoryException("e0 can't be equals to 0");
        }
        if (eDeltaEdge == 0) {
            throw new SalsaTrajectoryException("EDeltaEdge can't be equals to 0");
        }
        if (eMin > e1) {
            throw new SalsaTrajectoryException("eMin can't be greater than e1");
        }
        if (e1 > e2) {
            throw new SalsaTrajectoryException("e1 can't be greater than e2");
        }
        if (eDeltaEdge > eDeltaPreEdge) {
            throw new SalsaTrajectoryException("EDeltaEdge can't be greater than EDeltaPreEdge");
        }

        ArrayList<Double> eGrid = new ArrayList<Double>();

        // The value of the trajectory
        double point = 0;

        // The index where begin the decrementation of the step
        // If m = 0 there is no decrementation

        double transitionStep = 0;
        if (m > 0) {
            transitionStep = (eDeltaPreEdge - eDeltaEdge) / m;
        }

        point = e1;

        double[] transitionValues = new double[m];
        double newStep = 0;

        for (int i = 0; i < transitionValues.length; i++) {
            if (transitionStep < 1) {
                newStep = (i + 1) * transitionStep;
            }
            else {
                newStep = (transitionValues.length - i) * transitionStep;
            }
            // System.out.println("newStep=" + newStep);
            point = point - newStep;
            transitionValues[transitionValues.length - i - 1] = point;
        }

        // System.out.println("lastpoint 1 =" + point);

        // PreEdge region From Emin to E1
        double preEdgeWidth = point - eMin;
        int preEdgeNbStep = Double.valueOf(preEdgeWidth / eDeltaPreEdge).intValue();
        nbStepPreEdge = preEdgeNbStep + m;

        // System.out.println("preEdgeNbStep =" + preEdgeNbStep);

        for (int i = 0; i < preEdgeNbStep; i++) {
            point = eMin + i * eDeltaPreEdge;
            eGrid.add(point);
        }

        for (double transitionValue : transitionValues) {
            eGrid.add(transitionValue);
        }

        // Edge region From E1 to E2
        double edgeWidth = e2 - e1;
        int edgeNbStep = Double.valueOf(edgeWidth / eDeltaEdge).intValue();
        // System.out.println("edgeNbStep=" + edgeNbStep);
        nbStepEdge = edgeNbStep;
        for (int i = 0; i < edgeNbStep; i++) {
            point = e1 + i * eDeltaEdge;
            eGrid.add(point);
        }

        // Post Edge region E2 to KMAX
        // Edge region From E1 to E2
        double kMin = convertEnergyToK(e0, e2, 1000);
        if (kMin > kMax) {
            throw new SalsaTrajectoryException("kMax can't be smaller than " + kMin);
        }

        double kWidth = kMax - kMin;

        int postEdgeNbStep = Double.valueOf(kWidth / kDelta).intValue();
        if (postEdgeNbStep == 0) {
            throw new SalsaTrajectoryException("kDelta can't be greater than " + kWidth);
        }

        double kValue = 0;
        // System.out.println("postEdgeNbStep=" + postEdgeNbStep);
        nbStepPostEdge = postEdgeNbStep;
View Full Code Here

Examples of fr.soleil.salsa.exception.SalsaTrajectoryException

        double e0 = trajectoryK.getE0();
        double edgeWidth = trajectoryK.getE2() - trajectoryK.getE1();
        double kMax = trajectoryK.getKMax();

        if (deltaK == 0) {
            throw new SalsaTrajectoryException("Kdelta can't be equals to 0");
        }

        final double constant1 = 0.26246845;

        ArrayList<Double> kGrid = new ArrayList<Double>();
View Full Code Here

Examples of fr.soleil.salsa.exception.SalsaTrajectoryException

        System.out.println("e2=" + e2);
        System.out.println("kMax=" + kMax);
        */
        // Check condition
        if (kDelta == 0) {
            throw new SalsaTrajectoryException("Kdelta can't be equals to 0");
        }
        if (eDeltaPreEdge == 0) {
            throw new SalsaTrajectoryException("EDeltaPreEdge can't be equals to 0");
        }
        if (e0 == 0) {
            throw new SalsaTrajectoryException("e0 can't be equals to 0");
        }
        if (eDeltaEdge == 0) {
            throw new SalsaTrajectoryException("EDeltaEdge can't be equals to 0");
        }
        if (eMin > e1) {
            throw new SalsaTrajectoryException("eMin can't be greater than e1");
        }
        if (e1 > e2) {
            throw new SalsaTrajectoryException("e1 can't be greater than e2");
        }
        if (eDeltaEdge > eDeltaPreEdge) {
            throw new SalsaTrajectoryException("EDeltaEdge can't be greater than EDeltaPreEdge");
        }

        ArrayList<Double> eGrid = new ArrayList<Double>();

        // The value of the trajectory
        double point = 0;

        // The index where begin the decrementation of the step
        // If m = 0 there is no decrementation

        double transitionStep = 0;
        if (m > 0) {
            transitionStep = (eDeltaPreEdge - eDeltaEdge) / m;
        }

        point = e1;

        double[] transitionValues = new double[m];
        double newStep = 0;

        for (int i = 0; i < transitionValues.length; i++) {
            if (transitionStep < 1) {
                newStep = (i + 1) * transitionStep;
            }
            else {
                newStep = (transitionValues.length - i) * transitionStep;
            }
            // System.out.println("newStep=" + newStep);
            point = point - newStep;
            transitionValues[transitionValues.length - i - 1] = point;
        }

        // System.out.println("lastpoint 1 =" + point);

        // PreEdge region From Emin to E1
        double preEdgeWidth = point - eMin;
        int preEdgeNbStep = Double.valueOf(preEdgeWidth / eDeltaPreEdge).intValue();
        nbStepPreEdge = preEdgeNbStep + m;

        // System.out.println("preEdgeNbStep =" + preEdgeNbStep);

        for (int i = 0; i < preEdgeNbStep; i++) {
            point = eMin + i * eDeltaPreEdge;
            eGrid.add(point);
        }

        for (double transitionValue : transitionValues) {
            eGrid.add(transitionValue);
        }

        // Edge region From E1 to E2
        double edgeWidth = e2 - e1;
        int edgeNbStep = Double.valueOf(edgeWidth / eDeltaEdge).intValue();
        // System.out.println("edgeNbStep=" + edgeNbStep);
        nbStepEdge = edgeNbStep;
        for (int i = 0; i < edgeNbStep; i++) {
            point = e1 + i * eDeltaEdge;
            eGrid.add(point);
        }

        // Post Edge region E2 to KMAX
        // Edge region From E1 to E2
        double kMin = convertEnergyToK(e0, e2, 1000);
        if (kMin > kMax) {
            throw new SalsaTrajectoryException("kMax can't be smaller than " + kMin);
        }

        double kWidth = kMax - kMin;

        int postEdgeNbStep = Double.valueOf(kWidth / kDelta).intValue();
        if (postEdgeNbStep == 0) {
            throw new SalsaTrajectoryException("kDelta can't be greater than " + kWidth);
        }

        double kValue = 0;
        // System.out.println("postEdgeNbStep=" + postEdgeNbStep);
        nbStepPostEdge = postEdgeNbStep;
View Full Code Here

Examples of fr.soleil.salsa.exception.SalsaTrajectoryException

        System.out.println("e2=" + e2);
        System.out.println("kMax=" + kMax);
        */
        // Check condition
        if (kDelta == 0) {
            throw new SalsaTrajectoryException("Kdelta can't be equals to 0");
        }
        if (eDeltaPreEdge == 0) {
            throw new SalsaTrajectoryException("EDeltaPreEdge can't be equals to 0");
        }
        if (e0 == 0) {
            throw new SalsaTrajectoryException("e0 can't be equals to 0");
        }
        if (eDeltaEdge == 0) {
            throw new SalsaTrajectoryException("EDeltaEdge can't be equals to 0");
        }
        if (eMin > e1) {
            throw new SalsaTrajectoryException("eMin can't be greater than e1");
        }
        if (e1 > e2) {
            throw new SalsaTrajectoryException("e1 can't be greater than e2");
        }
        if (eDeltaEdge > eDeltaPreEdge) {
            throw new SalsaTrajectoryException("EDeltaEdge can't be greater than EDeltaPreEdge");
        }

        ArrayList<Double> eGrid = new ArrayList<Double>();

        // The value of the trajectory
        double point = 0;

        // The index where begin the decrementation of the step
        // If m = 0 there is no decrementation

        double transitionStep = 0;
        if (m > 0) {
            transitionStep = (eDeltaPreEdge - eDeltaEdge) / m;
        }

        point = e1;

        double[] transitionValues = new double[m];
        double newStep = 0;

        for (int i = 0; i < transitionValues.length; i++) {
            if (transitionStep < 1) {
                newStep = (i + 1) * transitionStep;
            }
            else {
                newStep = (transitionValues.length - i) * transitionStep;
            }
            // System.out.println("newStep=" + newStep);
            point = point - newStep;
            transitionValues[transitionValues.length - i - 1] = point;
        }

        // System.out.println("lastpoint 1 =" + point);

        // PreEdge region From Emin to E1
        double preEdgeWidth = point - eMin;
        int preEdgeNbStep = Double.valueOf(preEdgeWidth / eDeltaPreEdge).intValue();
        nbStepPreEdge = preEdgeNbStep + m;

        // System.out.println("preEdgeNbStep =" + preEdgeNbStep);

        for (int i = 0; i < preEdgeNbStep; i++) {
            point = eMin + i * eDeltaPreEdge;
            eGrid.add(point);
        }

        for (double transitionValue : transitionValues) {
            eGrid.add(transitionValue);
        }

        // Edge region From E1 to E2
        double edgeWidth = e2 - e1;
        int edgeNbStep = Double.valueOf(edgeWidth / eDeltaEdge).intValue();
        // System.out.println("edgeNbStep=" + edgeNbStep);
        nbStepEdge = edgeNbStep;
        for (int i = 0; i < edgeNbStep; i++) {
            point = e1 + i * eDeltaEdge;
            eGrid.add(point);
        }

        // Post Edge region E2 to KMAX
        // Edge region From E1 to E2
        double kMin = convertEnergyToK(e0, e2, 1000);
        if (kMin > kMax) {
            throw new SalsaTrajectoryException("kMax can't be smaller than " + kMin);
        }

        double kWidth = kMax - kMin;

        int postEdgeNbStep = Double.valueOf(kWidth / kDelta).intValue();
        if (postEdgeNbStep == 0) {
            throw new SalsaTrajectoryException("kDelta can't be greater than " + kWidth);
        }

        double kValue = 0;
        // System.out.println("postEdgeNbStep=" + postEdgeNbStep);
        nbStepPostEdge = postEdgeNbStep;
View Full Code Here

Examples of fr.soleil.salsa.exception.SalsaTrajectoryException

        System.out.println("e2=" + e2);
        System.out.println("kMax=" + kMax);
        */
        // Check condition
        if (kDelta == 0) {
            throw new SalsaTrajectoryException("Kdelta can't be equals to 0");
        }
        if (eDeltaPreEdge == 0) {
            throw new SalsaTrajectoryException("EDeltaPreEdge can't be equals to 0");
        }
        if (e0 == 0) {
            throw new SalsaTrajectoryException("e0 can't be equals to 0");
        }
        if (eDeltaEdge == 0) {
            throw new SalsaTrajectoryException("EDeltaEdge can't be equals to 0");
        }
        if (eMin > e1) {
            throw new SalsaTrajectoryException("eMin can't be greater than e1");
        }
        if (e1 > e2) {
            throw new SalsaTrajectoryException("e1 can't be greater than e2");
        }
        if (eDeltaEdge > eDeltaPreEdge) {
            throw new SalsaTrajectoryException("EDeltaEdge can't be greater than EDeltaPreEdge");
        }

        ArrayList<Double> eGrid = new ArrayList<Double>();

        // The value of the trajectory
        double point = 0;

        // The index where begin the decrementation of the step
        // If m = 0 there is no decrementation

        double transitionStep = 0;
        if (m > 0) {
            transitionStep = (eDeltaPreEdge - eDeltaEdge) / m;
        }

        point = e1;

        double[] transitionValues = new double[m];
        double newStep = 0;

        for (int i = 0; i < transitionValues.length; i++) {
            if (transitionStep < 1) {
                newStep = (i + 1) * transitionStep;
            }
            else {
                newStep = (transitionValues.length - i) * transitionStep;
            }
            // System.out.println("newStep=" + newStep);
            point = point - newStep;
            transitionValues[transitionValues.length - i - 1] = point;
        }

        // System.out.println("lastpoint 1 =" + point);

        // PreEdge region From Emin to E1
        double preEdgeWidth = point - eMin;
        int preEdgeNbStep = Double.valueOf(preEdgeWidth / eDeltaPreEdge).intValue();
        nbStepPreEdge = preEdgeNbStep + m;

        // System.out.println("preEdgeNbStep =" + preEdgeNbStep);

        for (int i = 0; i < preEdgeNbStep; i++) {
            point = eMin + i * eDeltaPreEdge;
            eGrid.add(point);
        }

        for (double transitionValue : transitionValues) {
            eGrid.add(transitionValue);
        }

        // Edge region From E1 to E2
        double edgeWidth = e2 - e1;
        int edgeNbStep = Double.valueOf(edgeWidth / eDeltaEdge).intValue();
        // System.out.println("edgeNbStep=" + edgeNbStep);
        nbStepEdge = edgeNbStep;
        for (int i = 0; i < edgeNbStep; i++) {
            point = e1 + i * eDeltaEdge;
            eGrid.add(point);
        }

        // Post Edge region E2 to KMAX
        // Edge region From E1 to E2
        double kMin = convertEnergyToK(e0, e2, 1000);
        if (kMin > kMax) {
            throw new SalsaTrajectoryException("kMax can't be smaller than " + kMin);
        }

        double kWidth = kMax - kMin;

        int postEdgeNbStep = Double.valueOf(kWidth / kDelta).intValue();
        if (postEdgeNbStep == 0) {
            throw new SalsaTrajectoryException("kDelta can't be greater than " + kWidth);
        }

        double kValue = 0;
        // System.out.println("postEdgeNbStep=" + postEdgeNbStep);
        nbStepPostEdge = postEdgeNbStep;
View Full Code Here

Examples of fr.soleil.salsa.exception.SalsaTrajectoryException

        // The End value for K Region
        double kMax = trajectoryK.getKMax();

        // Check condition
        if (kDelta == 0) {
            throw new SalsaTrajectoryException("Kdelta can't be equals to 0");
        }
        if (eDeltaPreEdge == 0) {
            throw new SalsaTrajectoryException("EDeltaPreEdge can't be equals to 0");
        }
        if (e0 == 0) {
            throw new SalsaTrajectoryException("e0 can't be equals to 0");
        }
        if (eDeltaEdge == 0) {
            throw new SalsaTrajectoryException("EDeltaEdge can't be equals to 0");
        }
        if (eMin > e1) {
            throw new SalsaTrajectoryException("eMin can't be greater than e1");
        }
        if (e1 > e2) {
            throw new SalsaTrajectoryException("e1 can't be greater than e2");
        }
        if (eDeltaEdge > eDeltaPreEdge) {
            throw new SalsaTrajectoryException("EDeltaEdge can't be greater than EDeltaPreEdge");
        }

        ArrayList<Double> eGrid = new ArrayList<Double>();

        // The value of the trajectory
        double point = 0;

        // The index where begin the decrementation of the step
        // If m = 0 there is no decrementation

        double transitionStep = 0;
        if (m > 0) {
            transitionStep = (eDeltaPreEdge - eDeltaEdge) / m;
        }

        point = e1;

        double[] transitionValues = new double[m];
        double newStep = 0;

        for (int i = 0; i < transitionValues.length; i++) {
            if (transitionStep < 1) {
                newStep = (i + 1) * transitionStep;
            }
            else {
                newStep = (transitionValues.length - i) * transitionStep;
            }
            point = point - newStep;
            transitionValues[transitionValues.length - i - 1] = point;
        }


        // PreEdge region From Emin to E1
        double preEdgeWidth = point - eMin;
        int preEdgeNbStep = Double.valueOf(preEdgeWidth / eDeltaPreEdge).intValue();
        nbStepPreEdge = preEdgeNbStep + m;

        for (int i = 0; i < preEdgeNbStep; i++) {
            point = eMin + i * eDeltaPreEdge;
            eGrid.add(point);
        }

        for (double transitionValue : transitionValues) {
            eGrid.add(transitionValue);
        }

        // Edge region From E1 to E2
        double edgeWidth = e2 - e1;
        int edgeNbStep = Double.valueOf(edgeWidth / eDeltaEdge).intValue();
        nbStepEdge = edgeNbStep;
        for (int i = 0; i < edgeNbStep; i++) {
            point = e1 + i * eDeltaEdge;
            eGrid.add(point);
        }

        // Post Edge region E2 to KMAX
        // Edge region From E1 to E2
        double kMin = convertEnergyToK(e0, e2, 1000);
        if (kMin > kMax) {
            throw new SalsaTrajectoryException("kMax can't be smaller than " + kMin);
        }

        double kWidth = kMax - kMin;

        int postEdgeNbStep = Double.valueOf(kWidth / kDelta).intValue();
        if (postEdgeNbStep == 0) {
            throw new SalsaTrajectoryException("kDelta can't be greater than " + kWidth);
        }

        double kValue = 0;
        nbStepPostEdge = postEdgeNbStep;
        for (int i = 0; i < postEdgeNbStep; i++) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.