Exemplo n.º 1
0
 /// <summary>
 /// Set results based on internal solver status
 /// </summary>
 private void SetResult(Z3Result status)
 {
     switch (status)
     {
         case Z3Result.Optimal:
             _result = LinearResult.Optimal;
             _solutionQuality = LinearSolutionQuality.Exact;
             break;
         case Z3Result.LocalOptimal:
             _result = LinearResult.Feasible;
             _solutionQuality = LinearSolutionQuality.Approximate;
             break;
         case Z3Result.Feasible:
             _result = LinearResult.Feasible;
             _solutionQuality = LinearSolutionQuality.Exact;
             break;
         case Z3Result.Infeasible:
             _result = LinearResult.InfeasiblePrimal;
             _solutionQuality = LinearSolutionQuality.None;
             break;
         case Z3Result.Interrupted:
             _result = LinearResult.Interrupted;
             _solutionQuality = LinearSolutionQuality.None;
             break;
         default:
             Debug.Assert(false, "Unrecognized Z3 Result");
             break;
     } 
 }
Exemplo n.º 2
0
 /// <summary>
 /// Set results based on internal solver status
 /// </summary>
 private void SetResult(Z3Result status)
 {
     switch (status)
     {
         case Z3Result.Optimal:
             _result = NonlinearResult.Optimal;
             break;
         case Z3Result.LocalOptimal:
             _result = NonlinearResult.LocalOptimal;
             break;
         case Z3Result.Feasible:
             _result = NonlinearResult.Feasible;
             break;
         case Z3Result.Infeasible:
             _result = NonlinearResult.Infeasible;
             break;
         case Z3Result.Interrupted:
             _result = NonlinearResult.Interrupted;
             break;
         default:
             Debug.Assert(false, "Unrecognized Z3 Result");
             break;
     }
 }