public static boolean checkSignals(Library library, Scheme scheme, SignalBundle signals) throws ModelingException {
        for(Contact contact : signals.signals.keySet()) {
            if(scheme.inputs.contains(contact.element) || scheme.outputs.contains(contact.element));
            else if(scheme.elements.containsKey(contact.element)) {
                Element element = library.library.get(scheme.elements.get(contact.element));
                if(contact.cnumber >= element.icnt + element.ocnt + element.ecnt) {
                    throw new ModelingException(0x41, contact.toString());
                }
            } else {
                throw new ModelingException(0x40, contact.toString());
            }
        }
        return true;
    }