Examples of EventState


Examples of org.apache.commons.math3.ode.events.EventState

    public void addEventHandler(final EventHandler handler,
                                final double maxCheckInterval,
                                final double convergence,
                                final int maxIterationCount,
                                final UnivariateSolver solver) {
        eventsStates.add(new EventState(handler, maxCheckInterval, convergence,
                                        maxIterationCount, solver));
    }
View Full Code Here

Examples of org.apache.commons.math3.ode.events.EventState

            while (!occuringEvents.isEmpty()) {

                // handle the chronologically first event
                final Iterator<EventState> iterator = occuringEvents.iterator();
                final EventState currentEvent = iterator.next();
                iterator.remove();

                // restrict the interpolator to the first part of the step, up to the event
                final double eventT = currentEvent.getEventTime();
                interpolator.setSoftPreviousTime(previousT);
                interpolator.setSoftCurrentTime(eventT);

                // trigger the event
                interpolator.setInterpolatedTime(eventT);
                final double[] eventY = interpolator.getInterpolatedState().clone();
                currentEvent.stepAccepted(eventT, eventY);
                isLastStep = currentEvent.stop();

                // handle the first part of the step, up to the event
                for (final StepHandler handler : stepHandlers) {
                    handler.handleStep(interpolator, isLastStep);
                }

                if (isLastStep) {
                    // the event asked to stop integration
                    System.arraycopy(eventY, 0, y, 0, y.length);
                    for (final EventState remaining : occuringEvents) {
                        remaining.stepAccepted(eventT, eventY);
                    }
                    return eventT;
                }

                if (currentEvent.reset(eventT, eventY)) {
                    // some event handler has triggered changes that
                    // invalidate the derivatives, we need to recompute them
                    System.arraycopy(eventY, 0, y, 0, y.length);
                    computeDerivatives(eventT, y, yDot);
                    resetOccurred = true;
                    for (final EventState remaining : occuringEvents) {
                        remaining.stepAccepted(eventT, eventY);
                    }
                    return eventT;
                }

                // prepare handling of the remaining part of the step
                previousT = eventT;
                interpolator.setSoftPreviousTime(eventT);
                interpolator.setSoftCurrentTime(currentT);

                // check if the same event occurs again in the remaining part of the step
                if (currentEvent.evaluateStep(interpolator)) {
                    // the event occurs during the current step
                    occuringEvents.add(currentEvent);
                }

            }
View Full Code Here

Examples of org.apache.jackrabbit.core.observation.EventState

            }
        }

        Iterator events = esc.getEvents().iterator();
        while (events.hasNext()) {
            EventState event = (EventState) events.next();
            log(event);
        }
    }
View Full Code Here

Examples of org.apache.jackrabbit.core.observation.EventState

                }
                info.put(key, value);
            }
        }

        EventState es = createEventState(type, parentId, parentPath, childId,
                childRelPath, ntName, mixins, userId);
        if (info != null) {
            es.setInfo(info);
        }
        events.add(es);
    }
View Full Code Here

Examples of org.apache.jackrabbit.core.observation.EventState

            }
        }

        Iterator iter = events.iterator();
        while (iter.hasNext()) {
            EventState event = (EventState) iter.next();
            writeEventRecord(event);
        }
    }
View Full Code Here

Examples of org.apache.jackrabbit.core.observation.EventState

                }
                info.put(key, value);
            }
        }

        EventState es = createEventState(type, parentId, parentPath, childId,
                childRelPath, ntName, mixins, userId);
        if (info != null) {
            es.setInfo(info);
        }
        events.add(es);
    }
View Full Code Here

Examples of org.apache.jackrabbit.core.observation.EventState

                }
                info.put(key, value);
            }
        }

        EventState es = createEventState(type, parentId, parentPath, childId,
                childRelPath, ntName, mixins, userId);
        if (info != null) {
            es.setInfo(info);
        }
        events.add(es);
    }
View Full Code Here

Examples of org.apache.jackrabbit.core.observation.EventState

            }
        }

        Iterator iter = events.iterator();
        while (iter.hasNext()) {
            EventState event = (EventState) iter.next();
            writeEventRecord(event);
        }
    }
View Full Code Here

Examples of org.apache.jackrabbit.core.observation.EventState

                }
                info.put(key, value);
            }
        }

        EventState es = createEventState(type, parentId, parentPath, childId,
                childRelPath, ntName, mixins, userId);
        if (info != null) {
            es.setInfo(info);
        }
        events.add(es);
    }
View Full Code Here

Examples of org.apache.jackrabbit.core.observation.EventState

                }
                info.put(key, value);
            }
        }

        EventState es = createEventState(type, parentId, parentPath, childId,
                childRelPath, ntName, mixins, userId);
        if (info != null) {
            es.setInfo(info);
        }
        events.add(es);
    }
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.