1
$\begingroup$

Here is a short description of my problem:

Part of my objective function is not a regular function. Instead it's a table.

You can see a short extract here:

enter image description here

So if the height is smaller or equal to 300 and the length is between 301 and 345 (including 345) the price is p2.

My first idea was to create a boolean variable:

enter image description here

So i can add sth like this to my objective function:

enter image description here

Next step is to create two other boolean variables, one for, wenn the height is matching row r, and one for the length:

enter image description here

So when both of them are 1, y_r is also 1:

enter image description here

But how do i create constraints that can switch h_r and l_r to 1 if they are fitting the row r ?

I found a smiliar question here, but its not quite it. I ́m not sure, if I have upper and lower bonds and what they are if so.

Thank you for your help!

asked Nov 18, 2020 at 15:25
$\endgroup$
1

0

Know someone who can answer? Share a link to this question via email, Twitter, or Facebook.

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.