A break point on the very first statment after solver.Solve() never fires?
Optimize a model with 134978 rows, 59135 columns and 370018 nonzeros
Variable types: 8479 continuous, 50656 integer (50656 binary)
Coefficient statistics:
Matrix range [5e-03, 2e+04]
Objective range [9e+02, 5e+06]
Bounds range [1e+00, 2e+04]
RHS range [1e+00, 2e+04]
Presolve removed 67556 rows and 31266 columns
Presolve time: 2.54s
Presolved: 67422 rows, 27869 columns, 241956 nonzeros
Variable types: 4557 continuous, 23312 integer (23312 binary)
var network = Read(args);
// changes the name handling, iff stated in argsOPTANO.Modeling.Optimization.Configuration.Configuration conf = new OPTANO.Modeling.Optimization.Configuration.Configuration();
conf.NameHandling = OPTANO.Modeling.Optimization.Configuration.NameHandlingStyle.Manual;
using (var scope = new ModelScope(conf)){ // create an optimization model based on given network var dnpModel = new DistributionNetworkModel(network); // Get a solver instance using (var solver = new GurobiSolver()) { solver.Configuration.LogFile = new System.IO.FileInfo("gurobiLog.txt");
// adds a time limit, iff stated in args if (args.Contains("-t")) { solver.Configuration.TimeLimit = double.Parse(args[Array.IndexOf(args, "-t") + 1]); }
// adds gap limit, iff stated in args if (args.Contains("-g")) { solver.Configuration.MIPGap = double.Parse(args[Array.IndexOf(args, "-g") + 1]); }
// solve the model var solution = solver.Solve(dnpModel.Model);
// continue with some other stuff. But after solving, it takes more than 20 minutes until the if-statement is executed. if (solution.Status != OPTANO.Modeling.Optimization.Solver.SolutionStatus.NoSolutionValues)
{
...
RestoreUserModelAfterSolve = false
But thank you for the idea with the user model. I'll try that one.
Best,
Sascha
RestoreUserModelAfterSolve