Topic
2 replies Latest Post - ‏2013-02-18T11:55:46Z by SystemAdmin
SystemAdmin
SystemAdmin
623 Posts
ACCEPTED ANSWER

Pinned topic How to get multi-objective value from c# (V12.5)

‏2013-02-17T08:43:29Z |
Hey guys!
When we do single-objective model,we use "opl.CP.ObjValue"(from c#) to get the object value.
If i do multi-objective model, i set "dexpr int e1 =……,dexpr int e2 = ……".And i use "minimize staticLex(e1, e2)" to let cp slove multiobject.But here comes the question: how can i get the two object value from c#?
Thanks!
Updated on 2013-02-18T11:55:46Z at 2013-02-18T11:55:46Z by SystemAdmin
  • SystemAdmin
    SystemAdmin
    623 Posts
    ACCEPTED ANSWER

    Re: How to get multi-objective value from c# (V12.5)

    ‏2013-02-18T08:40:03Z  in response to SystemAdmin
    Hello.

    There is the following function on class CP in C#:
    
    
    
    public 
    
    double[] GetObjValues()
    

    This method returns the numeric values of all objectives in a multi-objective function associated with the CP engine.

    Best, Petr
    • SystemAdmin
      SystemAdmin
      623 Posts
      ACCEPTED ANSWER

      Re: How to get multi-objective value from c# (V12.5)

      ‏2013-02-18T11:55:46Z  in response to SystemAdmin
      Thanks! Problems solved!