reset password
Author Message
arstan
Posts: 9
Posted 17:20 Nov 05, 2019 |

I keep trying to use the int_search function in MiniZinc and it keeps throwing this error

: type error: objective has invalid type, expected int or float, actual `array[int] of var int'

and I don't know how to fix it, the type is an actually array of var int, so it should be fine technically. 

 

fumjum
Posts: 27
Posted 17:33 Nov 05, 2019 |

Can you show how you called the function?

arstan
Posts: 9
Posted 19:39 Nov 05, 2019 |

Omg, thank you for responding! I actually figured out my problem haha. I was doing the wrong kind of search. I had put the second search, and what I needed was the first one. 

solve :: int_search(x, input_order, indomain_min, complete) maximize product; 
solve :: int_search(x, input_order, indomain_min, complete) maximize x;