BookmarkSubscribeRSS Feed
grandmoon
Fluorite | Level 6

Hi all,

 

We are trying to solve an optimization case and now face some problem. It is like follows: We have a variable (water flow at a valve); it can be either zero (when the valve is closed), or between 500-1500 m3/h (when it is open). In the beginning we took the flow as x1*x2, where x1 is binary and x2 is between 500 and 1500. But then SAS can't solve this non-linear thing with binary variable. How can I avoid this situation and linearize this?

 

Thanks.

2 REPLIES 2
Ksharp
Super User

Maybe you could try Genetic Algorithm .

Can you explain it more,and better post an example .

RobPratt
SAS Super FREQ

To model such a semi-continuous variable y, introduce a binary variable x and the following linear constraints:

  • y >= 500*x
  • y <= 1500*x

If x = 0, then y = 0.  If x = 1, then y is in [500, 1500].

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

Multiple Linear Regression in SAS

Learn how to run multiple linear regression models with and without interactions, presented by SAS user Alex Chaplin.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 814 views
  • 0 likes
  • 3 in conversation