Decision Optimization

Decision Optimization

Delivers prescriptive analytics capabilities and decision intelligence to improve decision-making.


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  Docplex error on IBM Cloud solving large MILP : result too large

    Posted 05/02/24 03:40 AM

    Hello Everyone,

    I am encoutering an issue when solving large sized models (MILPs) on IBM Cloud using docplex. Note that the model is successfully solved and a solution is found. However, I cannot retrieve the results (decision variables). Below is the error:

    "errors": [{
              "code": "runtime_endpoint_result_too_large",
              "message": "Job data are too big to be handled using inlined data. You should move to referenced data for such use case."
            }]

    I write the data using this function : 

    def write_all_outputs(outputs):

        '''
        Write all dictionaries in ``outputs`` as JSON files.
        Args:
            outputs: A dictionary containing the name and content of each output
        '''

        for (name, content) in iteritems(outputs):
            json_file = '%s.json' % name
            with get_environment().get_output_stream(json_file) as fp:
                fp.write(json.dumps({name: content}, default=int, indent=4).encode('utf-8'))
        if len(outputs) == 0:
            print("Warning: no outputs written")

    Thank you in advance for any guidance.

    Best regards,



    ------------------------------
    yasmine alaouchiche
    ------------------------------


  • 2.  RE: Docplex error on IBM Cloud solving large MILP : result too large

    Posted 05/02/24 06:03 AM

    Hi,

    you should move to referenced data:

    Decision Optimization model input and output data - Docs | IBM watsonx

    regards



    ------------------------------
    [Alex] [Fleischer]
    [Data and AI Technical Sales]
    [IBM]
    ------------------------------



  • 3.  RE: Docplex error on IBM Cloud solving large MILP : result too large
    Best Answer

    Posted 05/02/24 06:19 AM

    Alex, 

    Thank you very much ! Problem solved, the documentation is helpful. 

    If someone is encountering the same problem, the links below can be very helpful too :

    https://dataplatform.cloud.ibm.com/docs/content/DO/WML_Deployment/DeployModelRest.html?context=cpdaas#task_deploymodelREST

    https://cloud.ibm.com/apidocs/machine-learning#deployments-create

    Best regards,



    ------------------------------
    yasmine alaouchiche
    ------------------------------