メインコンテンツへスキップ

Can't get the result of optimization problem in an acceptable time(more than 10 hours).

進行中

コメント

3件のコメント

  • 正式なコメント
    Simranjit Kaur
    • Gurobi Staff
    This post is more than two years old. Some information may not be up to date. For current information, please check the Gurobi Documentation or Knowledge Base. If you need more help, please create a new post in the community forum, or try Gurobot, our chatbot interface offering instant, expert-level support.
  • Riley Clement
    • Gurobi Staff

    Hi Songtao,

    Thanks for the log output, but it will be hard to help without seeing the code, or math formulation, you used to produce your model.

    If you send it through, then someone may be able to provide you advice.

    - Riley

    0
  • songtao wang
    • Gurobi-versary
    • First Comment
    • First Question

    My code is consist of three fuctions, and most of them have more than 100 rows. So I want to send the constraints and objective firstly. Hoping to get your instruction.

    u=sdpvar(T*dim_input,1,'full');



    constr=[Pu_bar*u<=pu_bar];



    for q=1:num_model

    pi{q}=sdpvar(size(K(:,:,q),1),size(M(:,:,q),1),'full');

    delta{q}=sdpvar(1,1,'full');

    z{q}=sdpvar(2*dim_state+2*T*dim_mu+2*(T+1)*dim_eta,1,'full');

    omega1{q}=sdpvar(2*(T+1)*dim_output,1,'full');

    omega2{q}=sdpvar(size(M(:,:,q),1),1,'full');

    g1{q}=sdpvar(2*(T+1)*dim_output,1,'full');

    g2{q}=sdpvar(size(M(:,:,q),1),1,'full');






    constr=[constr;pi{q}*m(:,:,q)<=k(:,:,q)-Px_title(:,:,q)*Gammaxu_title(:,:,q)*u];

    constr=[constr;pi{q}*M(:,:,q)==K(:,:,q)];

    constr=[constr;pi{q}>=0];



    constr=[constr;delta{q}>=xi];



    %KKT condition

    %primal

    constr=[constr;H(:,:,q)*z{q}+C_title(:,:,q)*Gammaxu_title(:,:,q)*u+C_title(:,:,q)*Gammax_title(:,:,q)-delta{q}*ones(size(H(:,:,q),1),1)<=0];

    constr=[constr;M(:,:,q)*z{q}-m(:,:,q)<=0];



    %dual

    constr=[constr;omega1{q}>=0];

    constr=[constr;omega2{q}>=0];



    %slackness

    for l=1:2*(T+1)*dim_output

    constr=[constr;g1{q}(l)==H(l,:,q)*z{q}+C_title(l,:,q)*Gammaxu_title(:,:,q)*u+C_title(l,:,q)*Gammax_title(:,:,q)-delta{q};sos1([g1{q}(l),omega1{q}(l)],[1,10])];




    end

    for l=1:size(M(:,:,q),1)




    constr=[constr;g2{q}(l)==M(l,:,q)*z{q}-m(l,:,q);sos1([g2{q}(l),omega2{q}(l)],[1,10])];

    end



    %stationary

    constr=[constr;sum(omega1{q})==1];



    for l=1:2*dim_state+2*T*dim_mu+2*(T+1)*dim_eta

    constr=[constr;omega1{q}'*H(:,l,q)+omega2{q}'*M(:,l,q)==0];



    end

    end



    obj=norm(u,2);



    options=sdpsettings('verbose',1,'debug',1,'solver','gurobi');

    sol=optimize(constr,obj,options);
    0

投稿コメントは受け付けていません。