Skip to content

Commit

Permalink
change: Gerador: GerarHorario: options
Browse files Browse the repository at this point in the history
  • Loading branch information
guesant committed Mar 20, 2024
1 parent 252438b commit fd9fe3c
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions projeto-gerar-horario/Core/Gerador/Gerador.cs
Original file line number Diff line number Diff line change
Expand Up @@ -92,15 +92,15 @@ public static CpModel PrepararModelComRestricoes(IGerarHorarioOptions options, b
}

public static IEnumerable<IHorarioGerado> GerarHorario(
IGerarHorarioOptions gerarHorarioOptions,
IGerarHorarioOptions options,
bool verbose = true)
{
// CRIA UM MODELO COM AS RESTRIÇÕES VINDAS DAS OPÇÕES
CpModel model = PrepararModelComRestricoes(gerarHorarioOptions);
var model = PrepararModelComRestricoes(options);

// RESOLVE O MODELO
CpSolver solver = new CpSolver();
CpSolverStatus status = solver.Solve(model);
var solver = new CpSolver();
var status = solver.Solve(model);

// STATUS DA SOLUÇÃO
Console.WriteLine($"Solve status: {status}");
Expand All @@ -124,11 +124,12 @@ public static IEnumerable<IHorarioGerado> GerarHorario(
Console.WriteLine($" - wall time : {solver.WallTime()}s");
}

var horarioGerado = new HorarioGerado { };
// TODO: gerar mais de um horário com CpSolverSolutionCallback OnSolutionCallback

// TODO: transofomar propostasDeAula com modelBoolVar == true para HorarioGerado
var horarioGerado = new HorarioGerado { };
yield return horarioGerado;
yield return horarioGerado;
yield return horarioGerado;

}
}

0 comments on commit fd9fe3c

Please sign in to comment.