Request for Expert Feedback on MiniZinc Model Implementation

30 views
Skip to first unread message

Ikrame Ounadi

unread,
Jul 27, 2024, 4:54:52 AM7/27/24
to MiniZinc

Dear MiniZinc Community,

I am reaching out to seek your expert opinions and feedback on a MiniZinc model I have developed for a problem . You will save my day 
Feedback Requested

I would be grateful for any feedback on the following aspects:

  • Correctness: Are the constraints and the overall model correct?
  • Efficiency: Are there any potential optimizations to enhance performance?
  • Improvements: Any alternative approaches or suggestions for improvement?

Thank you in advance for your time and assistance. Your expert insights will be invaluable to me.

Best regards,
IkramImage preview

hospital_scheduler.mzn

vdi...@gmail.com

unread,
Jul 27, 2024, 7:31:41 AM7/27/24
to MiniZinc
  1. When you use this for common usage you should use data file as input, now it looks like a school problem.
  2. Add annotations to check the data.
  3. When you change e.g. the number of patients the boundaries of the arrays don't match.
  4. The model sucks; when you use -O5 as argument you get an unbounded variable.
  5. When you use gecode or cpsat you get a reasonable answer, chuffed gives a lot of (wrong) lines and does not stop. cbc runs for ages.
  6. gecode and cpsat don't use multiple threads.

Op zaterdag 27 juli 2024 om 08:54:52 UTC schreef Ikrame Ounadi:

Ikrame Ounadi

unread,
Jul 27, 2024, 1:38:30 PM7/27/24
to mini...@googlegroups.com
it is a school problem , I am not an expert , it is a home work given by my professor and I am just trying to optimise it , it is my first time using minizinc .

--
You received this message because you are subscribed to the Google Groups "MiniZinc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to minizinc+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/minizinc/7110cddd-74c4-4a5d-bd1e-e3acda2be10dn%40googlegroups.com.

Mohamed H. Ibrahim

unread,
Jul 28, 2024, 5:43:55 AM7/28/24
to MiniZinc
Hello,

It is hard  to judge correctness when I dont know the problem statement.
It is not clear what is the duration array is supposed to be doing in the model? because it is not used to set a distance between visits.
For efficiency: I think it should be possible to make your model with less dimmensions.
four dimensional array is too much. possibly try the following

```
schedule_patient(patient,day,time)
schedule_visit(visit,day,time)
patient_visit(patient,visit)
```
I hope this helps.
Best regards,
Reply all
Reply to author
Forward
0 new messages