[Python] Docplex: updating convex function via iterative solutions

Discussão em 'Python' iniciado por Stack, Junho 18, 2025.

  1. Stack

    Stack Membro Participativo

    Anyone with experience using docplex can give me some insight or tips regarding my situation?

    I'm trying to build a convex function using matrix-vector notation. But the elements of the matrix and vector that work as the coefficients for the function (x**2 and x respectively) are defined using the previous solution for the continuous variable of the model (x).

    Anyone knows how to propertly implement this?

    I tried building my matrix and vector as symbols using my continuous variable defined on the model, but since im making a x.TAx operation, im getting a degree 3. Im thinking on Initializing the matrix using numpy and maybe using a function or something to build the coefficients to later use them on a loop with the continuous variable? For know, its just an idea.

    Any tip or help is gladly welcomed.

    Thanks in advance :)

    Continue reading...

Compartilhe esta Página