Error with Invalid argument to QuadExpr multiplication
回答済みHi everyone,
I am new to the forum and am seeking assistance on a matter. I am currently trying to calculate the total number of products to load into a trailer taking a series of dimensions (L, W, and Height) as decision variables and using volume to do the below conversion:
- Number of sandwiches in a carton * Number of cartons in a case * Number of cases in a pallet * Number of pallets on a trailer.
The below is a screenshot of my code, with two errors. The first error being the "Invalid argument to QuadExpr multiplication" error on the objective function. The second error is the "Invalid argument to QuadExpr multiplication" (same error) on the first constraint.
I know that this has exceeded the number of required multiplications, but I am unsure how to re-write the objective function and constraint to prevent this error from going away without changing the decision variables. Thanks!


-
It is not possible to divide by an optimization variable. We discuss a way to formulate division in the Knowledge Base article How do I divide by a variable in Gurobi?
It is always best to simplify the fractional expression as far as possible before reformulating it via a bilinear term.
Best regards,
Jaromił0
サインインしてコメントを残してください。
コメント
1件のコメント