public String encodeSolution() throws EncodeException {
        StringBuilder res = new StringBuilder();
        if (this.solution != null && this.solution.length > 0) {
            if (solution[0] instanceof Integer) {
                res.append("int");
            } else if (solution[0] instanceof Double) {
                res.append("dbl");
            } else if (solution[0] instanceof Character) {
                res.append("chr");
            } else if (solution[0] instanceof String) {
                res.append("str");
            } else if (solution[0] instanceof Boolean) {
                res.append("bln");
            } else {
                throw new EncodeException("Unsupported variable type");
            }
            res.append("><");
            for (Object value : this.solution) {
                res.append(value).append(':');
            }
            res.replace(res.length()-1, res.length(), "");
        } else {
            throw new EncodeException("Empty solution array");
        }
        return res.toString();
    }