private OutputModel _solve(boolean probalistic, double alpha)
            throws Exception            
    {
        //Debug flags
        boolean needPresolveCorrection = true;
        boolean ownConvexClass = false;
        boolean needHalfPresolve = true;
        boolean KKKT = false;
        
        //Conditions
        int mainSize = conditions.getDim();
  
        
        ConvexMultivariateRealFunction[] goodsConds = conditions.getGoodsConditions();
        ConvexMultivariateRealFunction[] toolsConds = conditions.getToolsConditions();
        ConvexMultivariateRealFunction[] resourcesLinConds = 
                conditions.getResourcesLinearConditions(false, alpha);
        ConvexMultivariateRealFunction[] resourcesConds =  ((ownConvexClass)?
                            conditions.getResourcesProbalisticConditions(alpha):
                            conditions.getResourcesConvexConditions(alpha));
        
        int condsLen = goodsConds.length
                        + toolsConds.length
                        + resourcesLinConds.length;
            
        
        ConvexMultivariateRealFunction[] problem;
        int prIndex = 0;
        OptimizationRequest or = new OptimizationRequest();
        
        if(probalistic)
        {
            condsLen += resourcesConds.length;
            problem = new ConvexMultivariateRealFunction[condsLen];
            for(int k = 0; k < resourcesConds.length; ++k)
                problem[prIndex++] = resourcesConds[k];
            
            double[] initialPoint = presolve(needPresolveCorrection, alpha);

            if(needHalfPresolve)
            {
                for(int i = 0; i < mainSize; ++i)
                    initialPoint[i] *= 0.5;
            }
            or.setInitialPoint(initialPoint);
        }
        else
        {
            problem = new ConvexMultivariateRealFunction[condsLen];
        }
        
        for(int k = 0; k < goodsConds.length; ++k)
                problem[prIndex++] = goodsConds[k];
        
        for(int k = 0; k < toolsConds.length; ++k)
                problem[prIndex++] = toolsConds[k];
        
        for(int k = 0; k < resourcesLinConds.length; ++k)
                problem[prIndex++] = resourcesLinConds[k];
        
        
        
        ConvexMultivariateRealFunction objectiveFunction
               = conditions.getObjectiveFunction();
        
        //optimization problem
        
        
        or.setF0(objectiveFunction);
        or.setFi(problem);
        
        if(KKKT)
            or.setCheckKKTSolutionAccuracy(true);

        JOptimizer opt = new JOptimizer();
        opt.setOptimizationRequest(or);
        int returnCode = opt.optimize();    
        double[] sol = opt.getOptimizationResponse().getSolution();
        
        double summ = objectiveFunction.value(sol);
        
        return new OutputModel(sol, conditions, problemData, alpha);
        
    }