public ClosedLoop copy(){
        if(this==null){
            return null;
        }
        else{
            ClosedLoop bb = new ClosedLoop();
            this.copyBBvariables(bb);

            bb.nFeedbackBoxes = this.nFeedbackBoxes;
            bb.checkNoMix = this.checkNoMix;
            bb.checkConsolidate = this.checkConsolidate;
            bb.forwardPath = this.forwardPath.copy();
            bb.closedPath = this.closedPath.copy();
            bb.feedbackPath = new ArrayList<BlackBox>();
            if(this.feedbackPath.size()!=0){
                for(int i=0; i<feedbackPath.size(); i++)bb.feedbackPath.add((this.feedbackPath.get(i)).copy());
            }

            return bb;
        }
    }