@@ -552,4 +552,42 @@ c2: x + y <= 1.0
552552 return
553553end
554554
555+ function test_generate_solve_vector_objective ()
556+ model = Model () do
557+ return MOI. Utilities. MockOptimizer (MOI. Utilities. Model {Float64} ())
558+ end
559+ @variable (model, x >= 0.0 )
560+ @variable (model, y >= 1.0 )
561+ @objective (model, Min, [x, y])
562+ optimize! (model)
563+ mock = unsafe_backend (model)
564+ MOI. set (mock, MOI. TerminationStatus (), MOI. OPTIMAL)
565+ MOI. set (mock, MOI. RawStatusString (), " Optimal" )
566+ MOI. set (mock, MOI. ResultCount (), 1 )
567+ MOI. set (mock, MOI. PrimalStatus (), MOI. FEASIBLE_POINT)
568+ MOI. set (mock, MOI. DualStatus (), MOI. NO_SOLUTION)
569+ # MOI.set(mock, MOI.ObjectiveValue(), [0.0, 1.0])
570+ MOI. set (mock, MOI. ObjectiveBound (), [0.0 , 1.0 ])
571+ MOI. set (mock, MOI. VariablePrimal (), optimizer_index (x), 0.0 )
572+ MOI. set (mock, MOI. VariablePrimal (), optimizer_index (y), 1.0 )
573+ @test sprint (print, solution_summary (model)) == """
574+ * Solver : Mock
575+
576+ * Status
577+ Result count : 1
578+ Termination status : OPTIMAL
579+ Message from the solver:
580+ "Optimal"
581+
582+ * Candidate solution (result #1)
583+ Primal status : FEASIBLE_POINT
584+ Dual status : NO_SOLUTION
585+ Objective value : [0.00000e+00,1.00000e+00]
586+ Objective bound : [0.00000e+00,1.00000e+00]
587+
588+ * Work counters
589+ """
590+ return
591+ end
592+
555593end # module
0 commit comments