{"id":23331179,"url":"https://github.com/sassoftware/viya-optimization-apps","last_synced_at":"2025-08-23T01:31:13.916Z","repository":{"id":48584795,"uuid":"245459849","full_name":"sassoftware/viya-optimization-apps","owner":"sassoftware","description":"Develop webapps to demonstrate small-scale MILP models, using ReactJS and SAS Optimization","archived":false,"fork":false,"pushed_at":"2021-07-19T14:39:52.000Z","size":634,"stargazers_count":8,"open_issues_count":0,"forks_count":3,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-04-16T10:37:20.429Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sassoftware.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-03-06T15:52:52.000Z","updated_at":"2021-07-19T14:39:47.000Z","dependencies_parsed_at":"2022-09-03T10:01:06.653Z","dependency_job_id":null,"html_url":"https://github.com/sassoftware/viya-optimization-apps","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sassoftware%2Fviya-optimization-apps","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sassoftware%2Fviya-optimization-apps/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sassoftware%2Fviya-optimization-apps/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sassoftware%2Fviya-optimization-apps/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sassoftware","download_url":"https://codeload.github.com/sassoftware/viya-optimization-apps/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230653731,"owners_count":18259793,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-20T22:31:59.322Z","updated_at":"2025-08-23T01:31:13.909Z","avatar_url":"https://github.com/sassoftware.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"This project is no longer under active development and was archived on 2025-01-07.\n\n# Facility Location Optimization Demo\n\n## Overview\n\nThis app is built with [Create React App](https://github.com/facebook/create-react-app \"Create React App\"). It uses [Material UI](https://material-ui.com/ \"Material UI\") for themes and styling and [ReactBootstrapTable](http://allenfang.github.io/react-bootstrap-table/index.html \"ReactBootstrapTable\") for displaying tables.\u003cbr\u003e\nIt uses [restaf-server](https://www.npmjs.com/package/@sassoftware/restaf-server \"restaf-server\") for its app server and [restaf](https://www.npmjs.com/package/@sassoftware/restaf \"restaf\") to make REST API calls to a SAS Viya Server. \u003cbr\u003e\nThe optimization code is submitted using the ['runOptmodel'](https://go.documentation.sas.com/?docsetId=casactmopt\u0026docsetTarget=casactmopt_optimization_details03.htm\u0026docsetVersion=8.3\u0026locale=en \"runOptmodel\") and executed using Cloud Analytic Services (CAS).\nThe Visual Analytics Report have now been upgraded to using the new ['VASDK'](https://communities.sas.com/t5/SAS-Communities-Library/Embedded-Insights-with-SAS-Visual-Analytics-SDK/ta-p/581481)\n\n## Installation\n- Obtain the code and sample data in this directory.\n- Upload and promote the datasets as castables to your SAS Viya server in the 'Public' caslib (or whatever you ultimately set as your INPUTLIBNAME).\n- Install node.js and Node Package Manager (npm) from this [website](https://www.npmjs.com/ \"Download node.js and npm\"), then perform the following steps on Windows Command Prompt:\n\n```\n  cd .\\Facility_Location\n  npm install\n```\n- Install a linter package into your favorite editor, like [Atom](https://atom.io/ \"Download Atom\") or [Visual Studio](https://visualstudio.microsoft.com/downloads/ \"Download Visual Studio\").\n\n## Getting Started\n\n### Configurations\n\n#### Register App Client\nRegister a ClientID for your app using the [Resgiterclient](https://github.com/sassoftware/restaf/wiki/Managing-clientids/ \"Register Client\") package.\n\n#### App.env File\nBefore starting the app, enter custom app environment variables in the app.env files as per instructions provided in the comments.\nNote - if you change the names of these environment variables, step into appenv.js and set them accordingly.\n\n### Running\nCurrently this app does not support Hot Reload.\n\nAfter making a change issue the following to build and start the app.\n```\n  npm run app\n```\n\n## Organization\n\nThe directory structure is:\n- src - where all the app code should be. I have used the following organization in the src directory\n  - components - for all the react components\n  - css - for all the css\n  - helpers - use this for helper functions and components\n  - providers - this is components for wrapping the components for react context\n\nUntil you get familiar with the app do not change anything outside of src directory\n\n### React Context and BrowserHistory\n\nThe store and appEnv are available throughout the app as a react context named **AppContext**. The context has the following object:\n  { store: store, appEnv: appEnv}\n\nSee TestStuff for an example of coding for access to the context.\n\nIt is also a good example of using withRouter to get access to the history object. You will need the history object to programmatically route the application.\n\nThe schema for the context is as follows:\n```\n  context = {\n    store: \u003cvalue of store\u003e.\n    viya: {\n      session: \u003ccas session\u003e,\n      services: {\n        reports: \u003creport restaf object\u003e,\n        reportTransform: \u003creporttransform restaf object\u003e\n      }\n    }\n  }\n```\n\n### Accessing the context\n\nIn your component import the AppContext\n```\n import {AppContext} from '../providers';\n ```\n\n To access the contex object use the following syntax:\n\n ```\n let context - this.context;\n ```\n\n### Advanced\n\nSuggest not modifying this until you are comfortable with the flow of the application.\n\n- index.js - this initializes restaf and invokes app.js\n- app.js - this is where you will start your app. Currently it calls SideBar.js - This can be changed as needed.\n- index.html - this is in the public directory.\n\n\n## Custom Apps\nThe code is commented sufficiently to guide coders with intermediate level knowledge of javascript, React and SAS.\n- Define App specific environment variables in the app.env and appenv.js files\n- Step into the 'SideBar' component under the src/components directory\n- Follow the instructions in the comments to make this app more customizable\n\n## Contributing\nWe welcome your contributions! Please read CONTRIBUTING.md for details on how to submit contributions to this project.\n\n## License\nThis project is licensed under the Apache 2.0 License.\n\n## Additional Sources\nYou can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started \"create-react-app\").\n\nTo learn React, check out the [React documentation](https://reactjs.org/ \"Learn React\").\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsassoftware%2Fviya-optimization-apps","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsassoftware%2Fviya-optimization-apps","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsassoftware%2Fviya-optimization-apps/lists"}