Package ptolemy.data.unit

Examples of ptolemy.data.unit.UnitConstraints


     */
    public void actionPerformed(ActionEvent aEvent) {
        //String command = aEvent.getActionCommand();
        if (aEvent.getSource() == _runMinimalSpanSolverButton) {
            try {
                _uConstraints = new UnitConstraints(_model, _entities,
                        _relations);
                _solutions = _uConstraints.minimalSpanSolutions();
            } catch (IllegalActionException e) {
                MessageHandler.error("Minimal Span Solver failed: ", e);
                return;
            }

            _solutionsListModel.setSolutions(_solutions);
            _solutionsList.setModel(_solutionsListModel);
        } else if (aEvent.getSource() == _runFullSolverButton) {
            _solutionsList.clearSelection();

            try {
                _uConstraints = new UnitConstraints(_model, _entities,
                        _relations);

                Solution solution = _uConstraints.completeSolution();
                _fullSolutionResult.setText(solution.getShortStateDesc());

View Full Code Here

TOP

Related Classes of ptolemy.data.unit.UnitConstraints

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.