示例#1
0
 /// <summary>
 /// Updates the <see cref="CurrentRuntimeFeatures"/> in MIP phase.
 /// </summary>
 private void UpdateCurrentGurobiFeaturesInMipPhase()
 {
     this.CurrentRuntimeFeatures.BestObjective      = this.GetCallbackDouble(GRB.Callback.MIP_OBJBST, this.CurrentRuntimeFeatures.BestObjective);
     this.CurrentRuntimeFeatures.BestObjectiveBound = this.GetCallbackDouble(
         GRB.Callback.MIP_OBJBND,
         this.CurrentRuntimeFeatures.BestObjectiveBound);
     this.CurrentRuntimeFeatures.FeasibleSolutionsCount = this.GetCallbackInt(
         GRB.Callback.MIP_SOLCNT,
         this.CurrentRuntimeFeatures.FeasibleSolutionsCount);
     this.CurrentRuntimeFeatures.ExploredNodeCount = this.GetCallbackDouble(
         GRB.Callback.MIP_NODCNT,
         this.CurrentRuntimeFeatures.ExploredNodeCount);
     this.CurrentRuntimeFeatures.UnexploredNodeCount = this.GetCallbackDouble(
         GRB.Callback.MIP_NODLFT,
         this.CurrentRuntimeFeatures.UnexploredNodeCount);
     this.CurrentRuntimeFeatures.SimplexIterationsCount = this.GetCallbackDouble(
         GRB.Callback.MIP_ITRCNT,
         this.CurrentRuntimeFeatures.SimplexIterationsCount);
     this.CurrentRuntimeFeatures.CuttingPlanesCount = this.GetCallbackInt(
         GRB.Callback.MIP_CUTCNT,
         this.CurrentRuntimeFeatures.CuttingPlanesCount);
     this.CurrentRuntimeFeatures.MipGap = GurobiUtils.GetMipGap(
         this.CurrentRuntimeFeatures.BestObjective,
         this.CurrentRuntimeFeatures.BestObjectiveBound);
 }
示例#2
0
 /// <summary>
 /// Updates the <see cref="CurrentRuntimeFeatures"/> in MIP_SOL phase.
 /// </summary>
 private void UpdateCurrentGurobiFeaturesInMipSolPhase()
 {
     this.CurrentRuntimeFeatures.BestObjective      = this.GetCallbackDouble(GRB.Callback.MIPSOL_OBJBST, this.CurrentRuntimeFeatures.BestObjective);
     this.CurrentRuntimeFeatures.BestObjectiveBound = this.GetCallbackDouble(
         GRB.Callback.MIPSOL_OBJBND,
         this.CurrentRuntimeFeatures.BestObjectiveBound);
     this.CurrentRuntimeFeatures.FeasibleSolutionsCount = this.GetCallbackInt(
         GRB.Callback.MIPSOL_SOLCNT,
         this.CurrentRuntimeFeatures.FeasibleSolutionsCount);
     this.CurrentRuntimeFeatures.ExploredNodeCount = this.GetCallbackDouble(
         GRB.Callback.MIPSOL_NODCNT,
         this.CurrentRuntimeFeatures.ExploredNodeCount);
     this.CurrentRuntimeFeatures.MipGap = GurobiUtils.GetMipGap(
         this.CurrentRuntimeFeatures.BestObjective,
         this.CurrentRuntimeFeatures.BestObjectiveBound);
 }