BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
nep0827
Calcite | Level 5

Find all optimal solutions to the following LP in SAS.

 

Max Z  = 3X[1] + 3X[2]

s.t.    X[1] + X[2] <= 1

        All X[i] => 0

 

Please help me with just the codes. I can interpret once I see them. Appreciate the help, in advance!

1 ACCEPTED SOLUTION

Accepted Solutions
PeterClemmensen
Tourmaline | Level 20

@nep0827, does this represent your actual problem? Any two positive number numbers that sum to 1 will optimize this problem. However, as answered in your previous thread, you can find one of those solutions like this

 

proc optmodel;
var x{i in 1..2} >= 0;
max z = 3*x[1] +  3*x[2];
con c1: x[1] + x[2] <= 1;
solve;
print x;
run;quit;

View solution in original post

1 REPLY 1
PeterClemmensen
Tourmaline | Level 20

@nep0827, does this represent your actual problem? Any two positive number numbers that sum to 1 will optimize this problem. However, as answered in your previous thread, you can find one of those solutions like this

 

proc optmodel;
var x{i in 1..2} >= 0;
max z = 3*x[1] +  3*x[2];
con c1: x[1] + x[2] <= 1;
solve;
print x;
run;quit;

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 1 reply
  • 416 views
  • 0 likes
  • 2 in conversation