Decision Optimization

 View Only
  • 1.  Save array of set in C++

    Posted Tue August 27, 2024 11:44 AM

    Hello,
    I have defined and initialized the following in my .mod file

    float alphaMH[<r,i> in Srs][<r,i> in Srs][<q,p> in SHpq] = -1.0;

    where

    {tupAB} Srs = {<r,i> | r in R, i in 1..rs[r]-1};
    {tupAB} SHpq = {<p,q> | q in H, p in H: q!=p && abs(q-p)==1};

    and

    tuple tupAB
    {
    int i1;
    int i2;
    }

    I modify values of alphaMH through Concert Technology before running CPLEX.
    Once the problem is solved I need to reproduce alphaMH in C++ so I can use its values for post processing. 

    Do you have any suggestion on how to proceed?


    Thank you
    Sam



    ------------------------------
    Samuele Viaro
    ------------------------------


  • 2.  RE: Save array of set in C++

    Posted Fri September 13, 2024 10:53 AM
    Hello Samuele,
    I don't understand what is your problem?
    You say, "I modify values of alphaMH through Concert Technology". So I understand you do this in C++.
    Therefore, you have "alphaMH " - actually the C++ object corresponding to the OPL object alphaMH  (an IloNumMap I guess) - available for any treatment.
    Please explain what you want and how we can help.


    ------------------------------
    Christiane Bracchi
    ------------------------------